-
Notifications
You must be signed in to change notification settings - Fork 816
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: use existing rather than deleted models #9769
fix: use existing rather than deleted models #9769
Conversation
When looking for missing function dependencies on API, a model diff against current backend doesn't work if the model was both added, function added with dependency, and model subsequently removed prior to push. This addresses that by looking to see if functions depend on models not in the backend, rather than diffing against cloud backend
This pull request introduces 1 alert when merging 88dbf9c into f1af5bb - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #9769 +/- ##
=======================================
Coverage 52.99% 52.99%
=======================================
Files 830 830
Lines 45993 46022 +29
Branches 9823 9837 +14
=======================================
+ Hits 24375 24391 +16
- Misses 19600 19613 +13
Partials 2018 2018
Continue to review full report at Codecov.
|
This pull request introduces 1 alert when merging 247aa25 into 2bd4172 - view on LGTM.com new alerts:
|
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.
LGTM
...amplify-category-function/src/provider-utils/awscloudformation/utils/getDependentFunction.ts
Outdated
Show resolved
Hide resolved
...amplify-category-function/src/provider-utils/awscloudformation/utils/getDependentFunction.ts
Outdated
Show resolved
Hide resolved
...y-category-function/src/provider-utils/awscloudformation/utils/updateDependentFunctionCfn.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: John Hockett <jhockett@users.noreply.github.com>
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.
Left some small comments. Mostly LGTM. Please run the linter against these changes.
...amplify-category-function/src/provider-utils/awscloudformation/utils/getDependentFunction.ts
Outdated
Show resolved
Hide resolved
...amplify-category-function/src/provider-utils/awscloudformation/utils/getDependentFunction.ts
Outdated
Show resolved
Hide resolved
...amplify-category-function/src/provider-utils/awscloudformation/utils/getDependentFunction.ts
Outdated
Show resolved
Hide resolved
...y-category-function/src/provider-utils/awscloudformation/utils/updateDependentFunctionCfn.ts
Outdated
Show resolved
Hide resolved
👋 Hi, this pull request was referenced in the v7.6.23 release! Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v7.6.23. |
Description of changes
When looking for missing function dependencies on API, a model diff against current backend doesn't work if the model was both added, function added with dependency, and model subsequently removed prior to push. This addresses that by looking to see if functions depend on models not in the backend, rather than diffing against cloud backend
Issue #, if available
#9553
Description of how you validated changes
Running unit tests, making an application and testing using the original reproduction steps
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.