trunk-merge/pr-1137/4988dac1-8ba4-4f75-afd9-7f353f252346#1138
Closed
trunk-io[bot] wants to merge 9 commits into
Closed
trunk-merge/pr-1137/4988dac1-8ba4-4f75-afd9-7f353f252346#1138trunk-io[bot] wants to merge 9 commits into
trunk-io[bot] wants to merge 9 commits into
Conversation
The precompiled *-linux gems are glibc-only. Since 0.13.0 the native extension references __res_init (a glibc-exclusive resolver symbol), so loading the gem on musl-based distros like Alpine fails with: LoadError: Error relocating .../rspec_trunk_flaky_tests.so: __res_init: symbol not found Cross-compiling the extension against musl produces a .so that links against musl's libc and drops the glibc-only symbol references. - Build x86_64-linux-musl and aarch64-linux-musl gems in the release workflow (rake-compiler-dock/oxidize-rb already support these targets). - Add a test-musl-gem job that installs each musl gem inside an official ruby:*-alpine container and requires + exercises the native extension (env_parse) to catch __res_init-style relocation regressions. Gate publishing on it. setup-ruby has no Alpine support, so the artifact is downloaded on the host and run via docker. - Advertise the musl platforms in the load-error message, gem README, and the dev Gemfile.lock PLATFORMS list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RumF5roNQnj2XsBS6erPVn
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RumF5roNQnj2XsBS6erPVn
Replace the synthetic env_parse call with the same RSpec smoke specs that test-ruby-gem runs, executed inside an Alpine container against the precompiled musl gem. This exercises the full runtime on musl — native extension load, quarantine lookup over TLS/DNS, result serialization, and upload — rather than just confirming the extension loads. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RumF5roNQnj2XsBS6erPVn
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RumF5roNQnj2XsBS6erPVn
Replace the bare x86_64-linux/aarch64-linux builds with explicit -linux-gnu and -linux-musl variants, and drop Ruby 3.0 from the build and test matrices (required_ruby_version >= 3.1). Shipping bare -linux alongside -linux-musl is a combination the rake-compiler-dock maintainers warn against — it triggers bundler resolution failures on some rubygems/bundler versions. The explicit gnu/musl split resolves unambiguously, but requires rubygems 3.3.22+ / bundler 2.3.21+, which first ships with Ruby 3.1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RumF5roNQnj2XsBS6erPVn
…t comment - Revert Gemfile.lock PLATFORMS to the original set; the cross-gem build containers are glibc x86_64 hosts that cross-compile, so bundler only needs x86_64-linux (the alias for -gnu) there — the added musl/gnu entries weren't necessary. - Correct the inaccurate comment on the musl smoke-test step (it described the old gnu-on-musl load failure, not what this test does). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RumF5roNQnj2XsBS6erPVn
Add an `alpine` input to the shared test_ruby_gem_uploads action. When set, it skips the host (ruby/setup-ruby + bundler) steps and instead runs the smoke specs inside a ruby:*-alpine container via docker against the precompiled musl gem. test-musl-gem now just calls the action with alpine: true, gated on the musl matrix entries. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RumF5roNQnj2XsBS6erPVn
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RumF5roNQnj2XsBS6erPVn
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1138 +/- ##
==========================================
+ Coverage 82.52% 82.77% +0.25%
==========================================
Files 70 70
Lines 15588 15588
==========================================
+ Hits 12864 12903 +39
+ Misses 2724 2685 -39 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was created and is being managed by Trunk Merge.
This pull request is based on the main branch at SHA 3f8ab75626154aecee598888f02c1334d172a8f9.
See more details here.
When CI completes, this pull request will be closed automatically.
Pull Requests Being Tested
This pull request is testing the changes from pull request 1137.