Skip to content

ci: make tmux install resilient to third-party apt repo flakiness#18

Merged
pbean merged 1 commit into
mainfrom
fix/ci-tmux-apt-resilient
Jun 26, 2026
Merged

ci: make tmux install resilient to third-party apt repo flakiness#18
pbean merged 1 commit into
mainfrom
fix/ci-tmux-apt-resilient

Conversation

@pbean

@pbean pbean commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Problem

The recurring "flaky" CI failure (most recently the #17 / 0.7.4 merge run, job test (py3.12), exit 100) is not a flaky pytest test — it's the Install tmux step.

The step ran sudo apt-get update && sudo apt-get install -y tmux under a -e shell. The job log shows apt-get update failing with a Hash Sum mismatch on https://dl.google.com/linux/chrome-stable/deb — a third-party repo baked into the GitHub runner image, unrelated to this project (the CDN served a stale index mid-publish). The Ubuntu archive lists fetched fine; only Chrome's Packages.gz failed its hash check. Because update is chained with &&, that unrelated hiccup returned non-zero and killed the whole job. It's intermittent (other matrix legs passed in the same run), which is exactly why it keeps recurring.

Fix

  • apt-get update ... || true — unrelated third-party repo flakiness can no longer fail the build (the Ubuntu lists still refresh, so tmux installs cleanly).
  • tmux -V — safety net: if the swallowed update error ever did prevent install, the job fails on a clear, on-topic line instead of silently skipping the ~27 generic_tmux integration tests.
  • Acquire::Retries=3 — cheap resilience for genuine transient blips on the Ubuntu archive.

tmux is not pre-installed on ubuntu-24.04, so dropping the step was rejected (it would silently drop integration-test coverage).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved the CI test setup to handle package installation more reliably.
    • The workflow now retries package index updates and continues safely when a temporary repository issue occurs.
    • Verification still ensures the required tool is actually installed before tests proceed.

The "Install tmux" step chained `apt-get update && apt-get install` under a
`-e` shell, so a Hash Sum mismatch on an unrelated third-party repo baked into
the runner image (e.g. dl.google.com/chrome serving a stale index mid-publish)
returned exit 100 and killed the whole job. This is the recurring "flaky" CI
failure — it has nothing to do with our tests or the tmux package, which lives
in the Ubuntu archive and downloads fine.

Make `apt-get update` non-fatal (`|| true`) so unrelated repo hiccups can't fail
the build, then assert tmux is actually installed with `tmux -V` so a genuine
install failure still fails loudly (rather than silently skipping the ~27
generic_tmux integration tests). Add `Acquire::Retries=3` for transient blips.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 09546c60-57dd-4f61-a9ae-a3f18bedd08a

📥 Commits

Reviewing files that changed from the base of the PR and between df5418e and 4a3b7a3.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Walkthrough

The CI test job now installs tmux with retry-tolerant apt-get update handling, then verifies the installed binary with tmux -V.

Changes

CI tmux install step

Layer / File(s) Summary
Install tmux step
.github/workflows/ci.yml
The test job’s tmux install step now retries apt-get update, tolerates update failures, installs tmux, and checks the installed version.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A tiny rabbit hops through CI,
With tmux tucked in snugly nearby.
🐇 apt-get may grumble,
But version checks rumble,
And builds keep on leaping high.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the CI change to harden tmux installation against flaky third-party APT repo failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-tmux-apt-resilient

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@augmentcode augmentcode 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.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@pbean pbean merged commit f702304 into main Jun 26, 2026
7 checks passed
@pbean pbean deleted the fix/ci-tmux-apt-resilient branch June 26, 2026 20:32
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