From e5c716848e1e2a527b793181d584d0f122b15054 Mon Sep 17 00:00:00 2001 From: Nick Franck <46548427+CyMule@users.noreply.github.com> Date: Thu, 1 Oct 2026 23:20:01 -0400 Subject: [PATCH 1/4] perf(ci): Remove redundant setup work and test barriers --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02c952e48c..53c091ccc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,10 @@ on: merge_group: branches: [ main ] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + permissions: id-token: write contents: read @@ -23,16 +27,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/base-cache + - name: Install uv + uses: astral-sh/setup-uv@v5 with: + enable-cache: true python-version: ${{ matrix.python-version }} + cache-suffix: lint + - name: Validate lockfile + run: uv lock --check check-licenses: strategy: matrix: python-version: [ "3.12" ] runs-on: ubuntu-latest - needs: [setup] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/base-cache @@ -46,12 +54,16 @@ jobs: matrix: python-version: ["3.11", "3.12", "3.13"] runs-on: ubuntu-latest - needs: [setup, changelog] steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/base-cache + - name: Install uv + uses: astral-sh/setup-uv@v5 with: + enable-cache: true python-version: ${{ matrix.python-version }} + cache-suffix: lint + - name: Install lint dependencies + run: uv sync --locked --only-group lint - name: Lint run: make check @@ -77,7 +89,6 @@ jobs: matrix: python-version: ["3.11", "3.12", "3.13"] runs-on: opensource-linux-8core - needs: [setup, lint] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/base-cache @@ -120,7 +131,6 @@ jobs: matrix: python-version: ["3.11", "3.12", "3.13"] runs-on: ubuntu-latest - needs: [setup, lint] steps: - uses: actions/checkout@v4 - name: Install uv @@ -161,7 +171,6 @@ jobs: - extra: xlsx uv-extras: "--extra xlsx" runs-on: opensource-linux-8core - needs: [setup, lint, test_unit_no_extras] steps: - uses: actions/checkout@v4 - name: Install uv @@ -191,11 +200,20 @@ jobs: done } retry sudo apt-get update - retry sudo apt-get install -y libmagic-dev poppler-utils libreoffice - retry sudo add-apt-repository -y ppa:alex-p/tesseract-ocr5 - retry sudo apt-get update -o "APT::Update::Error-Mode=any" - retry sudo apt-get install -y tesseract-ocr tesseract-ocr-kor - tesseract --version + retry sudo apt-get install -y libmagic-dev + case "${{ matrix.extra }}" in + docx|pptx) + # The doc/ppt tests exercise legacy formats through LibreOffice. + retry sudo apt-get install -y libreoffice + ;; + pdf-image) + retry sudo apt-get install -y poppler-utils + retry sudo add-apt-repository -y ppa:alex-p/tesseract-ocr5 + retry sudo apt-get update -o "APT::Update::Error-Mode=any" + retry sudo apt-get install -y tesseract-ocr tesseract-ocr-kor + tesseract --version + ;; + esac - name: Test env: UNS_API_KEY: ${{ secrets.UNS_API_KEY }} @@ -208,7 +226,6 @@ jobs: matrix: python-version: ["3.12"] runs-on: opensource-linux-8core - needs: [setup, lint] steps: # actions/checkout MUST come before auth - uses: 'actions/checkout@v4' @@ -294,7 +311,6 @@ jobs: matrix: python-version: ["3.12"] runs-on: ubuntu-latest - needs: [setup, lint] steps: - uses: 'actions/checkout@v4' - uses: ./.github/actions/base-cache @@ -312,7 +328,6 @@ jobs: matrix: python-version: ["3.12"] runs-on: ubuntu-latest - needs: [setup, lint] steps: - uses: 'actions/checkout@v4' - uses: ./.github/actions/base-cache @@ -345,7 +360,6 @@ jobs: # (Using the virtualenv to get pytest) test_dockerfile: runs-on: opensource-linux-8core - needs: [ setup, lint ] steps: - uses: actions/checkout@v4 - name: Test Dockerfile From 640facdbf9c0015df4f593645447d031e3c99e2e Mon Sep 17 00:00:00 2001 From: Nick Franck <46548427+CyMule@users.noreply.github.com> Date: Thu, 1 Oct 2026 23:21:03 -0400 Subject: [PATCH 2/4] perf(ci): Keep PDF dependency installer compatible with timeout fix --- .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53c091ccc3..4559ff13b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -184,7 +184,8 @@ jobs: - name: Install extra dependencies run: | uv sync --locked ${{ matrix.uv-extras }} --group test - - name: Install system dependencies + - name: Install document system dependencies + if: matrix.extra != 'pdf-image' run: | retry() { local n=1 max=5 delay=15 @@ -199,21 +200,35 @@ jobs: n=$((n+1)) done } - retry sudo apt-get update - retry sudo apt-get install -y libmagic-dev + packages=(libmagic-dev) case "${{ matrix.extra }}" in - docx|pptx) - # The doc/ppt tests exercise legacy formats through LibreOffice. - retry sudo apt-get install -y libreoffice - ;; - pdf-image) - retry sudo apt-get install -y poppler-utils - retry sudo add-apt-repository -y ppa:alex-p/tesseract-ocr5 - retry sudo apt-get update -o "APT::Update::Error-Mode=any" - retry sudo apt-get install -y tesseract-ocr tesseract-ocr-kor - tesseract --version - ;; + # The doc/ppt tests exercise legacy formats through LibreOffice. + docx|pptx) packages+=(libreoffice) ;; esac + retry sudo apt-get update + retry sudo apt-get install -y "${packages[@]}" + - name: Install system dependencies + if: matrix.extra == 'pdf-image' + run: | + retry() { + local n=1 max=5 delay=15 + while true; do + "$@" && return 0 + if (( n >= max )); then + echo "Command failed after $n attempts: $*" >&2 + return 1 + fi + echo "Attempt $n/$max failed for: $*. Retrying in ${delay}s..." >&2 + sleep "$delay" + n=$((n+1)) + done + } + retry sudo apt-get update + retry sudo apt-get install -y libmagic-dev poppler-utils libreoffice + retry sudo add-apt-repository -y ppa:alex-p/tesseract-ocr5 + retry sudo apt-get update -o "APT::Update::Error-Mode=any" + retry sudo apt-get install -y tesseract-ocr tesseract-ocr-kor + tesseract --version - name: Test env: UNS_API_KEY: ${{ secrets.UNS_API_KEY }} From 1235ebd8ac7666f5323c88757c41d13e65c0b202 Mon Sep 17 00:00:00 2001 From: Nick Franck <46548427+CyMule@users.noreply.github.com> Date: Fri, 2 Oct 2026 09:22:05 -0400 Subject: [PATCH 3/4] chore(ci): Start the next development version after 0.27.12 Keep the released-version guard intact while validating CI maintenance. Use the existing next-patch dev0 convention without declaring a stable release. --- CHANGELOG.md | 6 ++++++ unstructured/__version__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7662b7980b..376d205f11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.27.13-dev0 + +### Maintenance + +- **Start the next development cycle after 0.27.12.** CI maintenance uses development metadata rather than reusing an already released package version. This does not declare a stable package release. + ## 0.27.12 ### Fixes diff --git a/unstructured/__version__.py b/unstructured/__version__.py index f1527a87a7..50443fd88a 100644 --- a/unstructured/__version__.py +++ b/unstructured/__version__.py @@ -1 +1 @@ -__version__ = "0.27.12" # pragma: no cover +__version__ = "0.27.13-dev0" # pragma: no cover From 9fcb9dbc0181b0878a2e21ad427d7de18e81ff28 Mon Sep 17 00:00:00 2001 From: Nick Franck <46548427+CyMule@users.noreply.github.com> Date: Mon, 5 Oct 2026 11:07:46 -0400 Subject: [PATCH 4/4] docs(changelog): describe CI job parallelization in 0.27.19-dev0 --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 797b3897c1..873d7e4c50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## 0.27.19-dev0 -- **Start the next development cycle after 0.27.13.** CI maintenance uses development metadata rather than reusing an already released package version. This does not declare a stable package release. +### Maintenance + +- **Start CI tests without waiting for setup and lint.** Lint installs only its own dependency group, extras jobs install only the system packages their tests use, and a new push cancels the pull request's previous CI run. ## 0.27.18