-
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
fix vow failure handling #9696
fix vow failure handling #9696
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
@@ -571,7 +571,7 @@ export const makeReplayMembrane = ({ | |||
} | |||
} | |||
}, | |||
); | |||
).catch(reject); |
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 really shouldn't be necessary, we should never have a rejection at this point. We're likely papering over a much larger bug.
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.
@erights could you help me figure this one out?
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.
What I found out so far:
An error is being throw from then body of the async when
function defined at the bottom of when.js
The error is
Error: chain info lacks staking denom
at makeError (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/node_modules/ses/src/error/assert.js:347:61)
at fail (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/node_modules/ses/src/error/assert.js:479:20)
at Fail (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/node_modules/ses/src/error/assert.js:489:39)
at file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/orchestration/src/exos/remote-chain-facade.js:98:25
at asVow (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/vow/src/vow-utils.js:90:16)
at Object.makeAccount (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/orchestration/src/exos/remote-chain-facade.js:94:18)
at In "makeAccount" method of (RemoteChainFacade public) [as makeAccount] (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/node_modules/@endo/exo/src/exo-tools.js:171:24)
at performCall (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/async-flow/src/replay-membrane.js:136:30)
at guestCallsHost (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/async-flow/src/replay-membrane.js:197:19)
at In "makeAccount" method of (RemoteChainFacade public) [as makeAccount] (file:///Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/async-flow/src/replay-membrane.js:466:16)
at <anonymous> (/Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/orchestration/test/facade.test.ts:121:33) {stack: 'Error: chain info lacks staking denom
at …ges/orchestration/test/facade.test.ts:121:33)', message: 'chain info lacks staking denom'}
The hVow
argument is a vow for a promise rejected with this error.
The when
function is not calling the onRejected
handler with this error.
What I don't yet understand is why the when
body throws this error instead of passing it to the onRejected
callback.
attn @michaelfig ?
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.
Exactly what I found. This is a bug in vow's when
which completely ignores the handlers if there is a rejection at any point. I'm fixing now.
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.
Got it, I think a bug in the when
implementation. PR coming shortly if I'm right.
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 have the PR and test incoming
Edit: #9704
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, thanks!
follow up on #9449
Description
#9685 unwrapped an
asVow()
to get the promise failure to propagate. This reverts that now that #9704 removed the need for it.Security Considerations
none
Scaling Considerations
none
Documentation Considerations
none
Testing Considerations
CI
Upgrade Considerations
not yet deployed