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: headless api migration #8992

Merged
merged 7 commits into from
Nov 21, 2021

Conversation

akshbhu
Copy link
Contributor

@akshbhu akshbhu commented Nov 21, 2021

Description of changes

  • bug fix in headless migration
  • migration tests

Issue #, if available

Description of how you validated changes

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

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

@akshbhu akshbhu requested a review from a team as a code owner November 21, 2021 03:16
@akshbhu akshbhu changed the title Api ext migration fix: headless api migration Nov 21, 2021
if (!(await checkAppsyncApiResourceMigration(context, resourceName, true))) {
printer.error('Update operations only work on migrated projects. Run "amplify update api" and opt for migration.');
exitOnNextTick(0);
}
await getCfnApiArtifactHandler(context).updateArtifacts(await validateUpdateApiRequest(headlessPayload));
Copy link
Contributor

Choose a reason for hiding this comment

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

Does validateUpdateApiRequest return a bool ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it return a payload , other wise will throw error , if the payload doesn't matches schema

@codecov-commenter
Copy link

Codecov Report

Merging #8992 (445cb28) into api-ext-rebase (984b554) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           api-ext-rebase    #8992   +/-   ##
===============================================
  Coverage           55.48%   55.48%           
===============================================
  Files                 883      883           
  Lines               49925    49925           
  Branches            10750    10750           
===============================================
  Hits                27700    27700           
  Misses              20182    20182           
  Partials             2043     2043           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 984b554...445cb28. Read the comment docs.

@jhockett jhockett merged commit 0d19da8 into aws-amplify:api-ext-rebase Nov 21, 2021
akshbhu added a commit to akshbhu/amplify-cli that referenced this pull request Nov 21, 2021
akshbhu added a commit that referenced this pull request Nov 21, 2021
jhockett pushed a commit to jhockett/amplify-cli that referenced this pull request Nov 21, 2021
akshbhu added a commit that referenced this pull request Nov 21, 2021
akshbhu added a commit to akshbhu/amplify-cli that referenced this pull request Nov 21, 2021
ammarkarachi pushed a commit that referenced this pull request Nov 21, 2021
* feat: extensibility for Amplify API  (#8954)

* feat: REST API extensibility (#8958)

* fix: rebase fixes and bugs (#8960)

* fix: rebase fixes and bugs

* fix: service walkthrough call for appsync

* fix: enable skeleton generation transformerFF is false (#8967)

* feat: add min / max selection to prompter.pick (#8971)

* fix: error handling, various bugs (#8976)

* fix: tsconfig changes and renames (#8975)

* fix: asana bug fixes

* chore: allow js to false

* fix: migration flow and cfn params when user pool groups are present, types (#8981)

* fix: cfn parameters when user pool groups are present

* fix: policy generation for user pool groups

* fix: update types

* test: fix project deletion even if meta validation fails

* fix: rest iam policy roles array, bump ext helper types version (#8983)

* fix: headless api migration (#8992)

* fix: schema path inconsistencies, guest permissions, e2e

* fix: api migration version e2es (#9000)

Co-authored-by: John Hockett <[email protected]>
Co-authored-by: Edward Foyle <[email protected]>
Co-authored-by: jhockett <[email protected]>
ammarkarachi added a commit that referenced this pull request Nov 23, 2021
* Api ext rebase 3 (#9001)

* feat: extensibility for Amplify API  (#8954)

* feat: REST API extensibility (#8958)

* fix: rebase fixes and bugs (#8960)

* fix: rebase fixes and bugs

* fix: service walkthrough call for appsync

* fix: enable skeleton generation transformerFF is false (#8967)

* feat: add min / max selection to prompter.pick (#8971)

* fix: error handling, various bugs (#8976)

* fix: tsconfig changes and renames (#8975)

* fix: asana bug fixes

* chore: allow js to false

* fix: migration flow and cfn params when user pool groups are present, types (#8981)

* fix: cfn parameters when user pool groups are present

* fix: policy generation for user pool groups

* fix: update types

* test: fix project deletion even if meta validation fails

* fix: rest iam policy roles array, bump ext helper types version (#8983)

* fix: headless api migration (#8992)

* fix: schema path inconsistencies, guest permissions, e2e

* fix: api migration version e2es (#9000)

Co-authored-by: John Hockett <[email protected]>
Co-authored-by: Edward Foyle <[email protected]>
Co-authored-by: jhockett <[email protected]>

* fix: add missing ref call during rest stack generation, path casing (#9002)

* fix: updates schema path on update api (#9005)

* fix: api7 and api-migration tests (#9006)

* fix: updates resource to resources and remove green ticks (#9007)

* fix: overriding multiple userPoolGroups, ext helper type, lambda cfn (#9008)

* fix: multiple userPoolGroups overwriting eachother

* chore: update exported ext helper type

* fix: lambda permissions not being generated

* test: moved migration test and fixed the workflow (#9010)

* test: moved migration test and fixed the workflow

* test: remove jest settimeout

Co-authored-by: AmmarKarachi <[email protected]>

* fix: add missing property on path in cfn (#9011)

* test: fixed integ test walkthrough (#9012)

Co-authored-by: AmmarKarachi <[email protected]>

* test: separate migration test helper from e2e (#9014)

* fix: prediction migration test fix (#9015)

* test: fix api_5.test.ts (#9017)

* fix: single userpoolgroup name is iterated instead of being used (#9020)

Co-authored-by: Sachin Panemangalore <[email protected]>

* test: add missing option to e2e test (#9024)

* fix: bucket parameters fetch logic (#9027)

* fix: bucket parameters fetch logic

* fix: address comments

* fix: bucket parameters fetch logic (#9028)

* fix: multiselect returns array when autoselecting (#9029)

* fix: APIGW overrides package.json (#9032)

* fix: package json dependencies

* chore: new line at end of package.json

* fix: migration of Admin Queries on override command (#9031)

* fix: migration of Admin Queries on override command

* fix: address feedback

* feat: descoped http and functions override (#9035)

* fix: address feedback (#9038)

* fix: addressed comments (#9039)

* fix: addressed comments

* Update packages/amplify-provider-awscloudformation/src/download-api-models.ts

Co-authored-by: Ammar <[email protected]>

Co-authored-by: Ammar <[email protected]>

Co-authored-by: akshbhu <[email protected]>
Co-authored-by: John Hockett <[email protected]>
Co-authored-by: Edward Foyle <[email protected]>
Co-authored-by: jhockett <[email protected]>
Co-authored-by: AmmarKarachi <[email protected]>
Co-authored-by: Sachin Panemangalore <[email protected]>
Co-authored-by: Sachin Panemangalore <[email protected]>
@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label Nov 23, 2021
@github-actions
Copy link

👋 Hi, this pull request was referenced in the v7.5.0 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v7.5.0.

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.

4 participants