-
Notifications
You must be signed in to change notification settings - Fork 820
fix: block auth w/ triggers push if not migrated to cli-inputs #12337
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
Conversation
This can cause a breaking change to Cx who are using old templates without migration. |
packages/amplify-category-auth/src/__tests__/utils/legacyAuthConfigHasTriggers.test.ts
Fixed
Show fixed
Hide fixed
Codecov Report❌ Patch coverage is
❌ Your changes status has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes. Additional details and impacted files@@ Coverage Diff @@
## dev #12337 +/- ##
==========================================
- Coverage 49.45% 47.33% -2.12%
==========================================
Files 692 841 +149
Lines 33424 38297 +4873
Branches 6840 7812 +972
==========================================
+ Hits 16529 18129 +1600
- Misses 15370 18524 +3154
- Partials 1525 1644 +119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
one more question , Is prePushHandler called when deploying with amplify init --forcePush ?
@akshbhu It is as of my recent change around failing init --forcePush for missing params |
* chore: complete prefixing cli-core migration * chore: generate api extract and sort package.json * feat(amplify-util-uibuilder): support StorageField (#12386) * feat((amplify-util-uibuilder): support StorageField * chore: update all aws-sdk versions to ^2.1350.0 * fix: revert changes to package.json.ejs * chore: add **/aws-sdk to package.json under resolutions * fix: revert white space changes in package.json.ejs * fix: bump codegen-ui to 2.12.1 * chore: bump lint memory --------- Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Kamil Sobol <[email protected]> * chore: reclassify CFN deployment errors if all the errors are from custom resources (#12398) * chore: reclassify CFN deployment errors if all the errors are from custom resources * fix: run prettier * fix: correctly scope amplify-cli-core * fix: pr review updates * fix: reclassify BucketNotExists error during init-env (#12399) * feat: create new NodeJS functions with nodejs18.x runtime (#12394) * chore: use node 18 in the packaged cli * chore: force prebuild-install to 7.11 * chore: try update * Revert "chore: try update" This reverts commit 6332c61. * chore: disable deprecation flags * chore: try node18 image * chore: more memory * chore: less parallelization * chore: try newer windows * Revert "chore: try newer windows" This reverts commit 59d5e6d. * chore: install node 18 on windows * chore: install node 18 on windows * chore: try this * chore: try this * chore: try this * chore: try this * Revert "Revert "chore: try newer windows"" This reverts commit dcac927. * chore: try this * chore: try this * chore: consolidate steps * chore: parallel in UT * chore: parallel in UT * chore: remove dotnet migration test * chore: fix results script * chore: fix dotnet * chore: install create react app * chore: allow old ssl * Revert "chore: allow old ssl" This reverts commit 08d03f9. * chore: use new react scripts * chore: poke ci * chore: fix init test * chore: use usual ECR repo * chore: use previous windows image * Revert "chore: use previous windows image" This reverts commit f3299f1. * chore: update pkg * chore: remove sequential promise * chore: run this in us west * Revert "chore: remove sequential promise" This reverts commit f053413. * chore: wait for selection * chore: wait for selection * chore: wait for selection * chore: wait for choice first * feat: generate nodejs18 lambdas * chore: dont use modules * chore: undo that * chore: make crud work * chore: fix test * chore: fix that test * chore: refactor imports * chore: fix test * chore: fix test * chore: fix test * chore: fix test * chore: fix test * chore: add nodejs12.x to migrate from * chore: fix test * chore: fix test * chore: test nodejs crud * chore: update tests * chore: pr feedback * fix: block auth w/ triggers push if not migrated to cli-inputs (#12337) * fix: catch undefined LogicalName when Lambda Layer versions are deleted from the console (#12351) * fix: throw a descriptive AmplifyError when an existing lambda layer LogicalName is undefined * chore: migrate missing files * chore: fixing failing tests * chore: sort package.json * chore: complete prefixing cli-core migration * chore: regenerate yarn.lock and address codeQL warnings * chore: lint file --------- Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Kamil Sobol <[email protected]> Co-authored-by: Amplifiyer <[email protected]> Co-authored-by: Edward Foyle <[email protected]> Co-authored-by: Spencer Stolworthy <[email protected]>
* chore: complete prefixing cli-core migration * chore: generate api extract and sort package.json * feat(amplify-util-uibuilder): support StorageField (aws-amplify#12386) * feat((amplify-util-uibuilder): support StorageField * chore: update all aws-sdk versions to ^2.1350.0 * fix: revert changes to package.json.ejs * chore: add **/aws-sdk to package.json under resolutions * fix: revert white space changes in package.json.ejs * fix: bump codegen-ui to 2.12.1 * chore: bump lint memory --------- Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Kamil Sobol <[email protected]> * chore: reclassify CFN deployment errors if all the errors are from custom resources (aws-amplify#12398) * chore: reclassify CFN deployment errors if all the errors are from custom resources * fix: run prettier * fix: correctly scope amplify-cli-core * fix: pr review updates * fix: reclassify BucketNotExists error during init-env (aws-amplify#12399) * feat: create new NodeJS functions with nodejs18.x runtime (aws-amplify#12394) * chore: use node 18 in the packaged cli * chore: force prebuild-install to 7.11 * chore: try update * Revert "chore: try update" This reverts commit 6332c61. * chore: disable deprecation flags * chore: try node18 image * chore: more memory * chore: less parallelization * chore: try newer windows * Revert "chore: try newer windows" This reverts commit 59d5e6d. * chore: install node 18 on windows * chore: install node 18 on windows * chore: try this * chore: try this * chore: try this * chore: try this * Revert "Revert "chore: try newer windows"" This reverts commit dcac927. * chore: try this * chore: try this * chore: consolidate steps * chore: parallel in UT * chore: parallel in UT * chore: remove dotnet migration test * chore: fix results script * chore: fix dotnet * chore: install create react app * chore: allow old ssl * Revert "chore: allow old ssl" This reverts commit 08d03f9. * chore: use new react scripts * chore: poke ci * chore: fix init test * chore: use usual ECR repo * chore: use previous windows image * Revert "chore: use previous windows image" This reverts commit f3299f1. * chore: update pkg * chore: remove sequential promise * chore: run this in us west * Revert "chore: remove sequential promise" This reverts commit f053413. * chore: wait for selection * chore: wait for selection * chore: wait for selection * chore: wait for choice first * feat: generate nodejs18 lambdas * chore: dont use modules * chore: undo that * chore: make crud work * chore: fix test * chore: fix that test * chore: refactor imports * chore: fix test * chore: fix test * chore: fix test * chore: fix test * chore: fix test * chore: add nodejs12.x to migrate from * chore: fix test * chore: fix test * chore: test nodejs crud * chore: update tests * chore: pr feedback * fix: block auth w/ triggers push if not migrated to cli-inputs (aws-amplify#12337) * fix: catch undefined LogicalName when Lambda Layer versions are deleted from the console (aws-amplify#12351) * fix: throw a descriptive AmplifyError when an existing lambda layer LogicalName is undefined * chore: migrate missing files * chore: fixing failing tests * chore: sort package.json * chore: complete prefixing cli-core migration * chore: regenerate yarn.lock and address codeQL warnings * chore: lint file --------- Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Kamil Sobol <[email protected]> Co-authored-by: Amplifiyer <[email protected]> Co-authored-by: Edward Foyle <[email protected]> Co-authored-by: Spencer Stolworthy <[email protected]>
* chore: complete prefixing cli-core migration * chore: generate api extract and sort package.json * feat(amplify-util-uibuilder): support StorageField (aws-amplify#12386) * feat((amplify-util-uibuilder): support StorageField * chore: update all aws-sdk versions to ^2.1350.0 * fix: revert changes to package.json.ejs * chore: add **/aws-sdk to package.json under resolutions * fix: revert white space changes in package.json.ejs * fix: bump codegen-ui to 2.12.1 * chore: bump lint memory --------- Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Kamil Sobol <[email protected]> * chore: reclassify CFN deployment errors if all the errors are from custom resources (aws-amplify#12398) * chore: reclassify CFN deployment errors if all the errors are from custom resources * fix: run prettier * fix: correctly scope amplify-cli-core * fix: pr review updates * fix: reclassify BucketNotExists error during init-env (aws-amplify#12399) * feat: create new NodeJS functions with nodejs18.x runtime (aws-amplify#12394) * chore: use node 18 in the packaged cli * chore: force prebuild-install to 7.11 * chore: try update * Revert "chore: try update" This reverts commit 6332c61. * chore: disable deprecation flags * chore: try node18 image * chore: more memory * chore: less parallelization * chore: try newer windows * Revert "chore: try newer windows" This reverts commit 59d5e6d. * chore: install node 18 on windows * chore: install node 18 on windows * chore: try this * chore: try this * chore: try this * chore: try this * Revert "Revert "chore: try newer windows"" This reverts commit dcac927. * chore: try this * chore: try this * chore: consolidate steps * chore: parallel in UT * chore: parallel in UT * chore: remove dotnet migration test * chore: fix results script * chore: fix dotnet * chore: install create react app * chore: allow old ssl * Revert "chore: allow old ssl" This reverts commit 08d03f9. * chore: use new react scripts * chore: poke ci * chore: fix init test * chore: use usual ECR repo * chore: use previous windows image * Revert "chore: use previous windows image" This reverts commit f3299f1. * chore: update pkg * chore: remove sequential promise * chore: run this in us west * Revert "chore: remove sequential promise" This reverts commit f053413. * chore: wait for selection * chore: wait for selection * chore: wait for selection * chore: wait for choice first * feat: generate nodejs18 lambdas * chore: dont use modules * chore: undo that * chore: make crud work * chore: fix test * chore: fix that test * chore: refactor imports * chore: fix test * chore: fix test * chore: fix test * chore: fix test * chore: fix test * chore: add nodejs12.x to migrate from * chore: fix test * chore: fix test * chore: test nodejs crud * chore: update tests * chore: pr feedback * fix: block auth w/ triggers push if not migrated to cli-inputs (aws-amplify#12337) * fix: catch undefined LogicalName when Lambda Layer versions are deleted from the console (aws-amplify#12351) * fix: throw a descriptive AmplifyError when an existing lambda layer LogicalName is undefined * chore: migrate missing files * chore: fixing failing tests * chore: sort package.json * chore: complete prefixing cli-core migration * chore: regenerate yarn.lock and address codeQL warnings * chore: lint file --------- Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Hein Jeong <[email protected]> Co-authored-by: Kamil Sobol <[email protected]> Co-authored-by: Amplifiyer <[email protected]> Co-authored-by: Edward Foyle <[email protected]> Co-authored-by: Spencer Stolworthy <[email protected]>
Description of changes
Adds a prePush handler to the auth category that checks to make sure the auth config is migrated from < v7 config (parameters.json) to the current config (cli-inputs.json). If not migrated, the push is stopped and instructions for migration are printed.
Issue #, if available
fixes #9750
Description of how you validated changes
Manually tested and added a unit test. Existing e2e tests running here https://app.circleci.com/pipelines/github/aws-amplify/amplify-cli?branch=run-e2e%2Ffoyleef%2Ffail-fast-migration
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.