Repository navigation
Conversation
Member
Author
|
Superseded by #2665, same branch reopened from my fork so I can push follow-up commits (the EasyCLA ruleset blocks updates to branches on the upstream repo). |
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.
Fixes #2340.
The Ruby layer was built on
x86_64only, so its native gems (google-protobuf,bigdecimal) crashed onarm64.What changes
ruby/src/otel/Dockerfilenow builds the gems for Ruby 3.3 and 3.4 on bothlinux/amd64andlinux/arm64using the aws sam images, in four parallel stages. A final stage merges both architecture trees into oneruby/gems/<X.Y.0>and zips. RubyGems only activates specs whose platform matches the running machine, so both architectures' gems can live side by side.ruby/src/otel/install-gems.shinstalls with the lockfile frozen and setsinstall_extension_in_lib: false, so compiled extensions exist only underextensions/<arch>-linux/and never in the arch-agnosticgems/<name>/lib/. The build fails if any path differs between the two architecture trees, guarding against future clashes.Gemfile.lockinstead of running Ruby on the runner. The Ruby CI workflow now calls that action.FunctionErroris unset before parsing the payload, so an init crash surfaces as the real error.The layer keeps its same name as today.
Perf Test Results
The layer no longer bundles rbenv's default gems, the gem download cache or generated docs, so it shrinks despite the added architecture:
Verified locally with the Lambda emulator images (
public.ecr.aws/lambda/ruby:3.3and:3.4, amd64 and arm64) throughAWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler: all four combinations load the matching native libraries and start the SDK tracer provider.