镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Remove unreachable app config pull client ID guard - #8730

Closed
byrichardpowell wants to merge 2 commits into
mainfrom
fix/remove-app-config-pull-unreachable-branches
Closed

byrichardpowell wants to merge 2 commits into
mainfrom
fix/remove-app-config-pull-unreachable-branches

Conversation

@byrichardpowell

@byrichardpowell byrichardpowell commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

The sdk-tests campaign decision #29 asked us to verify defensive branches in app config pull and remove only those that cannot be reached instead of covering them in SDK tests. This supports the contract work in shopify-sdk-tests PR #26.

WHAT is this pull request doing?

Remove the redundant missing-client_id guard after linkedAppContext by passing its linked app into the pull service as one typed value. linkedAppContext rejects an active config without a non-empty string client_id before returning, and its AppLinkedInterface contains a CurrentAppConfiguration that requires client_id.

The directory fallback was found to be reachable and is intentionally preserved. When --client-id selects a different remote app, the in-memory linked app uses the override while loadLocalAppOptions sees the different client ID on disk and returns no app directory. If the command started in a project subdirectory, localAppOptions.appDirectory ?? directory must retain that original invocation directory to avoid changing the write location.

Focused command and service tests cover the differing-client-ID/subdirectory path and assert the preserved fallback behavior. There is no observable CLI behavior change, so no changeset is included.

How to manually test your changes?

cd <linked-app>/extensions/<extension>
shopify app config pull --client-id <different-client-id>

Validation

  • pnpm --filter @shopify/app vitest run src/cli/services/app/config/pull.test.ts src/cli/commands/app/config/pull.test.ts
  • pnpm --filter @shopify/app lint
  • pnpm --filter @shopify/app type-check
  • pnpm exec prettier --check packages/app/src/cli/services/app/config/pull.ts packages/app/src/cli/services/app/config/pull.test.ts packages/app/src/cli/commands/app/config/pull.ts packages/app/src/cli/commands/app/config/pull.test.ts
  • git diff --check

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 — I've identified the correct bump type and added a changeset

@byrichardpowell
byrichardpowell requested a review from a team as a code owner October 1, 2026 21:54
Copilot AI balanced review requested due to automatic review settings October 1, 2026 21:54
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Oct 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The linked-app contract supports the removed branches, and no blocking issues remain.

Review effort: Balanced
Findings: None

What changed in this PR

Simplifies app config pull by using the validated linked app directly, without changing CLI behavior.

Changes:

  • Passes the linked app as one typed service argument.
  • Removes unreachable validation and directory fallback branches.
  • Adds focused command and service contract tests.
File Description
packages/​app/​src/​cli/​services/​app/​config/​pull.ts Uses the linked app and its resolved directory.
packages/​app/​src/​cli/​services/​app/​config/​pull.test.ts Tests linked-app configuration and write arguments.
packages/​app/​src/​cli/​commands/​app/​config/​pull.ts Passes the linked app to the service.
packages/​app/​src/​cli/​commands/​app/​config/​pull.test.ts Tests argument forwarding and success output.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@byrichardpowell byrichardpowell changed the title Remove unreachable app config pull branches Remove unreachable app config pull client ID guard Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants