-
Notifications
You must be signed in to change notification settings - Fork 208
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
CI sometimes fails to read swingset config file #10092
Comments
I am very confused by what nodejs/node#50009 attempts to fix. A |
From a conversation on Slack, it's a lot more likely that ava concurrency results in the same config file being written by concurrent tests, potentially causing tears since the file being written may take multiple The solution is likely to add a random component to |
There are several things to consider even when a single file is used by a single process on a single host:
With that in mind, only option 1 could be applicable to a simple config file write/read by a single process, and only in case of application crash/abort. |
I got hit by this again: https://github.com/Agoric/agoric-sdk/actions/runs/10969486263/job/30462251489#step:5:17 |
A unique but predictable and meaningful filename could also be useful in post-mortem investigations. May be some combination of high resolution timestamp in a human-readable, naturally sortable format and a pid (or a run sequence number). Something to save an extra search/lookup when trying to match the file to a run. A random component can still be used just to be absolutely sure. |
…in concurrent testing Fixes #10092
…in concurrent testing Fixes #10092
…in concurrent testing Fixes #10092
…in concurrent testing (#10128) Fixes #10092 ## Description Rather than having concurrently-running tests fight over e.g. **bundles/decentral-itest-vaults-config.json**, add some entropy to the file name. In this PR, I've chosen **bundles/config.${optionalLabel}.${dateTime}.${randomDigits}.decentral-itest-vaults-config.json**, although no current test is taking advantage of the label option. ### Security Considerations n/a ### Scaling Considerations There's a chance that local `bundles` directories fill up with identical config files. They're easily cleaned up by hand, but if this becomes an actual problem then we can add package.json `clean` scripts for that, or even update `getNodeTestVaultsConfig` to check for and reuse such files. ### Documentation Considerations n/a ### Testing Considerations n/a ### Upgrade Considerations n/a
Describe the bug
As seen at https://github.com/Agoric/agoric-sdk/actions/runs/10873209314/job/30169121954?pr=10091#step:5:1
I suspect this can be fixed by adding aflush: true
option to thewriteFile
call in packages/boot/tools/supports.ts, but only after raising the Node.js version bar to at least v20.10.0 (cf. nodejs/node#50009 for background). And if so, then we may want to consider using it in even morewriteFile
s. A possible alternative would be reading back the expected size, but that seems too heavyweight.Subsequent conversation on Slack identified a more likely culprit as concurrently running tests writing and reading against the same file name, a hypothesis which was locally reproducible:
We should instead introduce a differentiating component in these Swingset config file names, e.g. random and/or otherwise unique per potentially-concurrent test.
The text was updated successfully, but these errors were encountered: