-
Notifications
You must be signed in to change notification settings - Fork 960
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
Parallel conan upload to artifactory fail #14581
Comments
Thanks for your report. I'd say that you are mostly right it looks like a race condition, due to not atomic uploads. The way to mitigate it, is avoiding the parallel upload of the recipe, limiting it to one of the CI jobs, uploading only the recipe, then the rest of binaries can be uploaded in parallel, as they will not compete for writing in the same recipe location. If the remote is a |
Seems to be duplicate of #14175 which is also still open My personal workaround for CI/CD: if the upload fails, just retry! I don't know the cause of the issue on Artifactory's side, but it is indeed a race condition on the recipe upload because one job already wrote the recipe on the remote and another tries to do it as well (no race condition on packages as they should have different package ids). Having a (small) logic to retry once - after a second - if the upload fails is enough as the race condition will not happen again, the recipe being already on the remote server. It is only a work-around but it is a robust solution. |
Closing in favor of #16703, that will be used to centralize future 2.X investigations, please track that ticket instead, thanks! |
Environment details
Steps to reproduce
I have 3 parallel gitlab pipeline jobs building packages for the same conan recipe (same rrev due to
revision_mode = "scm"
) to different platforms, and uploading these to my artifactory remote.Upload command:
conan upload myrecipe/1.0.0 --confirm --remote my-virtual-remote
Sometimes the upload fails with a very strange error:
I can read the error message, but I am pretty sure it has nothing to do with permissions as the jobs often succeeds.
My own theory is that it happens when 2 of the parallel jobs finish and uploads at the same time and fails because the upload is not an atomic operation, causing some kind of race condition, but it is all just speculation.
What could be wrong?
Regards
Klaus
The text was updated successfully, but these errors were encountered: