Skip to content

feat(servicecatalog): Add stack event notification constraint#15610

Merged
mergify[bot] merged 9 commits intoaws:masterfrom
arcrank:add_notifs
Jul 20, 2021
Merged

feat(servicecatalog): Add stack event notification constraint#15610
mergify[bot] merged 9 commits intoaws:masterfrom
arcrank:add_notifs

Conversation

@arcrank
Copy link
Copy Markdown
Contributor

@arcrank arcrank commented Jul 16, 2021

Add stack event notification constraint.
Allows users to subscribe AWS SNS topics to stack updates on their products.


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

Co-authored-by: Dillon Ponzo dponzo18@gmail.com

@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Jul 16, 2021

Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

Looks great! A few minor comments.

* @param product A service catalog product.
* @param topics A list of SNS Topics to receive notifications on events related to the provisioned product.
*/
addEventNotifications(product: IProduct, topics: sns.ITopic[], options?: CommonConstraintOptions): void;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Not a huge fan of this name. How about notify(Topic(s))On(Stack)Events()?
  2. I don't love the ergonomics of the topics parameter right now - if the most common case is subscribing a single Topic to the events, like I suspect it is, it's not very easy. Maybe we should have two methods - one with a singular name (notifyTopicOnStackEvents()) that takes in a single sns.Topic, and one with a plural name (notifyTopicsOnStackEvents()) that takes in sns.Topic[]?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  1. sure - I liked the notify verbiage but didn't like what I had for what would be the stackEvents part. I also thought maybe something like subscribeToEvents.
  2. I got my guidance before based on the original construct which took a list. I don't have many good examples, but using the singular version might be easier here if that hypothesis is true. For one it simplifies the code since we don't need the for loop. The only concern I had was that if you had more than one topic and more than one portfolio-product association it would get very not DRY. Adding just the singular version first sounds fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed this to singular.

@mergify mergify bot dismissed skinny85’s stale review July 19, 2021 15:16

Pull request has been modified.

@arcrank arcrank changed the title feat(servicecatalog): Add event notification constraint feat(servicecatalog): Add stack event notification constraint Jul 19, 2021
@arcrank
Copy link
Copy Markdown
Contributor Author

arcrank commented Jul 20, 2021

is this good to go?

@arcrank arcrank requested a review from skinny85 July 20, 2021 13:22
@skinny85
Copy link
Copy Markdown
Contributor

is this good to go?

Could you resolve the conflicts with master? I assume they happened because of merging #15612 first.

Aidan Crank and others added 5 commits July 20, 2021 12:30
Add event notification constraint.
Allows users to subscribe AWS `SNS` topics to stack updates on their products.

Co-authored-by: Dillon Ponzo <dponzo18@gmail.com>
@arcrank
Copy link
Copy Markdown
Contributor Author

arcrank commented Jul 20, 2021

fixed, didn't see merge conflicts before.

Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

Looks great!

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 20, 2021

Thank you for contributing! Your pull request will be updated from master 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
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 1b69697
  • 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 4e40db3 into aws:master Jul 20, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 20, 2021

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

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Aug 3, 2021
)

Add stack event notification constraint.
Allows users to subscribe AWS `SNS` topics to stack updates on their products.

----

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


Co-authored-by: Dillon Ponzo <dponzo18@gmail.com>
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
)

Add stack event notification constraint.
Allows users to subscribe AWS `SNS` topics to stack updates on their products.

----

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


Co-authored-by: Dillon Ponzo <dponzo18@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants