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

aarch64-darwin not working? #60

Closed
n8henrie opened this issue Jan 22, 2025 · 10 comments · Fixed by #61
Closed

aarch64-darwin not working? #60

n8henrie opened this issue Jan 22, 2025 · 10 comments · Fixed by #61

Comments

@n8henrie
Copy link

n8henrie commented Jan 22, 2025

hello seems to be fine for aarch64-darwin: https://hydra.nixos.org/job/nixpkgs/trunk/hello.aarch64-darwin/all

However I get the following error with hydra-check:

$ hydra-check --arch aarch64-darwin hello
Build Status for nixpkgs.hello.aarch64-darwin on unstable
⚠ This job is not a member of the latest evaluation of its jobset. This means it was removed or had an evaluation error.
$
$ hydra-check --arch aarch64-linux hello
Build Status for nixpkgs.hello.aarch64-linux on unstable
✔ hello-2.12.1 from 2025-01-20 - https://hydra.nixos.org/build/285921174
  • system: "aarch64-linux"
  • host os: Linux 6.9.12-asahi, NixOS, 24.11 (Vicuna), 24.11.20240728.52ec9ac
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.18.5
  • nixpkgs: /nix/store/bcghcr9qwqmanpds017w75mcqda4fgab-source
@bryango
Copy link
Collaborator

bryango commented Jan 23, 2025

Hey thank you for the report! I'm currently only on my phone but I'll get back to debugging as soon as I have a computer. In the meantime, can you try to supply the --channel nixpkgs-unstable flag and see if it works? Thanks!

@n8henrie
Copy link
Author

Hmm, it's working fine from an aarch64-darwin host (whether or not I specify --arch aarch64-darwin). Let me try again once I'm back in aarch64-linux.

@n8henrie
Copy link
Author

n8henrie commented Jan 23, 2025

I spun up an aarch64-linux VM; it seems that specifying the channel works:

$ ./target/debug/hydra-check hello --arch aarch64-darwin
Build Status for nixpkgs.hello.aarch64-darwin on jobset nixos/trunk-combined
https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.hello.aarch64-darwin
⚠ This job is not a member of the latest evaluation of its jobset. This means it was removed or had an evaluation error.
$
$ ./target/debug/hydra-check hello --arch aarch64-darwin --channel nixpkgs-unstable
Build Status for hello.aarch64-darwin on jobset nixpkgs/trunk
https://hydra.nixos.org/job/nixpkgs/trunk/hello.aarch64-darwin
✔  hello-2.12.1  2025-01-19  https://hydra.nixos.org/build/285710951
✔  hello-2.12.1  2024-12-23  https://hydra.nixos.org/build/282840857
✔  hello-2.12.1  2024-12-03  https://hydra.nixos.org/build/280880055
✔  hello-2.12.1  2024-11-14  https://hydra.nixos.org/build/278499313
✔  hello-2.12.1  2024-10-31  https://hydra.nixos.org/build/276822665
✔  hello-2.12.1  2024-10-14  https://hydra.nixos.org/build/274887021
✔  hello-2.12.1  2024-09-10  https://hydra.nixos.org/build/271805079
✔  hello-2.12.1  2024-08-31  https://hydra.nixos.org/build/271022668
✔  hello-2.12.1  2024-08-15  https://hydra.nixos.org/build/269446813
✔  hello-2.12.1  2024-07-29  https://hydra.nixos.org/build/267891275

Looking at the output, looks like the working URL is the same when run from darwin host and when specifying the channel, but different when run from aarch64-linux without specifying the channel:

working:    https://hydra.nixos.org/job/nixpkgs/trunk/hello.aarch64-darwin   
nonworking: https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.hello.aarch64-darwin

@bryango
Copy link
Collaborator

bryango commented Jan 24, 2025

This is actually intended behavior (inherited from v1); namely, on NixOS the channel would default to nixos-unstable (which does not build for aarch64-darwin). But I believe we can do better: if the --arch is unsupported by NixOS we should fallback to nixpkgs-unstable. Please see if #61 works for you!

@doronbehar
Copy link
Contributor

But I believe we can do better: if the --arch is unsupported by NixOS we should fallback to nixpkgs-unstable. Please see if #61 works for you!

That was the whole point of #40 ! Thanks for quick fix :) Maybe a release would be nice but last time it took ~2.5 weeks so I'll nix profile install github:nix-community/hydra-check in the meantime..

@bryango
Copy link
Collaborator

bryango commented Jan 27, 2025

That was the whole point of #40 ! Thanks for quick fix :) Maybe a release would be nice but last time it took ~2.5 weeks so I'll nix profile install github:nix-community/hydra-check in the meantime..

Ah yes indeed! So this issue is in fact a regression from v1... Sorry for missing that 😆 I will try to make a bugfix release after #62. That one mostly consists of trivial changes so if there is no objection, I will self-merge it and make a new release before the end of this week.

@n8henrie
Copy link
Author

Would there be any interest in adding a (very basic) "integration" test, e.g. to GitHub Actions? I'd be happy to contribute one for linux and darwin that just checks for the hello package (which I presume should almost never be broken). No worries if that doesn't seem like the right approach for this project.

Alternatively could probably sort out a flake check that does the same in nix but would require network access (so perhaps mock the hydra endpoint). Or use something like httpmock to do the same in rust.

(Although I'll need to familiarize myself with the docs on whether there are different exit codes for "hydra build is broken" vs "hydra-check had an error".)

@bryango
Copy link
Collaborator

bryango commented Jan 27, 2025

Would there be any interest in adding a (very basic) "integration" test, e.g. to GitHub Actions? I'd be happy to contribute one for linux and darwin that just checks for the hello package (which I presume should almost never be broken). No worries if that doesn't seem like the right approach for this project.

Actually I have been trying to do that with the trycmd crate, which is able to automatically validate the examples listed in README. However, due to the non-deterministic nature of hydra-check's output, I have to rely on a fork of trycmd which only validates the exit status of a command. See:

bryango/hydra-check@16658dc...02e6e41#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fc

Maybe we can do something simpler instead, based on your idea. A PR is definitely welcomed! 😁 Oh and please rebase it upon #62 as that one is about to be merged.

@bryango
Copy link
Collaborator

bryango commented Feb 1, 2025

Maybe a release would be nice but last time it took ~2.5 weeks so I'll nix profile install github:nix-community/hydra-check in the meantime..

I have made a new patch release v2.0.2 which should address this issue!

@doronbehar
Copy link
Contributor

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

Successfully merging a pull request may close this issue.

3 participants