Skip to content

fix(copr): increase build timeout#10071

Merged
jdx merged 10 commits into
mainfrom
codex/fix-copr-rich-dependency
May 25, 2026
Merged

fix(copr): increase build timeout#10071
jdx merged 10 commits into
mainfrom
codex/fix-copr-rich-dependency

Conversation

@jdx

@jdx jdx commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Increase the COPR build timeout via COPR_BUILD_TIMEOUT, defaulting to 180000, and pass it through to copr-cli build.
  • Keep the COPR image smoke test for the distro-managed copr-cli path and copr-cli --help.
  • Stop installing mise just to install the obsolete cargo-vendor crate; Fedora's cargo already provides cargo vendor.
  • Add openssl-devel to the COPR image build dependencies so the packaging environment matches the RPM spec and supports OpenSSL-linked Rust crates.

Context

The old ModuleNotFoundError: rich failure came from a stale COPR image using /usr/local/sbin/copr-cli. Current Fedora 45 copr-cli from dnf does not require rich.

The current COPR failure is build timeout: COPR build 10503441 had 11 successful chroots and fedora-rawhide-aarch64 failed with !! Copr timeout => sending INT. This PR fixes that by increasing the actual COPR builder timeout instead of using --nowait.

Validation

  • git diff --check
  • docker build --no-cache -t mise-copr-pr10071 -f packaging/copr/Dockerfile . on local Docker/OrbStack native arm64
  • Container smoke check: copr-cli resolves to /usr/bin/copr-cli, copr-cli --help >/dev/null, cargo --version, cargo vendor --help >/dev/null, rpmdev-setuptree
  • Full dry-run pipeline in the PR image: VERSION=2026.5.15 ./packaging/copr/build-copr.sh --dry-run, producing mise-2026.5.15-1.fc45.src.rpm

Note: an attempted linux/amd64 build under local OrbStack emulation failed in curl https://mise.run | sh with tar Function not implemented; the Dockerfile no longer runs that installer.


Note

Low Risk
Packaging and CI infrastructure only; no runtime application, auth, or data-path changes.

Overview
Addresses COPR builds timing out (e.g. fedora-rawhide-aarch64) by introducing COPR_BUILD_TIMEOUT (default 180000) and forwarding it to copr-cli build --timeout, with the value echoed in the build configuration log.

The COPR packaging image drops the mise installer path used only to install cargo-vendor (Fedora cargo already provides cargo vendor), adds openssl-devel to align with the RPM spec for OpenSSL-linked Rust builds, and smoke-tests that copr-cli resolves to /usr/bin/copr-cli and runs --help successfully after install.

Reviewed by Cursor Bugbot for commit c8eea23. Bugbot is set up for automated code reviews on this repo. Configure here.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the packaging/copr/Dockerfile to install python3-rich alongside copr-cli and adds a sanity check using copr-cli --help. The reviewer suggested combining the separate RUN dnf commands into a single instruction to optimize the Docker image layers and avoid redundant package metadata downloads.

Comment thread packaging/copr/Dockerfile Outdated
Comment on lines +19 to +21
RUN dnf install -y copr-cli python3-rich && \
dnf clean all && \
copr-cli --help >/dev/null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Efficiency & Maintainability

Combining the two separate RUN dnf install blocks into a single instruction would optimize the Docker image build.

Currently, the first RUN block (lines 5-16) ends with dnf clean all, which clears the package metadata cache. Consequently, the second RUN block (lines 19-21) must re-download the package metadata, which increases build time and adds an unnecessary layer to the image.

Consider combining all package installations into a single RUN instruction like this:

RUN dnf update -y && \
    dnf install -y \
        rpm-build \
        rpmdevtools \
        python3-pip \
        git \
        rust \
        cargo \
        gcc \
        tar \
        gzip \
        copr-cli \
        python3-rich && \
    dnf clean all && \
    copr-cli --help >/dev/null

@greptile-apps

greptile-apps Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes recurring COPR build timeouts (observed on fedora-rawhide-aarch64) by passing --timeout $COPR_BUILD_TIMEOUT to copr-cli build, defaulting to 180000 — exactly the maximum Fedora COPR allows (50 hours). It also cleans up the builder image by dropping the curl | sh mise/cargo-vendor install path (Fedora's system cargo already provides cargo vendor) and adding openssl-devel to align the image with the RPM spec's BuildRequires.

  • build-copr.sh: Introduces COPR_BUILD_TIMEOUT=180000 (seconds) and logs it at startup; the value is passed as a single quoted array element so there is no injection risk.
  • Dockerfile: Removes the insecure remote-installer pattern, adds openssl-devel, and asserts copr-cli resolves to /usr/bin/copr-cli with a --help smoke test at image build time.

Confidence Score: 5/5

Safe to merge — changes are scoped to CI packaging infrastructure, not runtime application logic.

All three changes (timeout increase, openssl-devel addition, removal of the curl-pipe-shell installer) are well-motivated and validated by the author locally. The default timeout of 180000 seconds is precisely the Fedora COPR instance maximum, making the choice deliberate and correct. The new --timeout argument is properly quoted as a single array element, so there is no injection risk.

No files require special attention.

Important Files Changed

Filename Overview
packaging/copr/Dockerfile Removes `curl
packaging/copr/build-copr.sh Adds COPR_BUILD_TIMEOUT (defaulting to 180000 seconds, the Fedora COPR maximum) and passes it via --timeout to copr-cli build

Reviews (6): Last reviewed commit: "chore(ci): remove main docker trigger" | Re-trigger Greptile

jdx commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Closing this as speculative after local validation on Fedora 45 showed the original failure does not reproduce with the currently pinned image.

Validation found that dnf install -y copr-cli works without python3-rich, copr-cli --help, copr-cli build --help, and copr-cli list-chroots all work, and the dry-run COPR pipeline completes on the unpatched image. The PR change itself is harmless, but without a concrete failing CI log showing where rich is imported, adding the dependency would just bloat the image without addressing a proven bug.

This comment was generated by an AI coding assistant.

jdx commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Correction: keeping this PR open while we investigate the actual COPR failure. The Fedora 45 local test shows copr-cli itself does not currently require rich, so the missing dependency may be coming from a different COPR path, image version, injected environment, or release job context. I’ll track down the concrete failing log before changing or closing this PR.

This comment was generated by an AI coding assistant.

@github-actions

github-actions Bot commented May 25, 2026

Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.15 x -- echo 18.8 ± 0.8 17.2 23.2 1.00
mise x -- echo 19.1 ± 1.0 17.3 28.9 1.01 ± 0.07

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.15 env 18.8 ± 0.9 17.0 23.3 1.00 ± 0.07
mise env 18.7 ± 0.8 17.0 24.0 1.00

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.15 hook-env 19.7 ± 0.8 17.8 24.9 1.01 ± 0.06
mise hook-env 19.5 ± 0.9 17.8 24.9 1.00

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.15 ls 16.3 ± 0.7 14.6 20.1 1.00 ± 0.06
mise ls 16.2 ± 0.7 14.7 18.8 1.00

xtasks/test/perf

Command mise-2026.5.15 mise Variance
install (cached) 134ms 135ms +0%
ls (cached) 60ms 63ms -4%
bin-paths (cached) 66ms 67ms -1%
task-ls (cached) 126ms 125ms +0%

@jdx jdx changed the title fix(copr): install rich for copr-cli fix(copr): rebuild and validate copr image May 25, 2026

jdx commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Updated this PR based on the real failure log.

The failing Actions job was not using the fresh Fedora RPM path your validation tested. It pulled stale COPR image digest sha256:da63a0fcdf21a36be340dce61394b336113ea460b93aa9de2705bd7b35e5872e, then executed /usr/local/sbin/copr-cli, which loaded /usr/local/lib/python3.14/site-packages/copr_cli/main.py and failed on from rich.text import Text.

So I removed the speculative python3-rich dependency and changed the PR to:

  • rebuild Docker images on main when Dockerfiles or the Docker workflow change
  • assert command -v copr-cli is /usr/bin/copr-cli in the COPR Dockerfile
  • keep copr-cli --help as a build-time smoke check

This matches the fresh Fedora 45 behavior: use the RPM-provided COPR CLI, and stop publishing stale/pip-shadowed COPR images.

This comment was generated by an AI coding assistant.

Comment thread packaging/copr/Dockerfile
@jdx jdx changed the title fix(copr): rebuild and validate copr image fix(copr): rebuild image on Dockerfile changes May 25, 2026
@jdx jdx changed the title fix(copr): rebuild image on Dockerfile changes fix(copr): rebuild and validate copr image May 25, 2026

jdx commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Updated again based on the validation findings:

  • changed the COPR CLI path assertion to use readlink -f "$(command -v copr-cli)", so Fedora's /usr/sbin -> /usr/bin symlink does not make clean Fedora 45 builds fail
  • removed the workflow paths filter so release tag pushes still rebuild Docker images
  • updated the PR body to call out the tradeoff: Docker images now rebuild on every main push, which is blunt but avoids skipping release images

This comment was generated by an AI coding assistant.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1f5ec09. Configure here.

Comment thread .github/workflows/docker.yml Outdated
@jdx jdx changed the title fix(copr): rebuild and validate copr image fix(copr): validate copr-cli in image May 25, 2026
@jdx jdx changed the title fix(copr): validate copr-cli in image fix(copr): increase build timeout May 25, 2026

jdx commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Updated to target the current COPR failure rather than hiding it with --nowait.

Recent tag builds did rebuild ghcr.io/jdx/mise:copr, so the old /usr/local/sbin/copr-cli + rich failure is not the active failure anymore. The current failed COPR build I inspected is 10503441: 11 chroots succeeded and only fedora-rawhide-aarch64 failed. Its builder log ends with:

!! Copr timeout => sending INT
Copr build error: Build failed

The PR now passes --timeout "$COPR_BUILD_TIMEOUT" to copr-cli build, defaulting to 180000, so COPR gives the slow rawhide aarch64 build more time. It does not use --nowait.

This comment was generated by an AI coding assistant.

jdx commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Local Docker validation is now passing after one extra cleanup commit.

What I found while testing:

  • The copr-cli smoke test passes locally; command -v copr-cli returns /usr/sbin/copr-cli, and readlink -f resolves it to /usr/bin/copr-cli as expected.
  • The original Dockerfile then failed on native arm64 because mise use -g cargo-binstall cargo:cargo-vendor fell back to compiling the old cargo-vendor crate. First it needed openssl-devel; after adding that, the old crate still failed against Fedora 45's Rust 1.95.
  • build-copr.sh only needs cargo vendor vendor/, and Fedora's packaged cargo already provides that subcommand, so I removed the mise/cargo-binstall/cargo-vendor install entirely.
  • After that, docker build --no-cache -t mise-copr-pr10071 -f packaging/copr/Dockerfile . passed locally.
  • Container smoke checks passed: copr-cli --help, cargo --version, cargo vendor --help, and rpmdev-setuptree.
  • Full dry run passed inside the PR image: VERSION=2026.5.15 ./packaging/copr/build-copr.sh --dry-run, producing mise-2026.5.15-1.fc45.src.rpm.

I also updated the PR description with these results.

This comment was generated by an AI coding assistant.

jdx commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Removed the leftover branches: ["main"] trigger from the PR branch. The docker workflow is back to the existing v[0-9]* tag trigger plus workflow_dispatch only.

This comment was generated by an AI coding assistant.

@jdx jdx enabled auto-merge (squash) May 25, 2026 19:29
@jdx jdx merged commit f8133ad into main May 25, 2026
33 checks passed
@jdx jdx deleted the codex/fix-copr-rich-dependency branch May 25, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant