Repository navigation
fix(ci): bound system dependency downloads - #4514
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Shadow auto-approve: would not auto-approve. Auto-approval blocked by 1 unresolved issue from previous reviews.
Re-trigger cubic
|
Automated review, forwarded by @paulkarayan. Findings are code-verified where they name a file and line; the strong-review gpt-pro leg and cubic did not run. GO -- 0 blocker(s), 0 concern(s), 3 note(s), 0 nit(s). Moves CI apt setup into one bounded-retry script; CI green at head with the script running on the real runners, no defects found. Notes (3)
Full review |
…d-IO#4521) ## What Test, license, changelog, and lint jobs start together instead of waiting on each other. ``` Before: setup (44–68s) → lint (45–68s) → no-extras tests → extras tests After: setup ┐ lint ├─ all start immediately tests ┘ ``` - `setup` now only checks that `uv.lock` is current, and lint installs just Ruff instead of every ML/connector extra. - System package setup retains bounded download retries and offline installation from Unstructured-IO#4514. Only the jobs that need them install packages: OCR/Poppler goes to the `pdf-image` extra, and LibreOffice to the `docx`/`pptx` extras (legacy `.doc`/`.ppt` conversion). - A new push cancels the PR's older CI run. Every job name, Python/extra matrix entry, test command, and coverage gate is unchanged. ## Why In the [baseline run](https://github.com/Unstructured-IO/unstructured/actions/runs/36956464188), tests could not start until setup and then lint had finished. Each of the 24 extras jobs also spent 52–86s installing OCR and office tools that most of them never use. ## Tradeoffs - **Failed lint no longer stops tests.** A PR that fails lint still runs the full test matrix on 8-core runners. - **No shared cache warm-up.** `setup` used to fill the dependency cache before other jobs started. When `uv.lock` changes, each job now installs dependencies itself and they race to save the cache. Runs with a cache hit are unaffected. - **Version bump.** The version moves to `0.27.19-dev0` with a changelog entry, as the repository's version check requires. Other open PRs that bump the version will need the usual rebase. ## Validation actionlint passes, and the lint-only sync, Ruff, and `uv lock --check` pass locally. CI passes on this branch, including every extras suite with the narrower system packages.
An Ubuntu package download in #4357's CI took 54 minutes for 262 MB, compared with 7–39 seconds on the other runners. The existing retry loop waits indefinitely for a command to return, so it cannot recover from a download that continues extremely slowly.
This change shares dependency setup across the unit, extras, and ingest jobs. It applies 30-second HTTP/HTTPS inactivity timeouts, APT retries, and three bounded five-minute attempts for index updates and downloads. Packages are downloaded first and installed with
--no-download, keeping dpkg installation outside the outer timeout. Setup appears as a separate step, and the PPA's implicit index refresh is replaced with an explicitly bounded refresh.The package set, Tesseract version check, and test commands are preserved. Persistently poor networking now produces a clear setup failure instead of an hour-long download; the change does not guarantee a faster mirror.
Validation: Bash syntax, ShellCheck, shfmt, workflow YAML parsing, and whitespace checks passed. A mocked harness verified success, retry after timeout, exhaustion, and installation sequencing. A disposable Ubuntu 24.04 container validated the APT flags with strict index update, download-only fetching, and offline installation of libmagic-dev. The full helper also completed successfully in a disposable Ubuntu 24.04 ARM64 container, including LibreOffice, the Tesseract PPA, Korean OCR data, and diffstat; Tesseract reported 5.5.1. The repository release-version check passed on Ubuntu. GitHub CI passed on aa97013, including the unit, dependency-extras, ingest and Dockerfile jobs that use the new helper; no end-to-end CI speedup has been established.