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

feat: Custom Resource to Perform Manual Merge of a Source API And Signal Cl… #238

Merged
merged 10 commits into from
Oct 7, 2023
Merged

Conversation

ndejaco2
Copy link
Contributor

@ndejaco2 ndejaco2 commented Oct 2, 2023

This feature allows the source API owner to ensure that when merge conflicts are introduced, the Cloudformation stack update would fail and cause a rollback. Otherwise, if the merge is successful, the team knows that the updates were successfully applied to the merged API.

The SourceApiAssociationMergeOperationProvider construct creates the Lambda handlers for submitting the merge operation and ensuring that it succeeded or failed.
The SourceApiAssociationMergeOperation construct provides the ability to merge a source api to a Merged Api, invoking a merge within a Cloudformation custom
resource. If the merge operation fails with a conflict, the Cloudformation update will fail and rollback the changes to the source API in the stack. This constructs accepts a merge operation provider which allows the customer to customize the default SourceApiAssociationMergeOperationProvider class if they desire and ensures that we only require a single provider that can be used across multiple merge operations.

Closes aws/aws-cdk#27170, we decided to implement the functionality here instead of in cdk package itself for now.

…oudformation Based On Merge Operation Result
@ndejaco2 ndejaco2 changed the title Custom Resource to Perform Manual Merge of a Source API And Signal Cl… (feat): Custom Resource to Perform Manual Merge of a Source API And Signal Cl… Oct 2, 2023
@ndejaco2 ndejaco2 changed the title (feat): Custom Resource to Perform Manual Merge of a Source API And Signal Cl… feat: Custom Resource to Perform Manual Merge of a Source API And Signal Cl… Oct 2, 2023
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@MrArnoldPalmer MrArnoldPalmer left a comment

Choose a reason for hiding this comment

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

This is pretty close, just a question on the provider instantiation. I don't really have additional feedback beyond that we should in the future migrate away from NodeJSFunction usage and package the lambda handlers ourselves as part of publishing this library. That way a user won't have to wait for esbuild to build our handler when using this construct.

That isn't a hard requirement for merging but definitely something we should add.

@ndejaco2
Copy link
Contributor Author

ndejaco2 commented Oct 5, 2023

This is pretty close, just a question on the provider instantiation. I don't really have additional feedback beyond that we should in the future migrate away from NodeJSFunction usage and package the lambda handlers ourselves as part of publishing this library. That way a user won't have to wait for esbuild to build our handler when using this construct. That isn't a hard requirement for merging but definitely something we should add.

Sounds good. I plan on removing it as soon as the latest version of sdk gets into the lambda runtime. Today its on an older version that does not include these new apis in appsync client.

@mergify mergify bot merged commit 94c7f29 into cdklabs:main Oct 7, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants