Skip to content

Fix repeated event config diffs when API versions are inherited - #8690

Merged
cdarne merged 1 commit into
mainfrom
events-api-version-alignment
Sep 29, 2026
Merged

cdarne merged 1 commit into
mainfrom
events-api-version-alignment

Conversation

@cdarne

@cdarne cdarne commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Supersedes #8677, co-authored with @pobed2: same fix, applied only when reading remote config (see below). Its deploy regression tests are kept.

When an events subscription inherits [events].api_version, shopify app deploy reports events (updated) on every deploy (or requires --allow-updates in CI), and shopify app config link writes the version into every subscription. Core stores the inherited version on each subscription, but the CLI compares it with a TOML that omits it.

Example shopify.app.toml:

[events]
api_version = "2026-07"

  [[events.subscription]]
  handle = "product-updated"
  topic = "Product"
  actions = ["update"]
  uri = "https://example.com/events"

WHAT is this pull request doing?

When reading remote config (transformToEventsConfig), drops a subscription api_version equal to [events].api_version and keeps overrides. Deploy compares local and remote config through this same transform, so this one change fixes both commands.

Before After
app deploy, events unchanged events (updated) every time no events update
app config link api_version written on every subscription only overrides written

How to manually test your changes?

With an app whose shopify.app.toml sets [events].api_version and omits api_version on a subscription:

pnpm shopify app deploy --path /path/to/app
pnpm shopify app deploy --path /path/to/app
pnpm shopify app config link --path /path/to/app
  • The second deploy shows no events update.
  • config link doesn't add api_version to subscriptions using the default; an overriding api_version is kept.

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 (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

@github-actions github-actions Bot added the Area: @shopify/app @shopify/app package issues label Sep 28, 2026
@cdarne
cdarne force-pushed the events-api-version-alignment branch from dd137de to 472ddc3 Compare September 28, 2026 19:01
Core fills [events].api_version into event subscriptions that omit it,
so the remote config carries a version the local TOML doesn't. Drop a
subscription api_version equal to the events default when reading
remote config. Deploy compares both sides through this transform, so
unchanged events no longer show as updated, and config link only writes
overrides.

Co-Authored-By: Pierre-Olivier Bédard <pobed2@gmail.com>
@cdarne
cdarne force-pushed the events-api-version-alignment branch from 472ddc3 to e2e1eec Compare September 28, 2026 21:34
@cdarne
cdarne marked this pull request as ready for review September 28, 2026 21:46
@cdarne
cdarne requested a review from a team as a code owner September 28, 2026 21:46
Copilot AI balanced review requested due to automatic review settings September 28, 2026 21:46

@rezaansyed rezaansyed 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.

🎩 'd the changes and work as expected

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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@cdarne
cdarne added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit b9544a7 Sep 29, 2026
55 of 56 checks passed
@cdarne
cdarne deleted the events-api-version-alignment branch September 29, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/app @shopify/app package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants