-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Unexplained sytest flakiness after poetry changes #12419
Comments
In both instances, the file that's not found is from a package that poetry has decided to downgrade. You're almost certainly right about it being a race condition! The suggested workarounds seem to be setting I'm also not convinced that it's fixed on poetry 1.2.0, since it still uses pip and python-poetry/poetry@08ab6ca only deals with uninstalls, not up/downgrades. |
... |
Hmm. The sytest-for-synapse docker image is currently in some kind of hybrid mode which supports setuptools and poetry, right? I wonder if ditching the setuptools support might help (so that the docker image is more likely to have the right dependencies installed)? (Or, if the flake is sufficiently rare, retry it up to five times and hope for the best?) |
> I wonder if ditching the setuptools support might help (so that the docker image is more likely to have the right dependencies installed)? Uncommenting https://github.com/matrix-org/sytest/blob/develop/docker/synapse.Dockerfile#L35 would definitely help, up until we next update our pinned dependencies. I'd guess that the more dependencies that poetry needs to upgrade/downupgrade, the more likely it is that we'll have issues. Given the choice between slower-but-unflaky and faster-but-flaky, I'd choose the former. It's frustrating to come back to merge a PR, only to find that CI's failed for some silly reason. |
Poetry runs multiple pip operations in parallel. Unfortunately this results in race conditions when a dependency is installed while another dependency is being up/downgraded in `scripts/synapse_sytest.sh`. Configure poetry to serialize `pip` operations. See matrix-org/synapse#12419 Signed-off-by: Sean Quah <seanq@element.io>
PR'd the workaround here: matrix-org/sytest#1240 |
Poetry runs multiple pip operations in parallel. Unfortunately this results in race conditions when a dependency is installed while another dependency is being up/downgraded in `scripts/synapse_sytest.sh`. Configure poetry to serialize `pip` operations. See matrix-org/synapse#12419 Signed-off-by: Sean Quah <seanq@element.io>
Many thanks @squahtx! Let's keep an eye on this; we can reopen the issue if there are further problems. |
I think https://github.com/matrix-org/synapse/runs/5890104666?check_suite_focus=true hit this too---but I'm not sure if that's to be expected? Maybe the sytest fix hasn't percolated yet somehow? |
Looks like it's already using the new image. The hash in https://github.com/matrix-org/synapse/runs/5890104666?check_suite_focus=true#step:2:119 matches the recently pushed image:
I'm going to have to revisit this on Monday. |
None of the poetry config specified in the dockerfile appears to be holding. |
That's the user-level poetry config. I think you can also set project-level config too with |
I'm having trouble seeing how we'd make the project-level config work, since Synapse is only checked out at runtime. We could delay setting |
Resolved by matrix-org/sytest#1241 for real this time. Hopefully. |
I've now seen two sytest runs fail whe nrunning
poetry install --extras all
.#12416 had https://github.com/matrix-org/synapse/runs/5881698486?check_suite_focus=true fail with
#12415 had https://github.com/matrix-org/synapse/runs/5884140294?check_suite_focus=true fail similarly.
Logs
In both situations it seems like
This isn't happening consistently; I suspect some kind of filesystem access race.
python-poetry/poetry#2658 and python-poetry/poetry#4143 seem to have enconutered this problem.
The text was updated successfully, but these errors were encountered: