Skip to content

[Infra] Get rid of the Terraform/AWS, fix missing arm64 and docker image artifacts #2160

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

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

yannham
Copy link
Member

@yannham yannham commented Feb 10, 2025

Fixes #2156.

We previously used a bespoke AWS EC2 instance in order to build statically linked ARM64 linux release artifacts. However, it hasn't worked in the last 3 releases, and GitHub now provides ARM64 runners out of the box. It's much simpler to just use them, as we do for X86_64, and scrap the whole AWS part.

We previously used a bespoke AWS EC2 instance in order to build
statically linked ARM64 linux release artifacts. However, it hasn't
worked in the last 3 releases, and GitHub now provides ARM64 runners out
of the box. It's much simpler to just use them, as we do for X86_64, and
scrap the whole AWS part.
Copy link
Contributor

github-actions bot commented Feb 10, 2025

@yannham yannham requested a review from jneem February 10, 2025 16:23
@yannham yannham marked this pull request as ready for review February 10, 2025 16:23
@yannham
Copy link
Member Author

yannham commented Feb 10, 2025

I ran the workflows manually and they've been going on for hours, which is a good sign. I will consider this to work as far as we can tell if they fail on the final step when they won't found the release tag.

I'll also drop the last commit, which is just for testing purpose (avoid the failure of the workflows at the very beginning)

with:
ref: ${{ github.event_name == 'release' && '' || github.event.inputs.release_tag }}
# with:
# ref: ${{ github.event_name == 'release' && '' || github.event.inputs.release_tag }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to put this back

with:
ref: ${{ github.event_name == 'release' && '' || github.event.inputs.release_tag }}
# with:
# ref: ${{ github.event_name == 'release' && '' || github.event.inputs.release_tag }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to put this back

with:
ref: ${{ github.event_name == 'release' && '' || github.event.inputs.release_tag }}
# with:
# ref: ${{ github.event_name == 'release' && '' || github.event.inputs.release_tag }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to put this back

@jneem
Copy link
Member

jneem commented Feb 11, 2025

2025-02-10T17:43:10.3699979Z +++ command cargo build --release --message-format json-render-diagnostics --frozen --offline --package nickel-lang-cli
2025-02-10T17:43:14.8108768Z    Compiling cfg-if v1.0.0
2025-02-10T17:43:14.8109096Z    Compiling serde v1.0.197
2025-02-10T17:43:14.8129641Z    Compiling libc v0.2.162
2025-02-10T17:43:14.8160707Z    Compiling once_cell v1.19.0
2025-02-10T17:43:15.6847272Z error: rustc interrupted by SIGSEGV, printing backtrace
2025-02-10T17:43:15.6850544Z 
2025-02-10T17:43:15.6851345Z /nix/store/bkscnhmwafli28sxzjhyx5yv5q57b3w5-rust-minimal-1.84.1/lib/librustc_driver-6483a246a57da5ec.so(+0xbf8430) [0xffffee9f8430]
2025-02-10T17:43:15.6852125Z linux-vdso.so.1(__kernel_rt_sigreturn+0x0) [0xfffff7ffb7e0]
2025-02-10T17:43:15.6852414Z 
2025-02-10T17:43:15.6852686Z note: we would appreciate a report at https://github.com/rust-lang/rust
2025-02-10T17:43:15.6853352Z help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216

🤔

Maybe this is unrelated, but it seems like the long build time is because we're trying to rebuild a bunch of nix arm stuff. Maybe switching from nixos-unstable to nixos-24.11 would make us hit the cache more?

@yannham
Copy link
Member Author

yannham commented Feb 11, 2025

Maybe this is unrelated, but it seems like the long build time is because we're trying to rebuild a bunch of nix arm stuff. Maybe switching from nixos-unstable to nixos-24.11 would make us hit the cache more?

Officially, Hydra provides ARM64 binaries for the stable and the unstable channel. But if it's moving fast I guess you can miss some of them in unstable? In general this is a good question to ask. I think we still need unstable for some dependencies, typically Topiary - if we want to take it from Nixpkgs instead of directly from the flake. We could probably use stable for the Rust toolchain but I wonder if that would be a win, as having two different nixpkgs versions comes with a risk of losing sharing of core libraries and binaries.

Or take everything "cutting-edge" from github directly and use an follows to use the latest stable version of NixOS, but that also comes with a risk (that it just doesn't work - I think a user had this problem with Topiary recently, which wasn't backward compatible with older Nixpkgs).

@yannham yannham force-pushed the infra/get-rid-of-AWS-runner branch from 17bc485 to 9d3a5b8 Compare February 11, 2025 09:30
@yannham
Copy link
Member Author

yannham commented Feb 11, 2025

I'm not sure what to do about RustC's segfault though 😰

@yannham
Copy link
Member Author

yannham commented Feb 11, 2025

rust-lang/rust#135867: it seems it's a known bug and switching to ubuntu-22 images instead of 24 is a work-around for now.

@yannham yannham requested a review from jneem February 11, 2025 09:55
@yannham yannham added this pull request to the merge queue Feb 11, 2025
Merged via the queue into master with commit 71fb519 Feb 11, 2025
5 checks passed
@yannham yannham deleted the infra/get-rid-of-AWS-runner branch February 11, 2025 13:28
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 this pull request may close these issues.

The release build for ARM64 is broken
2 participants