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

Add schema breaking change detection hook for AWS::AppSync::GraphQLSchema #243

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

ndejaco2
Copy link
Contributor

@ndejaco2 ndejaco2 commented Oct 6, 2023

Issue #, if available:

Description of changes:
Add AppSync_BreakingChangeDetection hook. This hook compares the old AWS::AppSync::GraphQLSchema with the new AWS::AppSync::GraphQLSchema pre-update and determines whether there is a breaking change or not. Breaking changes are ones that are not backwards compatible with existing clients such as removing a field or type.

Tests output excerpts

Unit tests excerpts

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  28.444 s
[INFO] Finished at: 2023-10-06T14:03:30-07:00
[INFO] ------------------------------------------------------------------------

Contract tests excerpts

% cfn test -v --enforce-timeout 90
collected 24 items / 20 deselected / 4 selected                                

../../../../../../private/var/folders/dk/p_tlf23j3nj67z5kgkq_bzv9p_sb_d/T/hook/handler_pre_update.py::contract_pre_update_success PASSED [ 25%]
../../../../../../private/var/folders/dk/p_tlf23j3nj67z5kgkq_bzv9p_sb_d/T/hook/handler_pre_update.py::contract_pre_update_failed PASSED [ 50%]
../../../../../../private/var/folders/dk/p_tlf23j3nj67z5kgkq_bzv9p_sb_d/T/hook/handler_pre_update.py::contract_pre_update_failed_unsupported_target SKIPPED [ 75%]
../../../../../../private/var/folders/dk/p_tlf23j3nj67z5kgkq_bzv9p_sb_d/T/resource/handler_misc.py::contract_check_asserts_work PASSED [100%]

================= 3 passed, 1 skipped, 20 deselected in 58.02s =================

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@ericzbeard ericzbeard left a comment

Choose a reason for hiding this comment

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

This looks very useful! I don't see any issues other than potentially breaking other hooks with the change from corretto8 to 11 in the buildspec.

@ericzbeard ericzbeard requested review from mrinaudo-aws and removed request for mrinaudo-aws October 10, 2023 16:27
@ericzbeard ericzbeard merged commit 14d3b96 into aws-cloudformation:main Oct 10, 2023
90 of 148 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
Development

Successfully merging this pull request may close these issues.

2 participants