Skip to content

Fixed bug for relative URIs in app dev#6891

Merged
georgge293 merged 1 commit intomainfrom
fix/events-subscription-relative-uri
Feb 27, 2026
Merged

Fixed bug for relative URIs in app dev#6891
georgge293 merged 1 commit intomainfrom
fix/events-subscription-relative-uri

Conversation

@georgge293
Copy link
Contributor

@georgge293 georgge293 commented Feb 24, 2026

closes: https://github.com/shop/issues-event-foundations/issues/793

WHY are these changes introduced?

During development, webhook events need to be delivered to the local development server through a tunnel URL. Previously, relative URIs in event subscriptions were not being resolved, causing webhook delivery failures.

WHAT is this pull request doing?

Implements URI resolution for event subscriptions by modifying transformFromEventsConfig to prepend the application_url to relative URIs (those starting with /). Absolute URIs remain unchanged. The transformation handles edge cases including missing configuration, trailing slashes in application URLs, and empty subscription arrays.

How to test your changes?

  1. Create an app with event subscriptions using relative URIs (e.g., /webhooks/orders)
  2. Start the development server with a tunnel
  3. Verify that the event subscriptions are registered with the full tunnel URL
  4. Test with absolute URIs to ensure they remain unchanged
  5. Run the test suite to verify all edge cases are handled

Copy link
Contributor Author

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

@georgge293 georgge293 self-assigned this Feb 24, 2026
@georgge293 georgge293 marked this pull request as ready for review February 24, 2026 19:04
@georgge293 georgge293 requested a review from a team as a code owner February 24, 2026 19:04
@github-actions
Copy link
Contributor

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.

@georgge293 georgge293 force-pushed the fix/events-subscription-relative-uri branch from b863bc8 to e585544 Compare February 24, 2026 19:06
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.81% 14518/18421
🟡 Branches 73.16% 7221/9870
🟡 Functions 79.02% 3691/4671
🟡 Lines 79.15% 13725/17340

Test suite run success

3785 tests passing in 1448 suites.

Report generated by 🧪jest coverage report action from e3e7335

@georgge293 georgge293 requested a review from karenxie February 24, 2026 21:03
@georgge293 georgge293 changed the title Resolve relative URIs in events subscription transform Fixed bug for relative URIs in app dev Feb 25, 2026
Copy link
Contributor

@cdarne cdarne left a comment

Choose a reason for hiding this comment

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

tophatted like a charm:

Image

Copy link
Contributor

@karenxie karenxie left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@jantnovi jantnovi left a comment

Choose a reason for hiding this comment

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

Approving the change now because this is the current blessed way to do this sort of transformation, but I think longer term the team would like to be more explicit with transformation interfaces we provide. This is especially true given our impending move to JSON contracts for module validation and given that we want to push as much logic to the backend as possible. Will discuss that internally, but for now this won't block our immediate plans so lgtm.

@georgge293 georgge293 added this pull request to the merge queue Feb 26, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 26, 2026
@georgge293 georgge293 added this pull request to the merge queue Feb 26, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 26, 2026
Copy link
Contributor Author

georgge293 commented Feb 26, 2026

Merge activity

  • Feb 26, 8:55 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 26, 8:55 PM UTC: @georgge293 added this pull request to the GitHub merge queue with Graphite.

@georgge293 georgge293 added this pull request to the merge queue Feb 26, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 26, 2026
@georgge293 georgge293 added this pull request to the merge queue Feb 27, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2026
@georgge293 georgge293 added this pull request to the merge queue Feb 27, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2026
@georgge293 georgge293 force-pushed the fix/events-subscription-relative-uri branch 7 times, most recently from 0f68d33 to 88de2a7 Compare February 27, 2026 20:09
@georgge293 georgge293 force-pushed the fix/events-subscription-relative-uri branch from 88de2a7 to e3e7335 Compare February 27, 2026 20:20
@georgge293 georgge293 added this pull request to the merge queue Feb 27, 2026
Merged via the queue into main with commit 706a3c3 Feb 27, 2026
25 checks passed
@georgge293 georgge293 deleted the fix/events-subscription-relative-uri branch February 27, 2026 20:44
@binks-code-reviewer
Copy link

🤖 Code Review · #projects-dev-ai for questions
React with 👍/👎 or reply — all feedback helps improve the agent.

🚫 PR closed

📋 History

🚫 PR closed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants