Skip to content

fix(s3): auto-delete-objects fails when bucket doesn't exist#26433

Merged
mergify[bot] merged 8 commits intomainfrom
mrgrain/fix/auto-delete-obejects-no-bucket
Jul 19, 2023
Merged

fix(s3): auto-delete-objects fails when bucket doesn't exist#26433
mergify[bot] merged 8 commits intomainfrom
mrgrain/fix/auto-delete-obejects-no-bucket

Conversation

@mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Jul 19, 2023

The AutoDeleteObjects Custom Resource should pass when the bucket doesn't exist.

With #16756 we introduced a safety check to only delete buckets that are marked for object-deletion.
This check would unintentionally bypass the special case to mark the CR deletion as successful when the bucket doesn't exist.
Additionally, with the upgrade to SDK v3 we need to change the check from error.code to check for the actual error instance.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Jul 19, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team July 19, 2023 14:39
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 19, 2023
@mrgrain mrgrain added the pr/do-not-merge This PR should not be merged at this time. label Jul 19, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 707dda5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mrgrain mrgrain removed the pr/do-not-merge This PR should not be merged at this time. label Jul 19, 2023
@mergify
Copy link
Contributor

mergify bot commented Jul 19, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 228901a into main Jul 19, 2023
@mergify mergify bot deleted the mrgrain/fix/auto-delete-obejects-no-bucket branch July 19, 2023 23:38
bmoffatt pushed a commit to bmoffatt/aws-cdk that referenced this pull request Jul 29, 2023
The AutoDeleteObjects Custom Resource should pass when the bucket doesn't exist.

With aws#16756 we introduced a safety check to only delete buckets that are marked for object-deletion.
This check would unintentionally bypass the special case to mark the CR deletion as successful when the bucket doesn't exist.
Additionally, with the upgrade to SDK v3 we need to change the check from `error.code` to check for the actual error instance.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot pushed a commit that referenced this pull request Aug 2, 2023
Just fixing this in the same way as #26433


----


*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants