Skip to content
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

fix(cognito-identitypool-alpha): prevent stacks from not deploying correctly #33609

Merged
merged 2 commits into from
Feb 27, 2025

Conversation

Leo10Gama
Copy link
Member

@Leo10Gama Leo10Gama commented Feb 27, 2025

Issue # (if applicable)

Closes #33510

Reason for this change

A previous change (PR33305) removed the IdentityPoolRoleAttachment L2 construct, which also changed the creation logic of the default role attachment in the IdentityPool L2. This not only triggered redeployments, but did not allow for redeployment at all, as the new role attachment (with a different resource hash) was trying to be created before the old one was removed. This led to failed deployments, as only one role attachment can exist per identity pool.

Description of changes

Brought back the IdentityPoolRoleAttachment L2 logic to prevent redeployment for customers using CDK <v2.179.0. However, the construct is now no longer being exported, which preserves the original intention of preventing confusion about using this resource.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

yarn test && yarn integ test/integ.identitypool.js --update-on-failed

Checklist

BREAKING CHANGE: Any IdentityPool resources deployed in versions >=2.179.0 will now fail to deploy. You will need to delete the IdentityPoolRoleAttachment from your stack via the console before redeploying.


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

@aws-cdk-automation aws-cdk-automation requested a review from a team February 27, 2025 18:23
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p1 labels Feb 27, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 27, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.21%. Comparing base (dd0d62f) to head (a753451).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #33609   +/-   ##
=======================================
  Coverage   82.21%   82.21%           
=======================================
  Files         119      119           
  Lines        6876     6876           
  Branches     1162     1162           
=======================================
  Hits         5653     5653           
  Misses       1120     1120           
  Partials      103      103           
Flag Coverage Δ
suite.unit 82.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk ∅ <ø> (∅)
packages/aws-cdk-lib/core 82.21% <ø> (ø)

@Leo10Gama Leo10Gama changed the title fix(cognito-identitypool-alpha): Prevent stacks from not deploying correctly fix(cognito-identitypool-alpha): prevent stacks from not deploying correctly Feb 27, 2025
@Leo10Gama
Copy link
Member Author

Exemption Request: The snapshot has been updated

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Feb 27, 2025
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 27, 2025
@Leo10Gama
Copy link
Member Author

For the sake of completeness, this avoids redeployments with versions <2.179.0, as the previous PR shows an identical resource name:

identitypoolDefaultRoleAttachment6BCAB114

...which is identical to what these changes result in it being.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 27, 2025
Copy link
Contributor

@xazhao xazhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Leo10Gama Leo10Gama added pr-linter/exempt-integ-test The PR linter will not require integ test changes and removed pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. labels Feb 27, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 27, 2025 19:34

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Copy link
Contributor

mergify bot commented Feb 27, 2025

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 e220bc8 into aws:main Feb 27, 2025
61 checks passed
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p1 pr-linter/exempt-integ-test The PR linter will not require integ test changes
Projects
None yet
4 participants