Skip to content

Commit 95b953d

Browse files
authored
Fix ARM64 image issues (#4233)
<!-- CURSOR_SUMMARY --> > [!NOTE] > **Medium Risk** > Touches release CD for multi-arch Docker publishing and alters Docker build dependency installation behavior; failures could block image releases or mask install issues despite limited runtime code impact. > > **Overview** > Improves the Docker publish GitHub Actions workflow by adding a manual `workflow_dispatch` trigger, switching to native runners for both `amd64` and `arm64`, and setting `fail-fast: false` so one-arch flakiness doesn’t cancel the other. > > Reduces CD image testing to a consistent lightweight target (`test_unstructured/partition/test_text.py` plus smoke tests) and hardens Docker builds by adding 3-attempt retry logic around `apk update/add` to mitigate transient Chainguard mirror failures. Bumps version to `0.19.3` and updates the changelog accordingly. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 559244d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 8745e7c commit 95b953d

4 files changed

Lines changed: 22 additions & 15 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
78

89
env:
910
DOCKER_REPOSITORY: quay.io/unstructured-io/unstructured
@@ -21,12 +22,13 @@ jobs:
2122

2223
build-images:
2324
strategy:
25+
fail-fast: false
2426
matrix:
2527
include:
2628
- docker-platform: "linux/amd64"
27-
runs-on: ubuntu-latest
29+
runs-on: opensource-linux-8core
2830
- docker-platform: "linux/arm64"
29-
runs-on: opensource-linux-arm64-4core
31+
runs-on: ubuntu-24.04-arm
3032
runs-on: ${{ matrix.runs-on }}
3133
needs: set-short-sha
3234
env:
@@ -58,13 +60,8 @@ jobs:
5860
echo "UNS_API_KEY=${{ secrets.UNS_API_KEY }}" > uns_test_env_file
5961
echo "UNSTRUCTURED_HF_TOKEN=${{ secrets.HF_TOKEN }}" >> uns_test_env_file
6062
ARCH=$(cut -d "/" -f2 <<< ${{ matrix.docker-platform }})
61-
if [ "$ARCH" = "amd64" ]; then
6263
DOCKER_IMAGE="$DOCKER_BUILD_REPOSITORY:$ARCH-$SHORT_SHA" \
63-
make docker-test CI=true
64-
else
65-
DOCKER_IMAGE="$DOCKER_BUILD_REPOSITORY:$ARCH-$SHORT_SHA" \
66-
make docker-test CI=true TEST_FILE=test_unstructured/partition/test_text.py
67-
fi
64+
make docker-test CI=true TEST_FILE=test_unstructured/partition/test_text.py
6865
DOCKER_IMAGE=$DOCKER_BUILD_REPOSITORY:$ARCH-$SHORT_SHA make docker-smoke-test
6966
- name: Push images
7067
run: |

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
## 0.19.2
1+
## 0.19.3
22

33
### 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
4+
- Use native ARM64 runner (`ubuntu-24.04-arm`) for Docker ARM64 builds in CD, replacing QEMU emulation for faster and more reliable builds
5+
- Use `opensource-linux-8core` runner for Docker AMD64 builds in CD
6+
- Add `workflow_dispatch` trigger to CD workflow for manual testing
57
- Update CI runners from `ubuntu-latest-m` to `opensource-linux-8core`
68
- Enable parallel test execution (`pytest -n auto`) in Docker test target
9+
- Reduce CD test step to smoke tests only (full suite already runs in CI)
710

811
### Fixes
12+
- Add retry logic (up to 3 attempts) for `apk add` in Dockerfile to handle transient Chainguard APK mirror failures
13+
- Add `fail-fast: false` to CD build matrix so a flaky failure on one architecture doesn't cancel the other
914
- Remove `.python-version` from `.gitignore`
1015

1116
## 0.19.1

Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ COPY unstructured unstructured
1111
COPY test_unstructured test_unstructured
1212
COPY example-docs example-docs
1313

14-
RUN apk update && \
15-
apk add libxml2 python-3.12 python-3.12-base glib \
16-
mesa-gl mesa-libgallium cmake bash libmagic wget git openjpeg \
17-
poppler poppler-utils poppler-glib libreoffice tesseract && \
14+
RUN apk_ok=false; \
15+
for attempt in 1 2 3; do \
16+
apk update && \
17+
apk add libxml2 python-3.12 python-3.12-base glib \
18+
mesa-gl mesa-libgallium cmake bash libmagic wget git openjpeg \
19+
poppler poppler-utils poppler-glib libreoffice tesseract && \
20+
apk_ok=true && break; \
21+
echo "apk install failed (attempt $attempt/3), retrying in 5s..."; sleep 5; \
22+
done; $apk_ok && \
1823
git clone --depth 1 https://github.com/tesseract-ocr/tessdata.git /tmp/tessdata && \
1924
mkdir -p /usr/local/share/tessdata && \
2025
cp /tmp/tessdata/*.traineddata /usr/local/share/tessdata && \

unstructured/__version__.py

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

0 commit comments

Comments
 (0)