-
Notifications
You must be signed in to change notification settings - Fork 212
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
Add strict liveslots test env with upgrade tools #10126
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
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.
This is great stuff! I noticed just some minor details I'd like to see improved.
Approving conditionally assuming those are addressed.
packages/swingset-liveslots/test/virtual-objects/virtualObjectManager.test.js
Outdated
Show resolved
Hide resolved
export const reincarnate = (options = {}) => { | ||
const { fakeStore = new Map(), fakeVomKit: fvk } = options; | ||
/** | ||
* @typedef {import("@agoric/internal").Simplify<Omit<NonNullable<Parameters<typeof makeFakeVirtualStuff>[0]>, 'WeakMap' | 'WeakSet'> & {fakeVomKit: FakeVomKit; fakeStore: Map<string, string>}>} ReincarnateOptions |
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.
Could you please add some newlines in this typedef? I can't easily see which parts are nested under which other parts.
baggage => { | ||
const zone = makeDurableZone(baggage, 'durableRoot'); | ||
prepareVowTools(zone); | ||
zone.exo('DurableVowTestWatcher', undefined, { |
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.
Did you mean to do something with this watcher? It seems just to be dropped on the floor.
zone.exo('DurableVowTestWatcher', undefined, { | |
const watcher = zone.exo('DurableVowTestWatcher', undefined, { |
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.
The behavior is redefined. This singleton exo is already setup as watcher in the previous incarnation, so we don't care about its identity here, just that a behavior is reconnected when invoked when resolving the vow.
Added a comment.
dcd5441
to
9300ae8
Compare
closes: #9126
Best reviewed commit-by-commit
Description
This PR add a new
prepare-strict-test-env.js
which enforces durable requirements on the baggage and provide helpers to simulate upgrades based on the helper from theasync-flow
andzone
package tests.In particular it adds a new
startLife
helper which enforces kind redefinition rules for abuild
step, and rejects previously watched promises (assuming they were all decided by the previous incarnation).Security Considerations
None, test infra only
Scaling Considerations
None
Documentation Considerations
Some types added and clarified. Internal tooling
Testing Considerations
Adds tests of the new strict env and
startLife
helper.Add liveslots based test in
vow
using the newstartLife
helper.Updated the test environments in the
zone
andasync-flow
package to use the new liveslots env, but does not update theasync-flow
tests to use the stricterstartLife
(will be done in #9933 or #9383)Upgrade Considerations
Better upgrade testing without needing a full swingset kernel