cli icon indicating copy to clipboard operation
cli copied to clipboard

Use new parameters for app management create mutations

Open gordonhirsch opened this issue 1 year ago β€’ 3 comments

WHY are these changes introduced?

Part 2 of https://github.com/Shopify/develop-app-foundations/issues/1050

This PR adapts to changes in the. App Management API introduced in part 1 of the sequence of PRs.

WHAT is this pull request doing?

The new AppVersionInput graphql type is used in the App Management client as a variable for in the app/version create mutations.

On deploy, if a bundle has been uploaded, only that bundle URL is specified as sourceUrl in AppVersionInput. That means that the bundle's manifest is the sole source of app module information like config, etc.

If no bundle has been uploaded, then name and app module information is passed in the source field of AppVersionInput, similar to existing (now-deprecated) API.

It doesn't appear that there are existing tests to cover the deploy logic in the app management client, so I added a few new ones to test deploys and this PR in particular.

How to test your changes?

Running app deploy for a new app will exercise all of the changes in this PR. Note that there is currently an unrelated issue where an app's initial deploy will fail at the CLI level because of a switch to using the partners client for some reason. In this case, the app and initial version are still created correctly.

Testing can be run against production once part 1 has deployed, or against a spin instance running that PR's branch.

Measuring impact

How do we know this change was effective? Please choose one:

  • [x] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • [ ] Existing analytics will cater for this addition
  • [ ] PR includes analytics changes to measure impact

Checklist

  • [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • [x] I've considered possible documentation changes

gordonhirsch avatar Sep 03 '24 20:09 gordonhirsch

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-inner-loop

github-actions[bot] avatar Sep 03 '24 20:09 github-actions[bot]

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
73.28% (+0.19% πŸ”Ό)
8432/11507
🟑 Branches
69.79% (+0.2% πŸ”Ό)
4112/5892
🟑 Functions
72.04% (+0.17% πŸ”Ό)
2190/3040
🟑 Lines
73.62% (+0.19% πŸ”Ό)
7978/10837
Show files with reduced coverage πŸ”»
St.:grey_question:
File Statements Branches Functions Lines
🟑
... / output.ts
77.39% (-0.19% πŸ”»)
76.19% (+0.81% πŸ”Ό)
63.64%
77.06% (-0.21% πŸ”»)

Test suite run success

1898 tests passing in 861 suites.

Report generated by πŸ§ͺjest coverage report action from b40cdf66861f64322c88ee3c94f22bfc44a972bd

github-actions[bot] avatar Sep 03 '24 21:09 github-actions[bot]

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset. If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

github-actions[bot] avatar Sep 05 '24 18:09 github-actions[bot]

This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. β†’ If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

github-actions[bot] avatar Oct 27 '24 03:10 github-actions[bot]