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(servicecatalogappregistry): RAM Share is replaced on every change to Application #24760

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

liwewang-amazon
Copy link
Contributor

@liwewang-amazon liwewang-amazon commented Mar 23, 2023

Application.shareApplication can be called multiple times which generates different resources within the same Application construct. The share construct id generation was based on child length of Application construct. This makes every change to the Application construct can unnecessarily replace the RAM share when the share actually needs no update.

Similar to the solution for addAttributeGroup introduced in the previous update, this commit starts to require both construct id and share name in the Application.shareApplication method input, which are used to create RAM share construct.

For ApplicationAssociator, Application.shareApplication is called for cross-account stack associations. Share construct id depends on the node unique id of the application in ApplicationAssociator and the node unique id of the stack to be associated. This reduces unnecessary share replacement in ApplicationAssociator stack.

BREAKING CHANGE: This commit involves share replacement during the deployment of ApplicationAssociator due to share construct id update. After this change, frequent share replacements due to structural change in Application construct should be avoided. Application.shareApplication starts to require construct id (first argument) and share name (added in ShareOption) as input.


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

<body>

Testing done
-------------------------------------
*

Related items
------------------------------------
* SIM/auto-cut ticket
<body>

Testing done
-------------------------------------
*

Related items
------------------------------------
* SIM/auto-cut ticket
<body>

Testing done
-------------------------------------
*

Related items
------------------------------------
* SIM/auto-cut ticket
<body>

Testing done
-------------------------------------
*

Related items
------------------------------------
* SIM/auto-cut ticket
@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Mar 23, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team March 23, 2023 06:09
@liwewang-amazon liwewang-amazon changed the title fix(servicecatalog): change application share construct id and name generation. fix(servicecatalogappregistry): change application share construct id and name generation. Mar 23, 2023
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.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation dismissed their stale review March 23, 2023 06:22

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

@liwewang-amazon liwewang-amazon marked this pull request as ready for review March 23, 2023 06:54
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

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

Please make sure that your PR title confirms to the conventional commit standard (fix, feat, chore) and that it is written in a style that will reflect correctly in the change log. In particular, if this is a bug fix, please describe the bug that was fixed, not the change you made (See Contributing Guide, Pull Requests)

@liwewang-amazon liwewang-amazon changed the title fix(servicecatalogappregistry): change application share construct id and name generation. fix(servicecatalogappregistry): Application RAM Share is unnecesarry replaced after Application construct update. Mar 23, 2023
@rix0rrr rix0rrr changed the title fix(servicecatalogappregistry): Application RAM Share is unnecesarry replaced after Application construct update. fix(servicecatalogappregistry): RAM Share replaced on every change to Application Mar 23, 2023
@rix0rrr rix0rrr changed the title fix(servicecatalogappregistry): RAM Share replaced on every change to Application fix(servicecatalogappregistry): RAM Share is replaced on every change to Application Mar 23, 2023
@mergify
Copy link
Contributor

mergify bot commented Mar 23, 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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify mergify bot merged commit 8977d0d into aws:main Mar 23, 2023
@mergify
Copy link
Contributor

mergify bot commented Mar 23, 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).

@liwewang-amazon liwewang-amazon deleted the share_name branch March 27, 2023 23:22
homakk pushed a commit to homakk/aws-cdk that referenced this pull request Mar 28, 2023
… to Application (aws#24760)

`Application.shareApplication` can be called multiple times which generates different resources within the same `Application` construct. The share construct id generation was based on child length of `Application` construct. This makes every change to the `Application` construct can unnecessarily replace the RAM share when the share actually needs no update.

Similar to the solution for `addAttributeGroup` introduced in the [previous update](aws#24672), this commit starts to require both construct id and share name in the `Application.shareApplication` method input, which are used to create RAM share construct.

For `ApplicationAssociator`, `Application.shareApplication` is called for cross-account stack associations. Share construct id depends on the node unique id of the application in `ApplicationAssociator` and the node unique id of the stack to be associated. This reduces unnecessary share replacement in `ApplicationAssociator` stack.

BREAKING CHANGE: This commit involves share replacement during the deployment of `ApplicationAssociator` due to share construct id update. After this change, frequent share replacements due to structural change in `Application` construct should be avoided. `Application.shareApplication` starts to require construct id (first argument) and share name (added in `ShareOption`) as input.

----

*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
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants