-
Notifications
You must be signed in to change notification settings - Fork 547
fix(aws): Log Error On Skipped Multiplexer #8799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How does this look like on our playground account? I remember there are quite a few tables that are not supported in all regions so I'm worried this will flood our logs with many warnings |
disq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has the downside of printing warnings whenever a user uses table: ["*"].
I think that's OK
|
With the following config: kind: source
spec:
name: aws
version: v7.3.2
destinations: [postgresql]
path: localhost:7777
registry: grpc
tables: ["aws_*_last_accessed_details"]This seems a bit too much no? If you do all Maybe we can only log if someone explicitly sets a region? |
|
Are we able to check that there's at least 1 match for account-region-service that we will be fetching resources for prior to printing the warn message? |
Not that I am aware of... |
| // Ensure that the region is always set by a region that has been initialized | ||
| if region == "" { | ||
| meta.(*Client).Logger().Trace().Str("accountID", accountID).Str("partition", partition).Msg("no valid regions have been specified for this account") | ||
| if !client.allRegions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do if client.allRegions instead of inverted logic (if !client.allRegions)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the name so its not inverted
erezrokah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few non blocking comments. Thanks for following up @bbernays 🚀
🤖 I have created a release *beep* *boop* --- ## [15.4.0](plugins-source-aws-v15.3.0...plugins-source-aws-v15.4.0) (2023-03-15) ### Features * **aws:** Add AWS EC2 AccountAttributes ([#8937](#8937)) ([90b9b3b](90b9b3b)) * **aws:** Add AWS Organizations Delegated Services ([#8938](#8938)) ([349cf0d](349cf0d)) * **aws:** Add Compute Optimizer Resource ([#8930](#8930)) ([da8cc77](da8cc77)) * **aws:** Add EC2 image launch permissions resource (`aws_ec2_image_launch_permissions`) ([#8689](#8689)) ([025786f](025786f)) * **aws:** Add Support for VPC Service Permissions ([#8808](#8808)) ([05d3342](05d3342)) ### Bug Fixes * **aws-resources-functions:** Save function configuration instead of failing on `AccessDenied` or `AccessDeniedException` errors in `aws_lambda_functions` ([#8870](#8870)) ([ec0b9fd](ec0b9fd)) * **aws:** Fix description for `aws_organizations_delegated_administrators` ([#8935](#8935)) ([2dc6675](2dc6675)) * **aws:** Fixed `aws_ecs_clusters` fetch to include cluster settings ([#9101](#9101)) ([6bc7933](6bc7933)) * **aws:** Log Error On Skipped Multiplexer ([#8799](#8799)) ([ea30c54](ea30c54)) * **deps:** Update module github.com/aws/aws-sdk-go-v2 to v1.17.6 ([#8882](#8882)) ([5fa0031](5fa0031)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/config to v1.18.16 ([#8883](#8883)) ([82ffe4d](82ffe4d)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/feature/ec2/imds to v1.12.24 ([#8885](#8885)) ([674fec4](674fec4)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.11.56 ([#8886](#8886)) ([8a3db4b](8a3db4b)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/internal/ini to v1.3.31 ([#8889](#8889)) ([f8fdb07](f8fdb07)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/internal/v4a to v1.0.22 ([#8890](#8890)) ([3c5b412](3c5b412)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/accessanalyzer to v1.19.6 ([#8891](#8891)) ([b90fb07](b90fb07)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/acm to v1.17.6 ([#8892](#8892)) ([65d5c27](65d5c27)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/amp to v1.16.5 ([#8893](#8893)) ([0adec38](0adec38)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/amplify to v1.13.5 ([#8894](#8894)) ([1f171cc](1f171cc)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/apigateway to v1.16.6 ([#8895](#8895)) ([dd84bc9](dd84bc9)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/apigatewayv2 to v1.13.6 ([#8896](#8896)) ([5699e4b](5699e4b)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/applicationautoscaling to v1.17.6 ([#8897](#8897)) ([1729bed](1729bed)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 to v1.14.5 ([#8898](#8898)) ([f453645](f453645)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/cloudwatch to v1.25.5 ([#8899](#8899)) ([34cbb8d](34cbb8d)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs to v1.20.6 ([#8900](#8900)) ([a19edb4](a19edb4)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/codebuild to v1.20.6 ([#8901](#8901)) ([319ef28](319ef28)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/codepipeline to v1.14.5 ([#8907](#8907)) ([9751c0a](9751c0a)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/cognitoidentity to v1.15.5 ([#8908](#8908)) ([3bc3e3a](3bc3e3a)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider to v1.22.5 ([#8909](#8909)) ([f5dd4cc](f5dd4cc)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/configservice to v1.29.6 ([#8910](#8910)) ([6475fbc](6475fbc)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/dax to v1.12.5 ([#8911](#8911)) ([f7a6c1d](f7a6c1d)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.43.0 ([#8949](#8949)) ([31dfc63](31dfc63)) * Update endpoints ([#8942](#8942)) ([806e490](806e490)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).



Summary
Currently for the AWS plugin, if you specify a region and a table/resource that is not available in that region the user will have to have logs set to
tracein order to get information that a specific region does not support the resource. This PR will:errorlog message, but if it has at least a single region then it will just generate awarninglog message