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
Similar to #842. I use shell scripts to wrap up steampipe queries for reporting, and run them via CI/CD pipeline. The issue I am facing is, if a steampipe plugin e.g. AWS reports an error, the exit code from steampipe query is 0. This gives a false sense that the query completed successfully. I would expect that if any part of the query (or it's plugins fail) it should return a non-zero exit code. A use case for example is, a misconfiguration in aws.spc and an assume-role operation fails.
Steampipe version (steampipe -v)
steampipe version 0.17.4
To reproduce
Install AWS plugin
Add some dummy config to aws.spec
Try and do a query against AWS
Observe the error similar to below (I am running on my local machine here):
Error: rpc error: code = DeadlineExceeded desc = operation error STS: GetCallerIdentity, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, canceled, context deadline exceeded (SQLSTATE HV000)
Observe the exit code is 0:
[host ~]$ echo $?
0
Expected behavior
A non-zero exit code is returned
The text was updated successfully, but these errors were encountered:
Thanks for raising this @captainfalcon23 .... I can see the value in a non-zero exit code for a query error. I'll let @kaidaguerre comment on that part specifically.
@captainfalcon23 Thank you for bringing it to our attention. Yes, returning a non-zero exit code does feel right if any part of the query fails or if the plugin returns an error while streaming the rows.
Describe the bug
Similar to #842. I use shell scripts to wrap up steampipe queries for reporting, and run them via CI/CD pipeline. The issue I am facing is, if a steampipe plugin e.g. AWS reports an error, the exit code from steampipe query is 0. This gives a false sense that the query completed successfully. I would expect that if any part of the query (or it's plugins fail) it should return a non-zero exit code. A use case for example is, a misconfiguration in aws.spc and an assume-role operation fails.
Steampipe version (
steampipe -v
)steampipe version 0.17.4
To reproduce
Install AWS plugin
Add some dummy config to aws.spec
Try and do a query against AWS
Observe the error similar to below (I am running on my local machine here):
Observe the exit code is 0:
Expected behavior
A non-zero exit code is returned
The text was updated successfully, but these errors were encountered: