cli icon indicating copy to clipboard operation
cli copied to clipboard

Fix user error handling and display in app deployment

Open amcaplan opened this issue 9 months ago β€’ 3 comments

WHY are these changes introduced?

Fixes https://github.com/Shopify/develop-app-inner-loop/issues/2487 Depends on https://github.com/shop/world/pull/23196

Errors returning from the App Management API aren't being returned correctly.

WHAT is this pull request doing?

  • Fixes the type for CONFIG_EXTENSION_IDS to explicitly be a string array - previously we accidentally used the whole spec rather than the spec identifier
  • Introduces a standardized UserError interface in DeveloperPlatformClient, used for deploy and release operations in both APIs
  • Extracts the user identifier as the extension_id during deploy

Also:

  • Makes appVersion optional in the AppDeploySchema to properly handle error cases (and make some code simpler)

How to test your changes?

  1. Attempt to deploy an app with invalid configuration; see the linked issue
  2. Verify that error messages are properly displayed
  3. Test successful deployments to ensure they still work correctly

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

Checklist

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

amcaplan avatar Mar 26 '25 10:03 amcaplan

This stack of pull requests is managed by Graphite. Learn more about stacking.

amcaplan avatar Mar 26 '25 10:03 amcaplan

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
76.79% (+0.03% πŸ”Ό)
9673/12596
🟑 Branches
72.11% (+0.01% πŸ”Ό)
4789/6641
🟑 Functions
76.66% (+0.05% πŸ”Ό)
2496/3256
🟑 Lines
77.31% (+0.03% πŸ”Ό)
9144/11828
Show files with reduced coverage πŸ”»
St.:grey_question:
File Statements Branches Functions Lines
🟒
... / upload.ts
83.51% (-1.03% πŸ”»)
74.6% (-2.45% πŸ”»)
84.85%
83.91% (-1.15% πŸ”»)

Test suite run success

2290 tests passing in 990 suites.

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

github-actions[bot] avatar Mar 31 '25 13:03 github-actions[bot]

We detected some changes at packages/*/src 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 May 05 '25 22:05 github-actions[bot]

We detected some changes at packages/*/src 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.

[!CAUTION] DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

github-actions[bot] avatar May 12 '25 13:05 github-actions[bot]

Tophatting with this TOML...

client_id = "79147652a3d9f9f6cc5700e2673d5657"
organization_id = "164192500"
name = "dlm-test-2025-05-12-2"
application_url = "https://example.com"
embedded = false

[build]

[webhooks]
api_version = "2025-07"

  [[webhooks.subscriptions]]
  uri = "/webhooks/customers/data_request"
  compliance_topics = [ "customers/data_request" ]

[access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = ""

[auth]
redirect_urls = [ "https://donald.merand.org" ]

I get this error which is clearly missing some keys:

image

Is the core PR not shipped yet? Am I missing something in my config.

dmerand avatar May 12 '25 15:05 dmerand

Ah, sorry! Thought I'd rolled out to 100%. Have done that now.

amcaplan avatar May 12 '25 17:05 amcaplan