jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
13.81k stars 3.12k forks source link

Tests on CI on MacOS are failing due to GitHub runners switching to arm64 #16244

Closed krassowski closed 2 weeks ago

krassowski commented 2 weeks ago

CI is failing on main and in PRs with:

Run browser-actions/setup-firefox@latest
Setup firefox latest (en-US)
Attempting to download firefox latest...
Error: Unsupported platform macos arm64 for version latest

Of note in nbclassic we also saw (https://github.com/jupyter/nbclassic/pull/274):

Run actions/setup-python@v1
  with:
    python-version: 3.10
    architecture: x64
Error: Version 3.10 with arch x64 not found
Available versions:
krassowski commented 2 weeks ago

For reference: https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/

jtpio commented 2 weeks ago

Maybe we could pin on macos-12 for now, and in a separate change we add macos-latest to the matrix?

krassowski commented 2 weeks ago

That is one solution. Another is to switch away from https://github.com/browser-actions/setup-firefox as this is not an official action (assuming everything else works).

krassowski commented 2 weeks ago

Even when installing firefox successfully with brew the action then fails on yarn install: https://github.com/krassowski/jupyterlab/actions/runs/8846373649/job/24292122471?pr=116

➤ YN0000: ┌ Project validation
Project validation
      ➤ YN0000: └ Completed
      ➤ YN0000: ┌ Resolution step
Resolution step
      ➤ YN0000: └ Completed in 0s [55](https://github.com/krassowski/jupyterlab/actions/runs/8846373649/job/24292122471?pr=116#step:5:57)1ms
      ➤ YN0000: ┌ Fetch step
Fetch step
      ➤ YN0000: └ Completed in 36s [56](https://github.com/krassowski/jupyterlab/actions/runs/8846373649/job/24292122471?pr=116#step:5:58)9ms
      ➤ YN0000: ┌ Link step
Link step
      ➤ YN0000: └ Completed in 38s 548ms
      ➤ YN0000: Failed with errors in 1m 16s

The failure is in the Link step, unsurprisingly from canvas:

➤ YN0000: │ @fortawesome/fontawesome-free@npm:5.15.4 STDOUT Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com/
        ➤ YN0000: │ @fortawesome/fontawesome-free@npm:5.15.4 STDOUT License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
        ➤ YN0000: │ @fortawesome/fontawesome-free@npm:5.15.4 STDOUT
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp info it worked if it ends with ok
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp info using node-pre-gyp@1.0.10
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp info using node@20.12.2 | darwin | arm64
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-darwin-unknown-arm64.tar.gz
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-darwin-unknown-arm64.tar.gz
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp WARN Pre-built binaries not installable for canvas@2.11.2 and node@20.12.2 (node-v115 ABI, unknown) (falling back to source compile with node-gyp)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-darwin-unknown-arm64.tar.gz
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info it worked if it ends with ok
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info using node-gyp@9.3.1
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info using node@20.12.2 | darwin | arm64
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info ok
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info it worked if it ends with ok
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info using node-gyp@9.3.1
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info using node@20.12.2 | darwin | arm64
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info find Python using Python version 3.11.9 found at "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp http GET https://nodejs.org/download/release/v20.12.2/node-v20.12.2-headers.tar.gz
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp http 200 https://nodejs.org/download/release/v20.12.2/node-v20.12.2-headers.tar.gz
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp http GET https://nodejs.org/download/release/v20.12.2/SHASUMS256.txt
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp http 200 https://nodejs.org/download/release/v20.12.2/SHASUMS256.txt
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args [
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '/Users/runner/work/jupyterlab/jupyterlab/node_modules/node-gyp/gyp/gyp_main.py',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   'binding.gyp',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-f',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   'make',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-I',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '/Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas/build/config.gypi',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-I',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '/Users/runner/work/jupyterlab/jupyterlab/node_modules/node-gyp/addon.gypi',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-I',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '/Users/runner/Library/Caches/node-gyp/20.12.2/include/node/common.gypi',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-Dlibrary=shared_library',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-Dvisibility=default',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-Dnode_root_dir=/Users/runner/Library/Caches/node-gyp/20.12.2',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-Dnode_gyp_dir=/Users/runner/work/jupyterlab/jupyterlab/node_modules/node-gyp',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-Dnode_lib_file=/Users/runner/Library/Caches/node-gyp/20.12.2/<(target_arch)/node.lib',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-Dmodule_root_dir=/Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-Dnode_engine=v8',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '--depth=.',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '--no-parallel',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '--generator-output',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   'build',
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args   '-Goutput_dir=.'
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp info spawn args ]
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR Package pangocairo was not found in the pkg-config search path.
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR Perhaps you should add the directory containing `pangocairo.pc'
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR to the PKG_CONFIG_PATH environment variable
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR No package 'pangocairo' found
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp: Call to 'pkg-config pangocairo --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! configure error
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! stack Error: `gyp` failed with exit code: 1
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! stack     at ChildProcess.onCpExit (/Users/runner/work/jupyterlab/jupyterlab/node_modules/node-gyp/lib/configure.js:325:16)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! System Darwin 23.4.0
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! command "/Users/runner/hostedtoolcache/node/20.12.2/arm64/bin/node" "/Users/runner/work/jupyterlab/jupyterlab/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=/Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v115"
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! cwd /Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! node -v v20.12.2
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! node-gyp -v v9.3.1
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR gyp ERR! not ok
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! build error
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! stack Error: Failed to execute '/Users/runner/hostedtoolcache/node/20.12.2/arm64/bin/node /Users/runner/work/jupyterlab/jupyterlab/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/runner/work/jupyterlab/jupyterlab/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1[105](https://github.com/krassowski/jupyterlab/actions/runs/8846373649/job/24292122471?pr=116#step:5:109):16)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! System Darwin 23.4.0
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! command "/Users/runner/hostedtoolcache/node/20.12.2/arm64/bin/node" "/Users/runner/work/jupyterlab/jupyterlab/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! cwd /Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! node -v v20.12.2
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! node-pre-gyp -v v1.0.10
        ➤ YN0000: │ canvas@npm:2.11.2 STDERR node-pre-gyp ERR! not ok
        ➤ YN0000: │ canvas@npm:2.11.2 STDOUT Failed to execute '/Users/runner/hostedtoolcache/node/20.12.2/arm64/bin/node /Users/runner/work/jupyterlab/jupyterlab/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/runner/work/jupyterlab/jupyterlab/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v[115](https://github.com/krassowski/jupyterlab/actions/runs/8846373649/job/24292122471?pr=116#step:5:119)' (1)
        ➤ YN0009: │ canvas@npm:2.11.2 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/xfs-2df36a17/build.log)
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > @jupyterlab/buildutils@4.2.0-beta.3 clean
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > rimraf lib && rimraf tsconfig.tsbuildinfo
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > @jupyterlab/buildutils@4.2.0-beta.3 build
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > tsc && cd template && npm run build
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > @jupyterlab/template@4.2.0-beta.3 build
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > tsc -b
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > @jupyterlab/builder@4.2.0-beta.3 clean
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > rimraf lib && rimraf tsconfig.tsbuildinfo
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > @jupyterlab/builder@4.2.0-beta.3 build
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT > tsc
        ➤ YN0000: │ @jupyterlab/repo-top@workspace:. STDOUT
      ➤ YN0000: └ Completed in 38s 548ms
krassowski commented 2 weeks ago

I opened https://github.com/jupyterlab/jupyterlab/pull/16245 - what do you think @jtpio? Do you see an additional value in adding macos-12 if we can get macos-latest to pass?

krassowski commented 2 weeks ago

My personal take is that macos-12 was often timing out and I hope that the new runners will be a tad faster :crossed_fingers:

jtpio commented 2 weeks ago

Nice, thanks for the fix!

We can go with #16245 if it fixes the issue for sure. I was wondering if there was value for testing multiple versions of macos, but the CI setup is also already quite complex. Maybe testing on multiple versions of macos could be useful for Notebook 7 in the context of https://github.com/jupyter/notebook/issues/6974.