Skip to content

ci: bound and retry the Playwright browser install - #199

Merged
krassx merged 3 commits into
mainfrom
ci/harden-playwright-install
Nov 12, 2026
Merged

krassx merged 3 commits into
mainfrom
ci/harden-playwright-install

Conversation

@krassx

@krassx krassx commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

E2E jobs on #195/#196/#197 hung ~20-45 min in playwright install --with-deps on apt DNS failures (archive.ubuntu.com unresolved). Adds apt retries/timeouts, a per-attempt timeout and 3 attempts, and a 12 min step cap so an outage fails fast instead of burning the 45 min job.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WeiJxSMPCqs6TBDKuGw9TG

krassx and others added 2 commits November 12, 2026 10:34
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WeiJxSMPCqs6TBDKuGw9TG
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WeiJxSMPCqs6TBDKuGw9TG
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5f9a49a5-d664-448b-a0a1-d064d3a58e38
Commits

Reviewing files that changed from the base of the PR and between 767607a and e985a96.

Files selected for processing: 1

  • .github/workflows/ci.yml

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Improved reliability of browser setup in the CI workflow with time limits and automatic retries.

The CI workflow configures apt retries and HTTP/HTTPS timeouts for Playwright browser installation. It limits the step to 15 minutes and makes up to three install attempts, each with a 240-second timeout and increasing delays. The step exits on success or returns status 1 after all attempts fail.

Possibly related PRs

Change: Other

Merge Risk: Minimal · previous review 76760

This change bounds Playwright browser installation in CI with retries and timeouts, so apt network outages fail faster instead of hanging. It affects only CI workflow behavior, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "ci: bound and retry the Playwright browser install" matches the main change. The CI workflow step now limits total and per-attempt run time and retries the Playwright browser install up to …
Description check Passed The description explains the problem (E2E jobs hanging in playwright install --with-deps during apt DNS failures) and the fix (apt retries and timeouts, a per-attempt timeout, three attempts, and a …
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.
Full details: Title check

Explanation

The title "ci: bound and retry the Playwright browser install" matches the main change. The CI workflow step now limits total and per-attempt run time and retries the Playwright browser install up to three times. The title is specific and concise.

Full details: Description check

Explanation

The description explains the problem (E2E jobs hanging in playwright install --with-deps during apt DNS failures) and the fix (apt retries and timeouts, a per-attempt timeout, three attempts, and a 12-minute step cap). This matches the workflow change in the summary. The 12-minute cap differs from the 15-minute cap in the file summary, which is a discrepancy the author should check.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 76524df8-46bb-48bc-81b5-c273cb636b8e
Commits

Reviewing files that changed from the base of the PR and between 554797d and 767607a.

Files selected for processing: 1

  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@claude

claude Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Claude finished @krassx's task in 26s —— View job


Review of PR #199 (ci: bound and retry the Playwright browser install)

I read the full diff (.github/workflows/ci.yml, +10/−1). I did not run the workflow, so none of this is verified by execution.

Timing check:

  • Worst case is 3 × 240s attempts plus 20 + 40 + 60s of sleeps, about 14 min.
  • That fits under timeout-minutes: 15, so the step cap does cover three attempts.
  • The PR description still says "12 min step cap" but the code has 15. Update the description.

Findings

  • P3 (inline on line 163): timeout 240 has no -k, so a hung apt-get may survive the TERM or be killed mid-dpkg. The next attempt can then hit a lock or interrupted-dpkg error. Use timeout -k 15 240 and adjust the cap or sleeps.
  • Nit: the last iteration sleeps 60s before exit 1 for nothing.

No blocking issues. The retry and timeout logic is correct. The apt.conf.d drop-in is written before the install, and if … then exit 0 is safe under the default bash -e.

Overall risk: Low (CI-only change, no product code touched).
Merge recommendation: Approve and merge. The timeout -k change is a worthwhile tweak but not blocking.
Most important to fix: timeout -k (and the matching cap), then correct the PR description.
Positives:

  • The change is small and targeted.
  • It bounds both the per-attempt time and the whole step.
  • Backoff is progressive.
  • The comment explains why the change exists.

Comment thread .github/workflows/ci.yml Resolved
@claude

claude Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Claude finished @krassx's task in 18s —— View job


Review of PR #199 (ci: bound and retry the Playwright browser install), latest push

I read the current diff of .github/workflows/ci.yml (+13/−1). I did not run the workflow, so none of this is verified by execution.

Earlier findings now look fixed

  • timeout without -k (P3): the install now uses timeout -k 15 240, so a hung process gets SIGKILL shortly after TERM.
  • Interrupted dpkg state: sudo dpkg --configure -a || true runs before each retry.
  • Final sleep: [ "$attempt" -lt 3 ] || break skips the 60s sleep after the last attempt.
  • Step cap: the worst case is 3 × 255s of attempts plus 20 + 40s of sleeps, about 13.75 min, plus the dpkg repair time. That fits under timeout-minutes: 17.

New findings: none worth an inline comment.

  • if … then exit 0 and the || true / || break guards are safe under the default bash -e.
  • The apt.conf.d drop-in is written before the first install attempt.
  • A hung apt-get that runs as root under sudo might not die on the SIGKILL, because the runner user may not be allowed to signal it. In that case dpkg --configure -a could hit the lock, but it is || true. I don't consider this a defect in the PR, so I'm not reporting it as a finding. The worst case is that the retry fails for the same reason as the first attempt, and the step cap still bounds the whole step.

Housekeeping: the PR description still says "12 min step cap". The code now has 17 min, so the description needs updating.

Overall risk: Low (CI-only change, no product code touched).
Merge recommendation: Approve and merge.
Most important to fix: only the stale "12 min" in the PR description.
Positives:

  • The change is small and targeted.
  • It bounds both the per-attempt time and the whole step.
  • Backoff is progressive.
  • The retry loop cleans up between attempts.
  • The comment explains why the change exists.
    · branch ci/harden-playwright-install

@krassx
krassx merged commit bf16669 into main Nov 12, 2026
@krassx
krassx deleted the ci/harden-playwright-install branch November 12, 2026 08:20
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