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: testground instability due to race condition on outcomes #1407
Conversation
dc7f133
to
6027201
Compare
d19b932
to
0494134
Compare
Thank you @laurentsenta for debugging this. Very valuable work. |
f483906
to
f7e8b52
Compare
8e704e9
to
6d665fc
Compare
6d665fc
to
882a35f
Compare
I'm marking this for review, this new version is more stable in my tests,
The patch does not add tests: testing this error specifically and reliably is tough, and I'd rather spend energy on this later to explose the implementation into unit-testable bricks (when we work on new runners maybe). I did left the code cleaner than I found it (boyscout'ing ;), this PR extracts a few methods and drops any channel-related spaghetti. The reasons behind success or failure should be much more clear 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.
🥇
Co-authored-by: Piotr Galar <piotr.galar@gmail.com>
Thanks for the review, |
Fix #1400
Fix #1382
When the docker runner starts a test run it does a few things:
When the containers exits (1) testground stops everything related to collecting the outcomes (3).
This is fine-ish with the go-sdk because it dumps events to stdout as well, so the outcomes will be read thanks to (2).
Logging events on stdout and trying to decode the JSON looked like a legacy hack: this was not implemented in the rust-sdk. See my notes on the pretty printer. The rust-sdk triggers a race condition:
I believe we've seen this error on go-sdk, less often, see this comment.
This PR rework the local docker runner so that a test is complete if and only if:
See runs:
Todo