fix: Don't error on S3 buckets with Object Lock disabled (aws_s3_bucket_object_lock_configurations )#14726
Merged
kodiakhq[bot] merged 2 commits intocloudquery:mainfrom Oct 19, 2023
Merged
Conversation
…3 buckets with Object Lock disabled
erezrokah
approved these changes
Oct 19, 2023
aws_s3_bucket_object_lock_configurations Don't error on S3 buckets with Object Lock disabledaws_s3_bucket_object_lock_configurations )
kodiakhq bot
pushed a commit
that referenced
this pull request
Oct 19, 2023
🤖 I have created a release *beep* *boop* --- ## [22.15.1](plugins-source-aws-v22.15.0...plugins-source-aws-v22.15.1) (2023-10-19) ### Bug Fixes * Add descriptions to JSON schema ([#14647](#14647)) ([e0586fe](e0586fe)) * **deps:** Update github.com/cloudquery/arrow/go/v14 digest to dbcb149 ([#14537](#14537)) ([68686f4](68686f4)) * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.2.9 ([#14627](#14627)) ([c1d244c](c1d244c)) * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.3.0 ([#14635](#14635)) ([00b380c](00b380c)) * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.4.0 ([#14639](#14639)) ([f139c0e](f139c0e)) * **deps:** Update module github.com/cloudquery/codegen to v0.3.8 ([#14532](#14532)) ([1ecef25](1ecef25)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.14.0 ([#14577](#14577)) ([223c4c1](223c4c1)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.15.0 ([#14622](#14622)) ([b497a6b](b497a6b)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.15.2 ([#14662](#14662)) ([e274fe4](e274fe4)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.15.3 ([#14679](#14679)) ([0513c19](0513c19)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.16.1 ([#14721](#14721)) ([1c7ee1d](1c7ee1d)) * Don't error on S3 buckets with Object Lock disabled (`aws_s3_bucket_object_lock_configurations` ) ([#14726](#14726)) ([3328007](3328007)) * Set plugin metadata ([#14715](#14715)) ([39935e2](39935e2)) * Update plugin-SDK to v4.16.0 ([#14702](#14702)) ([0dcb545](0dcb545)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
that referenced
this pull request
Oct 19, 2023
…olicies (`aws_ecr_repository_lifecycle_policies`) (#14730) #### Summary Similar to #14726 . We're calling `GetLifecyclePolicy` for every ECR repository in account and this API will throw an error if a Lifecycle is not configured for said ECR Repository. ``` 3:46PM ERR table resolver finished with error error="operation error ECR: GetLifecyclePolicy, https response error StatusCode: 400, RequestID:(redacted), LifecyclePolicyNotFoundException: Lifecycle policy does not exist for the repository with name '(redacted)' in the registry with id '(redacted)'" client=(redacted) module=aws-src table=aws_ecr_repository_lifecycle_policies ``` I don't think we should treat this as an error from Cloudquerys perspective. <!--
hydratim
pushed a commit
to hydratim/cloudquery
that referenced
this pull request
Oct 20, 2023
…ket_object_lock_configurations` ) (cloudquery#14726) #### Summary When syncing `aws_s3_bucket_object_lock_configurations` we call [GetObjectLockConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html) on every bucket in an AWS account. However, unless Object Lock is enabled on an S3 bucket this endpoint will return a 404 which Cloudquery interprets as an error. As this is an optional feature that I don't think most people will have enabled I believe cloudquery shouldn't treat this as an error. ``` 2:19PM ERR table resolver finished with error error="operation error S3: GetObjectLockConfiguration, https response error StatusCode: 404, RequestID: (redacted), HostID: (redacted), api error ObjectLockConfigurationNotFoundError: Object Lock configuration does not exist for this bucket" client=(redacted) module=aws-src table=aws_s3_bucket_object_lock_configurations` ``` Part of cloudquery#14652
hydratim
pushed a commit
to hydratim/cloudquery
that referenced
this pull request
Oct 20, 2023
🤖 I have created a release *beep* *boop* --- ## [22.15.1](cloudquery/cloudquery@plugins-source-aws-v22.15.0...plugins-source-aws-v22.15.1) (2023-10-19) ### Bug Fixes * Add descriptions to JSON schema ([cloudquery#14647](cloudquery#14647)) ([e0586fe](cloudquery@e0586fe)) * **deps:** Update github.com/cloudquery/arrow/go/v14 digest to dbcb149 ([cloudquery#14537](cloudquery#14537)) ([68686f4](cloudquery@68686f4)) * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.2.9 ([cloudquery#14627](cloudquery#14627)) ([c1d244c](cloudquery@c1d244c)) * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.3.0 ([cloudquery#14635](cloudquery#14635)) ([00b380c](cloudquery@00b380c)) * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.4.0 ([cloudquery#14639](cloudquery#14639)) ([f139c0e](cloudquery@f139c0e)) * **deps:** Update module github.com/cloudquery/codegen to v0.3.8 ([cloudquery#14532](cloudquery#14532)) ([1ecef25](cloudquery@1ecef25)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.14.0 ([cloudquery#14577](cloudquery#14577)) ([223c4c1](cloudquery@223c4c1)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.15.0 ([cloudquery#14622](cloudquery#14622)) ([b497a6b](cloudquery@b497a6b)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.15.2 ([cloudquery#14662](cloudquery#14662)) ([e274fe4](cloudquery@e274fe4)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.15.3 ([cloudquery#14679](cloudquery#14679)) ([0513c19](cloudquery@0513c19)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.16.1 ([cloudquery#14721](cloudquery#14721)) ([1c7ee1d](cloudquery@1c7ee1d)) * Don't error on S3 buckets with Object Lock disabled (`aws_s3_bucket_object_lock_configurations` ) ([cloudquery#14726](cloudquery#14726)) ([3328007](cloudquery@3328007)) * Set plugin metadata ([cloudquery#14715](cloudquery#14715)) ([39935e2](cloudquery@39935e2)) * Update plugin-SDK to v4.16.0 ([cloudquery#14702](cloudquery#14702)) ([0dcb545](cloudquery@0dcb545)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
hydratim
pushed a commit
to hydratim/cloudquery
that referenced
this pull request
Oct 20, 2023
…olicies (`aws_ecr_repository_lifecycle_policies`) (cloudquery#14730) #### Summary Similar to cloudquery#14726 . We're calling `GetLifecyclePolicy` for every ECR repository in account and this API will throw an error if a Lifecycle is not configured for said ECR Repository. ``` 3:46PM ERR table resolver finished with error error="operation error ECR: GetLifecyclePolicy, https response error StatusCode: 400, RequestID:(redacted), LifecyclePolicyNotFoundException: Lifecycle policy does not exist for the repository with name '(redacted)' in the registry with id '(redacted)'" client=(redacted) module=aws-src table=aws_ecr_repository_lifecycle_policies ``` I don't think we should treat this as an error from Cloudquerys perspective. <!--
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When syncing
aws_s3_bucket_object_lock_configurationswe call GetObjectLockConfiguration on every bucket in an AWS account.However, unless Object Lock is enabled on an S3 bucket this endpoint will return a 404 which Cloudquery interprets as an error. As this is an optional feature that I don't think most people will have enabled I believe cloudquery shouldn't treat this as an error.
Part of #14652