-
Notifications
You must be signed in to change notification settings - Fork 215
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
fix(vow): report unhandled vow rejections on collection or upgrade #10686
base: master
Are you sure you want to change the base?
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
2c1627b
to
7b6d43f
Compare
7b6d43f
to
4b66d13
Compare
Run `yarn test:rejection` to test unhandled rejection reporting. CAVEAT: AVA has no way to expect unhandled rejections and so will fail the tests with this setting.
4b66d13
to
0e5ec4e
Compare
@mhofman, I'd be interested in hearing what you think about patching AVA to honour a It's not hard to find the relevant code by searching |
I'll offer an opinion: patches are hard to maintain and should be a last resort. The stock Ava can spawn a worker thread or process as suggested here. |
before closing #10576 , re upgrade considerations: are there any vats deployed with the previous vow package? Do we plan to upgrade them? Also please consider how to verify this fix in a testnet. For example, an a3p test could have an Or... perhaps that's not cost-effective? Perhaps unit testing suffices? |
I agree that our AVA patch has become unwieldy. However, the change I decided to make affects three lines.
The costs of working around stock AVA's stubbornness are far greater and involve much more code and conceptual overhead than patching AVA to be more flexible. |
Vats using vows are:
I don't expect we'd actually upgrade them until u20, when we're targeting Upgrade All Vats.
I agree it is worth at least an a3p test, which would serve as a canary if we ever unexpectedly broke the resumability of vows. I'll work on that. |
closes: #10576
Description
This PR uses the design given in #10576 as a guideline. Some adaptations were made, such as needing to touch the vow states at different places and not sinking the ephemeral promise rejections.
Security Considerations
None expected, as the design does not introduce new facilities than have already been available.
Scaling Considerations
More bookkeeping data structures, but only linearly with the number of pending rejected vows.
Documentation Considerations
n/a
Testing Considerations
Testing unhandled rejections under AVA is impossible without causing AVA to report them as failures. The compromise made in this PR is not to test unhandled rejections by default, instead only if running the tests with
yarn test:rejection
.Upgrade Considerations
The test suite contains a simple VatData upgrade test to verify basic unhandled vow rejections.