Repository navigation
Fix Function replay shutdown and process cancellation - #9057
Draft
isaacroldan wants to merge 1 commit into
Draft
isaacroldan wants to merge 1 commit into
isaacroldan wants to merge 1 commit into
Conversation
isaacroldan
force-pushed
the
codex/function-replay-shutdown
branch
5 times, most recently
from
November 3, 2026 13:06
f8ab107 to
dc6793d
Compare
isaacroldan
force-pushed
the
codex/function-replay-shutdown
branch
3 times, most recently
from
November 4, 2026 12:51
6360547 to
6c7547f
Compare
1 of 4 tasks
isaacroldan
force-pushed
the
codex/function-replay-shutdown
branch
3 times, most recently
from
November 9, 2026 12:44
afa350a to
e3a6834
Compare
1 of 4 tasks
isaacroldan
changed the base branch from
codex/function-replay-json
to
codex/function-replay-shared-watch
November 9, 2026 12:50
isaacroldan
force-pushed
the
codex/function-replay-shutdown
branch
from
November 9, 2026 14:49
e3a6834 to
0cf67e0
Compare
isaacroldan
force-pushed
the
codex/function-replay-shutdown
branch
from
November 9, 2026 17:13
0cf67e0 to
4333e5c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Cancelling Function replay must stop active runner processes and queued rebuilds before replay finishes.
WHAT is this pull request doing?
Cancel active runner processes and build-lock waits, prevent queued builds from starting after cancellation, and wait for active work and watcher cleanup before the final cancellation record. Remove process abort listeners after execution. Stop the replay-local scan and startup change waiters, including when stop is called without an abort signal.
This PR follows #9108, which follows #9056. Its diff contains shutdown behavior and tests. The JSON feature and broader startup refactor remain in the preceding PRs. Preserve the readiness opt-out while adding shutdown cleanup.
How to manually test your changes?
Use a test app with a Function and a saved Function log.
pnpm shopify app function replay --path <function-directory> --log <log-id> --json --no-input.cancelled, and the command exits with code 130..build-lock. Cancel replay, then release the lock. Check that no new build starts.--jsonto check text replay. Use--no-watch --jsonto check single-result output.Validation
Checklist