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

Examples don't work on macOS CI runner #176

Closed
itsadrake opened this issue Jan 5, 2022 · 4 comments
Closed

Examples don't work on macOS CI runner #176

itsadrake opened this issue Jan 5, 2022 · 4 comments
Assignees
Labels
P1 critical: next release type: bug

Comments

@itsadrake
Copy link
Contributor

Describe the bug
The examples CI job does not work on any version of the macOS runner.

To Reproduce
Add macos-11 or macos-10.15 to the list of runners for the examples job.

Expected behavior
CI jobs should pass.

Additional context

  1. Our examples pin nixpkgs, ideally to a release to avoid cache misses. At the time of writing, the most obvious options are 21.05 and 21.11.
  2. The Go toolchain requires at least Bazel 4.2.x., which is present in 21.11, but not in 21.05 (4.0.0).
  3. We must therefore pin against at least 21.11.
  4. nixpkgs at 21.11 seems to have broken the Darwin stdenv for macos-10.15 with this commit: NixOS/nixpkgs@a634fbe
  5. We must therefore use at least macos-11.
  6. macos-11 CI support is broken and tracked with this bug: tweag/rules_nixpkgs#175
@aherrmann
Copy link
Member

Thanks for writing up the context!

[...] ideally to a release to avoid cache misses [...]
3. We must therefore pin against at least 21.11.

This is not strictly true. Nixpkgs is continuously built on hydra and pushed to the nixpkgs community cache in between releases as well. To find a cached nixpkgs revision that provides that bazel version you can

E.g. https://hydra.nixos.org/build/153268139 seems to fit the bill: It provides Bazel 4.2.1 and not contain the offending line in stdenv. A quick local test shows bazel being fetched from cache

$ nix-build https://github.com/NixOS/nixpkgs/archive/a3c4956cf9cb921d61b4a5c30df6ef1c07d2fae4.tar.gz -A bazel_4

See also here for some hints on how to find cached revisions.

@aherrmann aherrmann added the P1 critical: next release label Jan 5, 2022
@itsadrake
Copy link
Contributor Author

itsadrake commented Jan 6, 2022

Indeed that wording is a bit too strict. I think pinning to releases is more representative of real-world usage however; if someone uses the example in the wild and wishes to update nixpkgs to get an updated toolchain, it might be a nasty surprise when it fails on macOS.

YorikSar added a commit that referenced this issue Feb 17, 2022
On CI we set NIX_PATH to "nixpkgs=./nixpkgs.nix", so nix-shell tries to
use it from within the example's directory and fails, it tries to use
builtin bash. On macOS it is too old, so we should make sure that the
one from nixpkgs is used.

Related to #176
YorikSar added a commit that referenced this issue Feb 17, 2022
All examples are already using 21.11 nixpkgs, so they should work on
Big Sur.

Related to #176
@YorikSar YorikSar assigned YorikSar and unassigned aherrmann Feb 17, 2022
@YorikSar
Copy link
Member

Python example will be fixed in #186.

@YorikSar
Copy link
Member

Rust example will be fixed in #187.

YorikSar added a commit that referenced this issue Feb 17, 2022
All examples are already using 21.11 nixpkgs, so that shouldn't prevent
them from working on Big Sur.

Python example is broken because of #186 and Rust one because of #187,
so skip them for now.

Fixes #176
YorikSar added a commit that referenced this issue Feb 17, 2022
All examples are already using 21.11 nixpkgs, so that shouldn't prevent
them from working on Big Sur.

Python example is broken because of #186 and Rust one because of #187,
so skip them for now.

Fixes #176
@mergify mergify bot closed this as completed in 5110ff1 Feb 21, 2022
ryanbujnowicz pushed a commit to ryanbujnowicz/rules_nixpkgs that referenced this issue Mar 5, 2022
On CI we set NIX_PATH to "nixpkgs=./nixpkgs.nix", so nix-shell tries to
use it from within the example's directory and fails, it tries to use
builtin bash. On macOS it is too old, so we should make sure that the
one from nixpkgs is used.

Related to tweag#176
ryanbujnowicz pushed a commit to ryanbujnowicz/rules_nixpkgs that referenced this issue Mar 5, 2022
All examples are already using 21.11 nixpkgs, so that shouldn't prevent
them from working on Big Sur.

Python example is broken because of tweag#186 and Rust one because of tweag#187,
so skip them for now.

Fixes tweag#176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 critical: next release type: bug
Projects
None yet
Development

No branches or pull requests

3 participants