-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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): modify application manager url to string #24209
Conversation
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.
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.
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Name: 'RAMShare5bb637032063', | ||
Name: 'RAMSharee6e0e560e6f8', |
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.
Why has this been changed?
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.
I don't know why the unique ID is changed in this unit test. And it seems all the unique IDs are changed.
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 is because the hash is calculated from the application object. If the application object structure changes, the hash will change.
this.applicationManagerUrl = new cdk.CfnOutput(this, 'ApplicationManagerUrl', { | ||
value: `https://${this.env.region}.console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-${this.applicationName}`, | ||
description: 'Application manager url for the application created.', | ||
}); | ||
this.applicationManagerUrl = | ||
`https://${this.env.region}.console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-${this.applicationName}`; |
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.
@santanugho what do you think of this change? Why did you originally propose this to be a CfnOutput
?
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 defeats the purpose of providing easier access to the application URL when the application is created through TargetApplication.createApplicationStack
. Since the application creation is implicit in TargetApplication
constructs instead of new Application()
.
A new pull request #24386 was create to expose this URL as CFN output on the stack defined by TargetApplication.createApplicationStack
construct, where the application is created later for stack/stage association. That got closed as duplicate.
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.
It seems like this original design choice was not really the right choice here. Sure, it's easier for certain use cases to make this a CfnOutput
, but it seems that there are use cases to do otherwise as well.
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.
TargetApplication
& ApplicationAssociator
are intended to be included into default cdk template through cdk init
, therefore all the cdk users can easily use the feature: all the stacks deployed by the cdk package can be contained in one application .
TargetApplication.createApplicationStack
creates a new stack, defined by aws-servicecatalogappregistry, in customers account where an application is created.
For the customers who are onboard with ApplicationAssociator
construct, the service team wants to provide an easier console access to the application created implicitly through TargetApplication.createApplicationStack
. Therefore customers can view the application and its associated stacks without further cdk code change. Therefore the service team chose to expose the URL as CFN output in the stack, so that the console access to the application can be easily obtained. Since the CFN output stays in the stack fully managed by the aws-servicecatalogappregistry
constructs, it was considered to be minimal customer impacting.
Is there any other suggestion to expose the URL while having minimal customer intervention?
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.
I think there is a middle ground we can take:
- Make
Application
construct having applicationManagerUrl as string type so that customers can use it to create CFN Output as needed. - In
TargetApplication
construct,createApplicationStack
will useapplicationManagerUrl
property to create the CFN Output in the Stack created by the CDK construct.
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.
Is there any other suggestion to expose the URL while having minimal customer intervention?
You can always make a boolean option: emitConsoleUrlAsOutput?: boolean
.
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.
Your proposal seems like a good middle ground.
But you will always have to contend with customer opinion, which means making it configurable. I don't mind the default being true
, as long as it can be switched off for those who care.
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.
Thanks for your comments, new PR is published: #24483
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
public readonly applicationManagerUrl?: cdk.CfnOutput; | ||
public readonly applicationManagerUrl?: string; |
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 is good, should have always been the case.
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
4 similar comments
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
Looks like this update has now been made in a separate PR. Closing this one. |
Done
Closes #23779.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license