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: add resource parameter map to backend-config.json #11417

Merged
merged 22 commits into from
Dec 1, 2022

Conversation

edwardfoyle
Copy link
Member

@edwardfoyle edwardfoyle commented Nov 16, 2022

Description of changes

Places a map of parameter names and which resources they relate to in the backend-config.json file. There are a few oddities with how this had to be implemented:

  1. There are some places where the keys of the backend-config.json file is used as a list of categories (such as in amplify status) so I modified stateManager.getBackendConfig to only return the parameters key if a special flag is specified. This flag is only used by the new parameter map manager class.
  2. Writing backend-config.json to disk is not stable -- the same object may be serialized with keys in different order depending on how the object was constructed. A new flag has been added to JSONUtilities.stringify to specify that object keys should be sorted to ensure deterministic serialization
  3. The above had the side effect of changing how the types file for custom resources is generated so that is also modified to use the stable flag in JSONUtilities (and removed an ejs template in the process)

Issue #, if available

Description of how you validated changes

Added unit tests and existing e2e tests pass

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

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

@edwardfoyle edwardfoyle requested a review from a team as a code owner November 16, 2022 23:45
@edwardfoyle edwardfoyle changed the title Param map feat: add resource parameter map to backend-config.json Nov 16, 2022
@lgtm-com
Copy link

lgtm-com bot commented Nov 16, 2022

This pull request fixes 1 alert when merging 024922d into 5ebbc72 - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

jhockett
jhockett previously approved these changes Nov 17, 2022
@lgtm-com
Copy link

lgtm-com bot commented Nov 17, 2022

This pull request fixes 1 alert when merging 613a3dc into 1dc42ba - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

jhockett
jhockett previously approved these changes Nov 17, 2022
sobolk
sobolk previously approved these changes Nov 18, 2022
@lgtm-com
Copy link

lgtm-com bot commented Nov 18, 2022

This pull request fixes 1 alert when merging def0462 into e9fb32f - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

jhockett
jhockett previously approved these changes Nov 18, 2022
@danielleadams
Copy link
Contributor

@edwardfoyle you have some merge conflicts.

@edwardfoyle edwardfoyle dismissed stale reviews from jhockett and sobolk via 4ac718e November 18, 2022 22:38
@lgtm-com
Copy link

lgtm-com bot commented Nov 18, 2022

This pull request fixes 1 alert when merging 4ac718e into b5a8783 - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

jhockett
jhockett previously approved these changes Nov 19, 2022
sobolk
sobolk previously approved these changes Nov 19, 2022
@edwardfoyle edwardfoyle dismissed stale reviews from sobolk and jhockett via 1be51ed November 19, 2022 00:44
@lgtm-com
Copy link

lgtm-com bot commented Nov 19, 2022

This pull request fixes 1 alert when merging 1be51ed into 7d17da9 - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@edwardfoyle edwardfoyle merged commit 6500436 into aws-amplify:dev Dec 1, 2022
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.

None yet

4 participants