-
Notifications
You must be signed in to change notification settings - Fork 222
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
feat(async-flow): startGeneration
: a new synthetic LogEntry
#10293
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
a6d7cf1
to
21051a7
Compare
21051a7
to
4c21b73
Compare
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.
I think I'd like to see a test of both a log reset and a flow restart that shows the generation of an invocation getting bumped when inserting new log entries. This likely can be done using explicit reset/restarts, and without a simulated liveslots upgrade (especially because I haven't landed the liveslots test framework improvements yet, and we don't have testing hooks to peek into the state of async flow, which would possibly be covered by #9753)
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.
All my issues are dealt with well, so approving to remove my blockage. But you should still iterate with @mhofman to his satisfaction before merging.
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.
LGTM (once the test snapshots are updated to reflect the new 0 based generation)
I am wondering if we should include a |
I appreciate the need to have guarantees like this, but adding extra code for validation didn't strike me as the best thing to do. Ruminating on it, I'd prefer to encapsulate the generation number within |
6caed9d
to
9b3a3d1
Compare
Yeah I think that's what was making me uneasy, that async-flow could mistakenly not pass the right generation. I prefer it container like this much better. |
closes: #9384
Description
This pull request introduces a
startGeneration
log entry to capture the generation (restart) number for subsequent log entries. The most important changes are grouped below by theme.Log Entry Enhancements:
startGeneration
and updatedLogEntryShape
to include a new log entry type for starting a generation (packages/async-flow/src/type-guards.js
).Log Store Improvements:
zone.mapStore
and use it in LogStore ephemera to track its generation (packages/async-flow/src/log-store.js
).prepareLogStore
to define a predicate for filtering log entries, and added methods for retrieving unfiltered log entries (packages/async-flow/src/log-store.js
).packages/async-flow/test/log-store.test.js
).Replay Membrane Adjustments:
startGeneration
in the replay membrane to handle generation-specific operations (packages/async-flow/src/replay-membrane.js
).Type Definitions:
LogEntry
andFutureLogEntry
types to include the new generation entry type (packages/async-flow/src/types.ts
).Security Considerations
n/a
Scaling Considerations
Low overhead implementation.
Documentation Considerations
Not necessary yet, just laying groundwork for the infrastructure so that a future change can use it to implement asyncFlow versioning.
Testing Considerations
Some new
*Unfiltered
methods of theLogStore
now have some tests.Upgrade Considerations
Designed to enable future upgrade of async flows.