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

fix: set secretsPathAmplfiyAppId on initEnv when function has secrets #9853

Merged
merged 3 commits into from
Feb 25, 2022

Conversation

edwardfoyle
Copy link
Member

Description of changes

When pulling or checking out a new environment that had a function with secrets configured, the secretsPathAmplifyAppId parameter was not being populated in team-provider-info.json. This causes push failures when the parameter cannot be resolved.

The fix updates the function category initEnv logic to copy the appId from amplify-meta.json into the correct location in team-provider-info.json on init env. This follows the same patter for updating the s3 bucket and key for the function zip asset.

Issue #, if available

fixes #8513

Description of how you validated changes

Unit test and manually verified that pulling a project into a new directory and then pushing works.

Checklist

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 February 24, 2022 22:14
@edwardfoyle edwardfoyle changed the title Sec app fix: set secretsPathAmplfiyAppId on initEnv when function has secrets Feb 24, 2022
Copy link
Contributor

@sachscode sachscode left a comment

Choose a reason for hiding this comment

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

LGTM , a few nits

packages/amplify-category-function/src/index.ts Outdated Show resolved Hide resolved
Co-authored-by: John Hockett <jhockett@users.noreply.github.com>
@sachscode sachscode merged commit 735854f into aws-amplify:master Feb 25, 2022
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

👋 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.

@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
referenced-in-release Issues referenced in a published release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing secretsPathAmplifyAppId when trying Save and Deploy in DataStore
3 participants