Skip to content

[4.9] Backport app client secret fix (shop/world#2441506, #2457769) - #9146

Draft
dmerand wants to merge 2 commits into
stable/4.9from
dmerand/4.9-app-client-secret
Draft

dmerand wants to merge 2 commits into
stable/4.9from
dmerand/4.9-app-client-secret

Conversation

@dmerand

@dmerand dmerand commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Backports the app client secret fix from World main to stable/4.9, for release 4.9.6.

App Management will stop returning app client secrets to restricted automation tokens (https://delta.shopify.io/shop/world/pull/2441828, behind a flag that is still off). With this change, app lookups (deploy, release, versions) no longer request the secret. Commands that need it explain clearly when they don't get it. Users who can't move to 5.x get the same behaviour.

Please merge without squashing. Each commit maps to one World PR.

WHAT is this pull request doing?

Each commit is a copy of a World diff with the areas/platforms/shopify-cli/ prefix removed (git diff <base> <commit> --relative=areas/platforms/shopify-cli, then git apply -3). cherry-pick -x can't cross the zone prefix.

World PR World commit Backport commit
https://delta.shopify.io/shop/world/pull/2441506 Fetch the app client secret only in commands that use it cdadff8120 (merge) 6539d90
https://delta.shopify.io/shop/world/pull/2457769 Align missing-secret messages with current terms 6e56e2decd (draft, not merged yet) cdc2491

On 4.9, conflicts were resolved by hand in 9 files, without bringing over refactors from main:

  • services/app/env/show.ts, pull.ts and their tests: 4.9's text output is kept. A missing secret prints SHOPIFY_API_SECRET= and warns. env pull keeps an existing .env secret.
  • services/bulk-operations/bulk-operation-status.ts: both 4.9 call sites use appClientSecret.
  • services/dev.ts, dev.test.ts and the shop-import files: only import conflicts. The dev-instance tests are left out, because 4.9 doesn't have that feature.
  • commands/app/env/show.test.ts is left out. It tests the JSON env output from main, which 4.9 doesn't have.

The changeset from 2441506 is already patch. SHOPIFY_CLI_APP_CLIENT_SECRET is not included; it ships only in the next minor.

Known CI failures (not from this change)

  • Type-diff and [PR] CLA fail with Resource not accessible by integration. The repository's default workflow token is now read-only. main got per-workflow permissions in a1d9b74, and the stable branches don't have that commit yet. The type diff itself passes; only its PR comment step fails. Craig owns the backport of a1d9b74.
  • Check graphql-codegen has been run fails only on business-platform-organizations/generated/types.d.ts, which this PR doesn't touch (schema drift since the last stable run).
  • E2E tests fail because app dev now needs the write_app_proxy scope for the e2e apps (a server-side change). The same failure shows on both stable lines.

How to manually test your changes?

  1. With SHOPIFY_CLI_PARTNERS_TOKEN set, run pnpm shopify app deploy --verbose. No request selects clientCredentials.
  2. With the same token, run pnpm shopify app execute --query '{ shop { name } }'. It sends AppClientCredentials and succeeds while the server flag is off.
  3. Log in without a token and run pnpm shopify app env pull on a .env file that has a secret. The secret is kept.

Post-release steps

Release 4.9.6 before 5.0.2. This branch's release job runs pnpm release latest, so publishing 4.9.6 moves npm latest off 5.0.1. Publish 5.0.2 (the stable/5.0 backport) right after it. If 5.0.2 is delayed, move latest back to 5.0.1 by hand. Skip the Homebrew, Observe and notification steps for 4.9.6.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — patch changeset included from the original PR

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Nov 16, 2026
Backport of https://delta.shopify.io/shop/world/pull/2441506
World merge commit: cdadff8120019d47669d34c1ea1663bac8714c08
Copied with `git diff --relative=areas/platforms/shopify-cli` and
`git apply -3`, because the World commit has the zone path prefix.
Conflicts resolved by hand in: services/app/env/show.ts,
services/app/env/show.test.ts, services/app/env/pull.ts,
services/app/env/pull.test.ts,
services/bulk-operations/bulk-operation-status.ts, services/dev.ts,
services/dev.test.ts,
services/generate/shop-import/declarative-definitions.ts,
services/generate/shop-import/declarative-definitions.test.ts.
@dmerand
dmerand force-pushed the dmerand/4.9-app-client-secret branch 2 times, most recently from 7803694 to 1299860 Compare November 16, 2026 20:09
Backport of https://delta.shopify.io/shop/world/pull/2457769
World commit: 6e56e2decdd1f65410dc6bbe6665da5b6ddab94b
@dmerand
dmerand force-pushed the dmerand/4.9-app-client-secret branch from 1299860 to cdc2491 Compare November 16, 2026 20:29

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant