amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

fix(amplify-category-function): add default pramater value

Open tkasuz opened this issue 3 years ago • 1 comments
trafficstars

Description of changes

  • Add Lambda Env variable to not only team-provider-info.json but also CloudFormation default parameter value, which will avoid deployment error when enabling auto branch detection on Amplify Hosting

Issue #, if available

#10970

Description of how you validated changes

  • amplify add env
  • amplify add function with environment variables
  • deleted the value of the environment variable at team-provider-info.json to reproduce the condition of Amplify Hosting
  • successfully deployed

changed the value of the environment variable at team-provider-info.json like below

"categories": {
      "function": {
        "resourceName": {
          "key": {}
        }
      }

Checklist

  • [x] PR description included
  • [x] yarn test passes
  • [x] 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

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

tkasuz avatar Sep 06 '22 06:09 tkasuz

Codecov Report

Merging #10971 (e2c4273) into dev (fb2ba7b) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev   #10971   +/-   ##
=======================================
  Coverage   47.81%   47.81%           
=======================================
  Files         669      669           
  Lines       32671    32671           
  Branches     6600     6600           
=======================================
+ Hits        15621    15622    +1     
+ Misses      15420    15419    -1     
  Partials     1630     1630           
Impacted Files Coverage Δ
...cloudformation/utils/environmentVariablesHelper.ts 58.79% <100.00%> (ø)
...li/src/domain/amplify-usageData/getUsageDataUrl.ts 100.00% <0.00%> (+12.50%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Sep 06 '22 06:09 codecov-commenter

Hey again @kopkunka55, would you be interested in continuing to work on this PR? If so, please rebase this onto dev by running git rebase dev. We will help you with getting this PR to the finish line 🏁

aws-eddy avatar May 12 '23 20:05 aws-eddy

We haven't heard back from you so we are going to close this pull request. If you are interested in pursuing it in the future, please reopen it.

aws-eddy avatar May 23 '23 13:05 aws-eddy