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: Update GuApplicationListener with revised logicalId logic #423

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

akash1810
Copy link
Member

What does this change?

In #364 we placed the logic of overriding a construct's logicalId into a single place.

In this change, we're updating the GuApplicationListener construct to adopt the new logic. As of #418 it's as simple as using the GuStatefulMigratableConstruct mixin!

The logicalId logic currently in GuApplicationListener is very complicated with multiple paths to overriding the logicalId.

This is massively simplified, as evidenced in the updated tests.

This is the first in a series of PRs to adopt the new logic. Hopefully this multi PR approach is better than the previous monster PR (#400)!

Does this change require changes to existing projects or CDK CLI?

Possibly.

The overriding logic in GuApplicationListener has changed. If stacks are making use of the current (broken?) logic, they will need to be attended to.

How to test

See tests?

How can we measure success?

A simpler, DRYer, code base?

Have we considered potential risks?

As noted above, the path to update to the next version of the library might require a bit of attention.

In #364 we placed the logic of overriding a construct's logicalId into a single place.

In this change, we're updating the `GuApplicationListener` construct to adopt the new logic. As of #418 it's as simple as using the `GuStatefulMigratableConstruct` mixin!

The logicalId logic currently in `GuApplicationListener` is very complicated with multiple paths to overriding the logicalId.

This is massively simplified, as evidenced in the updated tests.
@akash1810 akash1810 requested a review from a team April 12, 2021 12:49

export class GuApplicationListener extends ApplicationListener {
export class GuApplicationListener extends GuStatefulMigratableConstruct(ApplicationListener) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Did not know this is a thing, nice!

Copy link
Member Author

@akash1810 akash1810 Apr 12, 2021

Choose a reason for hiding this comment

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

It's new 😄 - #418.

Copy link
Contributor

@stephengeller stephengeller left a comment

Choose a reason for hiding this comment

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

Took me a second to catch up on the new override ID logic works, but this works nicely.

@akash1810 akash1810 merged commit ae3c3d6 into main Apr 12, 2021
@akash1810 akash1810 deleted the aa-GuApplicationListener-logicalId branch April 12, 2021 17:43
@github-actions
Copy link
Contributor

🎉 This PR is included in version 8.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants