Skip to content

Commit 8745e7c

Browse files
authored
Fix Docker ARM64 image failure, use 8-core github runners (#4232)
<!-- CURSOR_SUMMARY --> > [!NOTE] > **Medium Risk** > Changes are confined to CI/CD and build tooling, but runner/driver updates can cause unexpected workflow failures or behavior differences in Docker builds/tests across architectures. > > **Overview** > **CI/CD infra updates for faster, more reliable pipelines.** CI jobs that run heavier integration/fixture/Dockerfile tests now use `opensource-linux-8core` instead of `ubuntu-latest-m`. > > **Docker publish now builds ARM64 natively.** The `docker-publish` workflow runs `linux/arm64` builds on `opensource-linux-arm64-4core`, removes QEMU setup, and simplifies buildx to use the `docker` driver. > > **Release housekeeping.** Adds `.python-version` (and stops ignoring it), enables `pytest -n auto` in the `docker-test` target, updates `CHANGELOG.md`, and bumps `unstructured/__version__.py` to `0.19.2`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 50c09e1. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 2ae8a97 commit 8745e7c

7 files changed

Lines changed: 24 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
strategy:
184184
matrix:
185185
python-version: ["3.12"]
186-
runs-on: ubuntu-latest-m
186+
runs-on: opensource-linux-8core
187187
needs: [setup, lint]
188188
steps:
189189
# actions/checkout MUST come before auth
@@ -256,7 +256,7 @@ jobs:
256256
strategy:
257257
matrix:
258258
python-version: ["3.12"]
259-
runs-on: ubuntu-latest-m
259+
runs-on: opensource-linux-8core
260260
needs: [setup, lint]
261261
steps:
262262
- uses: 'actions/checkout@v4'
@@ -274,7 +274,7 @@ jobs:
274274
strategy:
275275
matrix:
276276
python-version: ["3.12"]
277-
runs-on: ubuntu-latest-m
277+
runs-on: opensource-linux-8core
278278
needs: [setup, lint]
279279
steps:
280280
- uses: 'actions/checkout@v4'
@@ -307,7 +307,7 @@ jobs:
307307
# TODO - figure out best practice for caching docker images
308308
# (Using the virtualenv to get pytest)
309309
test_dockerfile:
310-
runs-on: ubuntu-latest-m
310+
runs-on: opensource-linux-8core
311311
needs: [ setup, lint ]
312312
steps:
313313
- uses: actions/checkout@v4

.github/workflows/docker-publish.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ jobs:
2222
build-images:
2323
strategy:
2424
matrix:
25-
docker-platform: ["linux/arm64", "linux/amd64"]
26-
runs-on: ubuntu-latest
25+
include:
26+
- docker-platform: "linux/amd64"
27+
runs-on: ubuntu-latest
28+
- docker-platform: "linux/arm64"
29+
runs-on: opensource-linux-arm64-4core
30+
runs-on: ${{ matrix.runs-on }}
2731
needs: set-short-sha
2832
env:
2933
SHORT_SHA: ${{ needs.set-short-sha.outputs.short_sha }}
3034
steps:
3135
- name: Set up Docker
32-
# Use the `docker` driver for AMD builds because the `docker-container` driver may fail to locally load the built image.
33-
# This could be due to the larger size of the AMD build and the `docker-container` driver needing to load the tarball.
34-
# Use the `docker-container` driver for ARM builds because it may otherwise intermittently fail with: `exec /bin/sh: exec format error`
3536
uses: docker/setup-buildx-action@v3
3637
with:
37-
driver: ${{ matrix.docker-platform == 'linux/amd64' && 'docker' || 'docker-container' }}
38+
driver: docker
3839
- name: Checkout code
3940
uses: actions/checkout@v4
4041
- name: Login to Quay.io
@@ -52,8 +53,6 @@ jobs:
5253
--progress plain \
5354
--cache-from $DOCKER_BUILD_REPOSITORY:$ARCH \
5455
-t $DOCKER_BUILD_REPOSITORY:$ARCH-$SHORT_SHA .
55-
- name: Set up QEMU
56-
uses: docker/setup-qemu-action@v3
5756
- name: Test images
5857
run: |
5958
echo "UNS_API_KEY=${{ secrets.UNS_API_KEY }}" > uns_test_env_file

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ nbs/
8787
profile_default/
8888
ipython_config.py
8989

90-
# pyenv
91-
.python-version
92-
9390
# pipenv
9491
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
9592
# However, in case of collaboration, if having platform-specific dependencies or dependencies

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 0.19.2
2+
3+
### Enhancements
4+
- Use native ARM64 runner (`opensource-linux-arm64-4core`) for Docker ARM64 builds in CD, replacing QEMU emulation for significantly faster and more reliable builds
5+
- Update CI runners from `ubuntu-latest-m` to `opensource-linux-8core`
6+
- Enable parallel test execution (`pytest -n auto`) in Docker test target
7+
8+
### Fixes
9+
- Remove `.python-version` from `.gitignore`
10+
111
## 0.19.1
212

313
### Fixes

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ docker-test:
169169
bash -c "uv sync --frozen --all-extras --group test --no-install-project && \
170170
CI=$(CI) \
171171
UNSTRUCTURED_INCLUDE_DEBUG_METADATA=$(UNSTRUCTURED_INCLUDE_DEBUG_METADATA) \
172-
uv run pytest $(if $(TEST_FILE),$(TEST_FILE),test_unstructured)"
172+
uv run pytest -n auto $(if $(TEST_FILE),$(TEST_FILE),test_unstructured)"
173173

174174
.PHONY: docker-smoke-test
175175
docker-smoke-test:

unstructured/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.19.1" # pragma: no cover
1+
__version__ = "0.19.2" # pragma: no cover

0 commit comments

Comments
 (0)