Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insufficient logging to diagnose error #298

Closed
danking opened this issue Nov 13, 2024 · 1 comment
Closed

Insufficient logging to diagnose error #298

danking opened this issue Nov 13, 2024 · 1 comment

Comments

@danking
Copy link

danking commented Nov 13, 2024

Hey there! Thanks for building this GitHub action it's saved me a lot of hassle building our Rust codebase.


I am building for linux and macOS. Linux, macOS aarch64, and macOS x86_64 all succeed. The macOS universal2 build fails.
AFAICT, the build failure has no cause. The relevant output follows, but see also the full log. Maybe sccache is swallowing some error?

This build has run successfully before. Two major things have changed since then: we downgraded Python to 3.10 (from 3.11) and downgraded the GHA image to macos-13 (from macos-latest). We downgraded the GHA image to macos-13 to avoid the externally managed environment issue on macOS.

   Compiling pyvortex v0.16.0 (/Users/runner/work/vortex/vortex/pyvortex)
error: could not compile `pyvortex` (lib)
Error: The process '/Users/runner/work/_temp/0acbed2e-9946-4b39-aa5c-3ecded08c021/maturin' failed with exit code 1
Caused by:
    at ExecState._setResult (/Users/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1702:25)
  process didn't exit successfully: `sccache /Users/runner/.rustup/toolchains/nightly-2024-09-04-x86_64-apple-darwin/bin/rustc --crate-name pyvortex --edition=2021 pyvortex/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C lto=thin -C codegen-units=1 '--deny=clippy::cargo' '--deny=clippy::all' --deny=warnings '--deny=clippy::use_debug' '--deny=clippy::unwrap_used' '--deny=clippy::unwrap_in_result' --deny=unused_qualifications --deny=unused_lifetimes --deny=unsafe_op_in_unsafe_fn '--deny=clippy::tests_outside_test_module' '--deny=clippy::same_name_method' --deny=redundant_lifetimes '--deny=clippy::panic_in_result_fn' '--deny=clippy::panic' '--deny=clippy::or_fun_call' '--allow=clippy::multiple_crate_versions' '--deny=clippy::mem_forget' '--deny=clippy::many_single_char_names' '--deny=clippy::manual_is_variant_and' '--deny=clippy::manual_assert' --deny=macro_use_extern_crate '--deny=clippy::inconsistent_struct_cons
    at ExecState.CheckComplete (/Users/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1685:18)
    at ChildProcess.<anonymous> (/Users/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1579:27)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:338:12)
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Failed to build a aarch64 library through cargo
  Caused by: Cargo build finished with "exit status: 101": `env -u CARGO MACOSX_DEPLOYMENT_TARGET="11.0" "cargo" "rustc" "--features" "pyo3/extension-module" "--target" "aarch64-apple-darwin" "--message-format" "json-render-diagnostics" "--manifest-path" "/Users/runner/work/vortex/vortex/pyvortex/Cargo.toml" "--release" "--lib" "--crate-type" "cdylib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/vortex._lib.abi3.so"`
Error: The process '/Users/runner/work/_temp/0acbed2e-9946-4b39-aa5c-3ecded08c021/maturin' failed with exit code 1

My macOS step follows. .github/actions/cleanup deletes some folders. .../setup-rust runs dtolnay/rust-toolchain, Swatinem/rust-cache, and mozilla-actions/sccache-action using the rust-version from rust-toolchain.toml. setup-uv uses astral-sh/setup-uv@v3, installs Python 3.10, and installs our python dependencies.

  macos:
    needs: release-plz-release
    if: ${{ needs.release-plz-release.outputs.releases_created == 'true' }}
    runs-on: macos-13
    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/cleanup
      - uses: ./.github/actions/setup-rust
      - uses: spiraldb/actions/.github/actions/[email protected]
      - name: rust-toolchain
        shell: bash
        run: echo "version=$(cat rust-toolchain.toml | grep channel | awk -F'\"' '{print $2}')" >> $GITHUB_OUTPUT
      - name: Build wheels - x86_64
        uses: PyO3/maturin-action@v1
        with:
          rust-toolchain: ${{ steps.rust-toolchain.version }}
          working-directory: pyvortex
          target: x86_64
          args: --release --interpreter python3.10 --sdist
      - name: Build wheels - aarch64
        uses: PyO3/maturin-action@v1
        with:
          rust-toolchain: ${{ steps.rust-toolchain.version }}
          working-directory: pyvortex
          target: aarch64  # NB: aarch64 becomes arm64 in the wheel's platform tag.
          args: --release --interpreter python3.10
      - name: Build wheels - universal2
        uses: PyO3/maturin-action@v1
        with:
          rust-toolchain: ${{ steps.rust-toolchain.version }}
          working-directory: pyvortex
          target: universal2-apple-darwin
          args: --release --interpreter python3.10

I diff'ed the "Set up job" output from the successful GitHub Action to the new, failing GitHub Action:

diff -u /tmp/success /tmp/failure
--- /tmp/success	2024-11-13 16:05:55
+++ /tmp/failure	2024-11-13 16:05:53
@@ -1,13 +1,13 @@
-Current runner version: '2.319.1'
+Current runner version: '2.320.0'
 Operating System
   macOS
-  14.6.1
-  23G93
+  13.7.1
+  22H221
 Runner Image
-  Image: macos-14-arm64
-  Version: 20240922.1
-  Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240922.1/images/macos/macos-14-arm64-Readme.md
-  Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240922.1
+  Image: macos-13
+  Version: 20241108.324
+  Included Software: https://github.com/actions/runner-images/blob/macos-13/20241108.324/images/macos/macos-13-Readme.md
+  Image Release: https://github.com/actions/runner-images/releases/tag/macos-13%2F20241108.324
 Runner Image Provisioner
   2.0.384.1+6d6c56aa16f1b9c7dd7935df5d63980397e44def
 GITHUB_TOKEN Permissions
@@ -18,6 +18,9 @@
 Prepare workflow directory
 Prepare all required actions
 Getting action download info
-Download action repository 'actions/checkout@v4' (SHA:692973e3d937129bcbf40652eb9f2f61becf3332)
-Download action repository 'PyO3/maturin-action@v1' (SHA:2c5c1560848aaa364c3545136054932db5fa27b7)
-Download action repository 'actions/upload-artifact@v4' (SHA:50769540e7f4bd5e21e526ee35c689e35e0d6874)
+Download action repository 'actions/checkout@v4' (SHA:11bd71901bbe5b1630ceea73d27597364c9af683)
+Download action repository 'spiraldb/[email protected]' (SHA:82d88362e3e17b404dbf568eade8b09dbf178a0a)
+Download action repository 'PyO3/maturin-action@v1' (SHA:ea5bac0f1ccd0ab11c805e2b804bfcb65dac2eab)
+Download action repository 'actions/upload-artifact@v4' (SHA:b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882)
+Getting action download info
+Download action repository 'astral-sh/setup-uv@v3' (SHA:2e657c127d5b1635d5a8e3fa40e0ac50a5bf6992)
@messense
Copy link
Member

You can pass -vv get maturin build for verbose output just like cargo build.

@messense messense closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants