-
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
chore: provisionSmartWallet
flake
#10691
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
@@ -28,11 +28,11 @@ const retryUntilCondition = async <T>( | |||
{ | |||
maxRetries = 6, | |||
retryIntervalMs = 3500, | |||
log = () => {}, | |||
log = console.log, |
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.
personally I find this log output noisy. Good to change console.log
below to this log
, but consider leaving the noop default for silence
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 (+ console.log -> log
) would impact a lot of existing tests, so I chose to preserve the existing behavior. I'll see how this looks in local runs and will look to land it in the future:
+ log = () => {},
- log = console.log,
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.
s/impact/denoise 😉
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
I think it's worthwhile making retryUntilCondition
optional on makeE2ETools
. But it's not critical.
// execute sequentially, to avoid "published.wallet.${addr}.current: fetch failed" | ||
const oracleWds: WalletDriver[] = []; | ||
for (const p of oracleWdPs) { | ||
const wd = await p; |
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.
yeah... that never did execute sequentially; that is: it didn't wait for one to finish before starting the next.
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.
Oh right, they all start together
multichain-testing/test/support.ts
Outdated
@@ -79,13 +79,13 @@ export const commonSetup = async (t: ExecutionContext) => { | |||
console.error('setupRegistry failed', e); | |||
throw e; | |||
} | |||
const tools = await makeAgdTools(t.log, childProcess); | |||
const keyring = await makeKeyring(tools); | |||
const deployBuilder = makeDeployBuilder(tools, fse.readJSON, execa); | |||
const retryUntilCondition = makeRetryUntilCondition({ | |||
log: t.log, | |||
setTimeout: globalThis.setTimeout, |
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.
only top level scripts (incl. test scripts) should be grabbing ambient authority like this use of globalThis.setTimeout
.
pre-dates this PR, though, so I'll add it to the list:
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 thought we agreed modules that are used only in testing can have ambient authority?
(btw, I bristle at the subjectivity and emotional valence of that issue title. s/Distressing //
)
multichain-testing/test/support.ts
Outdated
const retryUntilCondition = makeRetryUntilCondition({ | ||
log: t.log, | ||
setTimeout: globalThis.setTimeout, | ||
}); | ||
const tools = await makeAgdTools(t.log, childProcess, retryUntilCondition); |
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.
though... now tools
and everything derived from it carries the ambient authority along.
childProcess
was already ambient authority though.
() => q.queryData(`published.wallet.${address}.current`), | ||
result => !!result, | ||
`wallet in vstorage ${address}`, | ||
{ log: () => {} }, // suppress logs as this is already noisy |
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.
yeah; we do too much logging without giving the caller the ability to turn it off.
setTimeout, | ||
rpcAddress = 'http://localhost:26657', | ||
apiAddress = 'http://localhost:1317', | ||
retryUntilCondition, |
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.
setTimeout
is already in the list... I suppose somebody might want the log
in retryUntilCondition
to be different from the log
passed to makeE2ETools
, but in the common case, we can fill it in for them:
setTimeout, | |
rpcAddress = 'http://localhost:26657', | |
apiAddress = 'http://localhost:1317', | |
retryUntilCondition, | |
setTimeout, | |
rpcAddress = 'http://localhost:26657', | |
apiAddress = 'http://localhost:1317', | |
retryUntilCondition = makeRetryUntilCondition({ log, setTimeout }), |
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.
Nice, good thinking
This pull request has been removed from the queue for the following reason: Pull request #10691 has been dequeued. The pull request rule doesn't match anymore. The following conditions don't match anymore:
You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
- motivated after observing "cannot read data of published.wallet.agoric1ujmk0492mauq2f2vrcn7ylq3w3x55k0ap9mt2p.current: fetch failed" in https://github.com/Agoric/agoric-sdk/actions/runs/12313012295/job/34369641775?pr=10638 - this likely indicates a race between `provision-one`, the vstorage update, or the RPCs view of vstorage - to address this, retry the vstorage query with `retryUntilCondition`
0daf237
to
0cdb981
Compare
Description
cannot read data of published.wallet.${addr}.current: fetch failed
in 10638Security Considerations
None
Scaling Considerations
None
Documentation Considerations
None
Testing Considerations
None
Upgrade Considerations
None