You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The only_associated attribute in the inspector2_member table does not properly check the value of the qualifier. Instead, it retrieves the type of the qualifier but does not verify the actual value. This results in input.OnlyAssociated always being set to true, regardless of the provided input.
Since getQualsValueByColumn function retrieves the type but does not extract the actual value, the logic does not work as intended.
Steampipe version (steampipe -v)
v1.0.2
Plugin version (steampipe plugin list)
v1.5.0
To reproduce
Run a query with only_associated = 'false'. E.g:
select
member_account_id, region,
delegated_admin_account_id,
relationship_status,
updated_at
from
aws_inspector2_member
where
only_associated = 'false'
The result still filters members as if only_associated = true.
Expected behavior
The only_associated qualifier should correctly determine whether to list only associated members (true) or all members (false). The logic should properly extract and evaluate the actual value of only_associated instead of relying on its type.
Additional context
The text was updated successfully, but these errors were encountered:
I'd be happy to create a PR to fix this issue, but I have a question before proceeding.
Why is the only_associated value defined as a string instead of a boolean in the table definition? If it were a boolean, it would be easier to use and avoid unnecessary conversions. However, changing it now might be a breaking change.
If keeping it as a string is necessary, I could fix the issue by directly comparing the value of only_associated instead of checking the operator type.
Apologies for the delayed response. The table uses the ListMembers API, which does not include the only_associated value in its response. Instead, we were populating this column based on the value provided in the query parameter.
It looks like we missed updating the column data type during table development. I agree that the correct approach would be to change the column type to boolean, even though it would introduce a breaking change.
Thanks for catching this! We appreciate your input.
Hi @ParthaI I'm having some problems trying to make it work as expected.
After updating the column type to proto.ColumnType_BOOL, if the value is false, then d.EqualsQuals["only_associated"] value is nil instead of false. If the value is true then it receives it.
The default behavior of this API call if the value is not specified is the same as is specified as true, so it's important to pass it explicitly when the value is false.
Any thoughts on why it doesn't get the false boolean value?
Describe the bug
The
only_associated
attribute in theinspector2_member
table does not properly check the value of the qualifier. Instead, it retrieves the type of the qualifier but does not verify the actual value. This results ininput.OnlyAssociated
always being set to true, regardless of the provided input.https://github.com/turbot/steampipe-plugin-aws/blob/main/aws/table_aws_inspector2_member.go#L110C1-L117C3
Since
getQualsValueByColumn
function retrieves the type but does not extract the actual value, the logic does not work as intended.Steampipe version (
steampipe -v
)v1.0.2
Plugin version (
steampipe plugin list
)v1.5.0
To reproduce
Expected behavior
The
only_associated
qualifier should correctly determine whether to list only associated members (true
) or all members (false
). The logic should properly extract and evaluate the actual value ofonly_associated
instead of relying on its type.Additional context
The text was updated successfully, but these errors were encountered: