-
Notifications
You must be signed in to change notification settings - Fork 246
[core] [world] Lazy run creation on start #1537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
38b6674
[core] Combine initial run fetch, event fetch, and run_started event …
VaguelySerious 2f51139
[core] [world] Lazy run creation on start
VaguelySerious 0dfd424
add local and postgres world changes
VaguelySerious b1c2bf3
fix get
VaguelySerious 9202723
changelog
VaguelySerious c129183
fix local world
VaguelySerious 5223192
fix backend
VaguelySerious 5033640
e2e test
VaguelySerious d381cd3
docs
VaguelySerious 10838f3
test fixes
VaguelySerious ccba633
docs
VaguelySerious 770c419
fix
VaguelySerious ee29ee9
base64?
VaguelySerious 11631dc
change e2e test
VaguelySerious ddd0bfd
changeset
VaguelySerious 3ed82c1
409 in case of cold start + 404 backoff when polling run values
VaguelySerious 7b51efd
remove override
VaguelySerious 624f7a8
Address review feedback: fix eventData fallback, add idempotency comm…
VaguelySerious 88d3882
queue changes
VaguelySerious b804f2b
Merge branch 'main' into peter/lazy-start
VaguelySerious 2b7fcec
fix nit
VaguelySerious 84f1e3e
queue transport
VaguelySerious 8e77246
Merge branch 'main' into peter/lazy-start
VaguelySerious d8e9c27
Fix: Duplicate import of MAX_QUEUE_DELIVERIES from './runtime/constan…
vercel[bot] aa2fa6e
Version Packages (beta) (#1563)
499caec
fix(world-postgres): use typed JSON transport that preserves Uint8Array
VaguelySerious 52b92ef
Merge branch 'main' into peter/lazy-start
VaguelySerious f1e5668
Merge branch 'main' into peter/lazy-start
VaguelySerious b6b2f93
Only do 404 checks when we know we did resilientStart
VaguelySerious 4817776
Merge branch 'main' into peter/lazy-start
VaguelySerious f94870e
update docs
VaguelySerious 06afa8b
Merge remote-tracking branch 'origin/main' into peter/lazy-start
VaguelySerious afd4f5f
docs
VaguelySerious 3e70683
toctou fix
VaguelySerious b3f8bab
Merge remote-tracking branch 'origin/main' into peter/lazy-start
VaguelySerious c99c67c
fix(world-local): use writeExclusive for run_created entity to preven…
VaguelySerious 64797f1
fix: generalize builtin step alias to handle bare-name and full-ID lo…
VaguelySerious a38b29a
Revert "fix: generalize builtin step alias to handle bare-name and fu…
VaguelySerious 4c1a73b
refactor(world-vercel): move CBOR encode/decode into CborTransport
VaguelySerious 90b9a7f
fix(core): use runInput.specVersion for run_started in resilient path
VaguelySerious File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| "@workflow/world-postgres": patch | ||
| "@workflow/world-vercel": patch | ||
| "@workflow/world-local": patch | ||
| "@workflow/world": patch | ||
| "@workflow/core": patch | ||
| --- | ||
|
|
||
| Allow workflow invocation to create run if initial storage call in `start` did not succeed. Send run input through queue to enable this. Allow creating run_created and run_started events together in World, and skip first event list call by returning events directly. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "title": "Changelog", | ||
| "pages": ["index", "eager-processing"], | ||
| "pages": ["index", "eager-processing", "resilient-start"], | ||
| "defaultOpen": false | ||
| } |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking (behavior change): The old code caught both
EntityConflictErrorandRunExpiredErrorhere. The new code only catchesRunExpiredError. This means ifevents.create('run_started')throwsEntityConflictError(e.g., duplicateeventIdfrom a concurrent request), it will now propagate to the queue handler and cause a retry — previously it was silently consumed.Is this intentional? The design doc says already-running returns
{ run }without throwing, butEntityConflictErrorcan come from other sources (e.g., DB unique constraint on the event ID). If intentional, add a comment explaining whyEntityConflictErroris no longer expected here. If not, it should be re-added.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
EntityConflictErrorwas restored in the catch block. Current code atruntime.ts:284:See retrospective item 4 in
resilient-start.mdxfor context on why it was removed and then restored.