Retry uv pip install on cargo-related transient failures#64588
Retry uv pip install on cargo-related transient failures#64588potiuk wants to merge 1 commit intoapache:mainfrom
Conversation
e76614d to
8a40f9d
Compare
|
One more change after testing with #63988 |
8a40f9d to
1786681
Compare
|
I'd recommend just installing Rust ahead of time rather than retrying the whole command? The failure modes for concurrent rustup installs are very confusing and it can leave you in a broken state that will not succeed on retry. |
Tried it already - #64535 it however significantly increases the time of build of the images, But yeah, I might get back to that - I wanted to see if we can do it this way. Thanks for the hint @zanieb |
There was a problem hiding this comment.
Pull request overview
Adds retry logic around uv-based dependency installation during container/image builds to mitigate transient cargo/maturin build failures (workaround for astral-sh/uv#18801).
Changes:
- Introduces a Python retry helper wrapping
uv pip installinscripts/in_container/install_airflow_and_providers.py. - Adds a Bash retry wrapper used by the Docker image install scripts (and their inlined copies in
Dockerfile/Dockerfile.ci). - Updates
uv.lock(timestamp plus additional dependency metadata/extras changes).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Updates lock metadata (exclude-newer) and dependency/extras entries. |
scripts/in_container/install_airflow_and_providers.py |
Adds _run_uv_install_with_retry() and routes uv install steps through it. |
scripts/docker/install_airflow_when_building_images.sh |
Adds run_uv_with_cargo_retry() and wraps uv sync / install invocations. |
Dockerfile.ci |
Updates the embedded /install_airflow_when_building_images.sh script to include the retry wrapper and use it. |
Dockerfile |
Same embedded script updates as Dockerfile.ci. |
|
Closing in favour of #64535 - we will have to bite the bullet of longer image builds. |
|
Thanks @zanieb for the suggestion |
Retry
uv pip installcommands ininstall_airflow_and_providers.pywhen failuresare cargo-related (
.cargoin output), to handle transient build failures.Workaround for astral-sh/uv#18801
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 4.6) following the guidelines