{ComponentFix} Combine update + install into a single transaction#33442
{ComponentFix} Combine update + install into a single transaction#33442msarfraz wants to merge 4 commits into
Conversation
…t repo-sync skew failures
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This PR updates the RPM build Dockerfiles to reduce transient build failures caused by temporary repo-sync skew by running the package update and build-dependency installation together in the same Docker build step.
Changes:
- Combine
update+installinto a singleRUNinstruction for UBI (yum) and Fedora (dnf). - Add inline comments explaining the repo-sync skew failure mode being mitigated.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/release/rpm/ubi.dockerfile | Combines yum update + yum install into one Docker layer with added rationale comment. |
| scripts/release/rpm/fedora.dockerfile | Combines dnf update + dnf install into one Docker layer with added rationale comment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Combine update + install into a single transaction so dnf resolves a | ||
| # consistent set of packages. Running them separately can fail when the | ||
| # BaseOS and AppStream repos are temporarily out of sync (e.g. AppStream | ||
| # ships glibc-devel-X but BaseOS hasn't published the matching glibc-X yet). |
| RUN dnf update -y && \ | ||
| dnf install -y wget rpm-build gcc libffi-devel ${python_package}-devel openssl-devel make bash coreutils diffutils patch dos2unix perl |
| # Install build dependencies in a single dnf transaction so the resolver | ||
| # picks a mutually consistent set of packages. A separate `yum update -y` | ||
| # step is intentionally avoided: when BaseOS and AppStream are temporarily | ||
| # out of sync (e.g. AppStream ships glibc-devel-X but BaseOS has not yet | ||
| # published the matching glibc-X), updating first pins glibc to a version | ||
| # that no installable glibc-devel matches, which then breaks `gcc` install. | ||
| # The base UBI image already ships with security updates; `dnf install` |
| # picks a mutually consistent set of packages. A separate `yum update -y` | ||
| # step is intentionally avoided: when BaseOS and AppStream are temporarily | ||
| # out of sync (e.g. AppStream ships glibc-devel-X but BaseOS has not yet | ||
| # published the matching glibc-X), updating first pins glibc to a version | ||
| # that no installable glibc-devel matches, which then breaks `gcc` install. | ||
| # The base UBI image already ships with security updates; `dnf install` | ||
| # will pull any newer transitive dependencies it needs. |
| # step is intentionally avoided: when BaseOS and AppStream are temporarily | ||
| # out of sync, updating first can pin glibc to a version whose matching | ||
| # glibc-devel is not yet available, breaking the subsequent install. |
…t repo-sync skew failures
Related command
Description
Combine update + install into a single transaction so dnf resolves a consistent set of packages and avoids transient repo-sync skew failures.
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.