From ef6f0d7e668d2652e58fce6dfc8a60664ae64552 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 16 Mar 2026 16:27:29 +0000 Subject: [PATCH] fix: extract debug file from same image to ensure matching BuildID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The separate depot build for --target debuginfo produced a binary with a different BuildID than the shipped binary. Extract the .debug file from the same EE image instead — no extra CI build, guaranteed match. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/docker-image.yml | 61 ++++-------------------------- Dockerfile | 6 +-- 2 files changed, 9 insertions(+), 58 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index bdc53a6f22..e9a0f20d79 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -199,10 +199,17 @@ jobs: image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${{ env.DEV_SHA }} path: "/usr/src/app/windmill" + - uses: shrink/actions-docker-extract@v3 + id: extract-ee-debug + with: + image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${{ env.DEV_SHA }} + path: "/usr/src/app/windmill.debug" + - name: Rename binary with corresponding architecture run: | mv "${{ steps.extract.outputs.destination }}/windmill" "${{ steps.extract.outputs.destination }}/windmill-${ARCH}" mv "${{ steps.extract-ee.outputs.destination }}/windmill" "${{ steps.extract-ee.outputs.destination }}/windmill-ee-${ARCH}" + mv "${{ steps.extract-ee-debug.outputs.destination }}/windmill.debug" "${{ steps.extract-ee-debug.outputs.destination }}/windmill-ee-${ARCH}.debug" - name: Attach binary to release uses: softprops/action-gh-release@v2 @@ -210,61 +217,9 @@ jobs: files: | ${{ steps.extract.outputs.destination }}/* ${{ steps.extract-ee.outputs.destination }}/* + ${{ steps.extract-ee-debug.outputs.destination }}/* ${{ steps.extract-duckdb-ffi-internal.outputs.destination }}/* - attach_ee_debug_to_release: - needs: [build_ee] - runs-on: ubicloud - if: ${{ startsWith(github.ref, 'refs/tags/v') }} - strategy: - matrix: - platform: [linux/amd64, linux/arm64] - include: - - platform: linux/amd64 - arch: amd64 - - platform: linux/arm64 - arch: arm64 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - - name: Read EE repo commit hash - run: | - echo "ee_repo_ref=$(cat ./backend/ee-repo-ref.txt)" >> "$GITHUB_ENV" - - - uses: actions/checkout@v4 - with: - repository: windmill-labs/windmill-ee-private - path: ./windmill-ee-private - ref: ${{ env.ee_repo_ref }} - token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }} - - - name: Substitute EE code - run: | - ./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private - - - uses: depot/setup-action@v1 - - - name: Extract EE debug info from builder stage (depot cache hit) - uses: depot/build-push-action@v1 - with: - context: . - platforms: ${{ matrix.platform }} - target: debuginfo - build-args: | - features=ee - outputs: type=local,dest=./debuginfo - - - name: Rename debug file with corresponding architecture - run: | - mv ./debuginfo/windmill.debug ./debuginfo/windmill-ee-${{ matrix.arch }}.debug - - - name: Attach debug file to release - uses: softprops/action-gh-release@v2 - with: - files: ./debuginfo/windmill-ee-${{ matrix.arch }}.debug - # attach_arm64_binary_to_release: # needs: [build, build_ee] # runs-on: ubicoud diff --git a/Dockerfile b/Dockerfile index d312d3a823..c703f5c7a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -125,11 +125,6 @@ RUN objcopy --only-keep-debug /windmill/target/release/windmill /windmill/target && strip /windmill/target/release/windmill \ && objcopy --add-gnu-debuglink=/windmill/target/release/windmill.debug /windmill/target/release/windmill -# Standalone stage for extracting the .debug file without including it in the final image. -# Build with: docker build --target debuginfo --output type=local,dest=./out . -FROM scratch AS debuginfo -COPY --from=builder /windmill/target/release/windmill.debug /windmill.debug - FROM ${DEBIAN_IMAGE} ARG TARGETPLATFORM @@ -264,6 +259,7 @@ ENV TZ=Etc/UTC COPY --from=builder /frontend/build /static_frontend COPY --from=builder /windmill/target/release/windmill ${APP}/windmill +COPY --from=builder /windmill/target/release/windmill.debug ${APP}/windmill.debug COPY --from=windmill_duckdb_ffi_internal_builder /windmill-duckdb-ffi-internal/target/release/libwindmill_duckdb_ffi_internal.so ${APP}/libwindmill_duckdb_ffi_internal.so COPY --from=denoland/deno:2.2.1 --chmod=755 /usr/bin/deno /usr/bin/deno