From 0859a607de2084cd50892e55046b3151ea275667 Mon Sep 17 00:00:00 2001 From: DCchoudhury15 Date: Mon, 8 Jun 2026 10:23:37 +0530 Subject: [PATCH 1/8] feat(ruby): build and release layer for both amd64 and arm64 architectures Fixes #2340 --- .github/actions/build-layer/action.yml | 6 ++ .github/actions/build-ruby-layer/action.yml | 27 ++++++++- .github/workflows/integration-test.yml | 35 +++++++++++- .github/workflows/release-layer-ruby.yml | 62 +++++++++++++++++---- ruby/src/build.sh | 13 ++++- 5 files changed, 125 insertions(+), 18 deletions(-) diff --git a/.github/actions/build-layer/action.yml b/.github/actions/build-layer/action.yml index 34806538cc..7de82593c8 100644 --- a/.github/actions/build-layer/action.yml +++ b/.github/actions/build-layer/action.yml @@ -5,6 +5,10 @@ inputs: language: description: 'Language of the layer to build (nodejs, python, ruby, javaagent, javawrapper)' required: true + architecture: + description: 'Target architecture (amd64 or arm64). Only used for ruby.' + required: false + default: amd64 outputs: artifact-path: @@ -28,6 +32,8 @@ runs: - if: ${{ inputs.language == 'ruby' }} id: ruby uses: ./.github/actions/build-ruby-layer + with: + architecture: ${{ inputs.architecture }} - if: ${{ inputs.language == 'javaagent' || inputs.language == 'javawrapper' }} id: java diff --git a/.github/actions/build-ruby-layer/action.yml b/.github/actions/build-ruby-layer/action.yml index 0fc7f4597f..5e75d6179f 100644 --- a/.github/actions/build-ruby-layer/action.yml +++ b/.github/actions/build-ruby-layer/action.yml @@ -1,28 +1,49 @@ name: 'Build Ruby Lambda Layer' description: 'Builds the OpenTelemetry Ruby Lambda layer' +inputs: + architecture: + description: 'Target architecture (amd64 or arm64)' + required: false + default: amd64 + outputs: artifact-path: description: 'Absolute path to the layer zip artifact' - value: ${{ github.workspace }}/ruby/src/build/opentelemetry-ruby-layer.zip + value: ${{ github.workspace }}/ruby/src/build/opentelemetry-ruby-layer-${{ inputs.architecture }}.zip component-version: description: 'OpenTelemetry Ruby SDK version included in the layer' - value: ${{ steps.version.outputs.component-version }} + value: ${{ steps.version.outputs.component-version || steps.version-skip.outputs.component-version }} runs: using: composite steps: + - name: Set up QEMU for cross-platform builds + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 + - name: Build Ruby layer shell: bash working-directory: ruby/src + env: + ARCH: ${{ inputs.architecture }} run: ./build.sh - name: Save Ruby OpenTelemetry SDK version + if: ${{ inputs.architecture == 'amd64' }} id: version shell: bash working-directory: ruby/src run: | - unzip -q build/opentelemetry-ruby-layer.zip + unzip -q build/opentelemetry-ruby-layer-amd64.zip export GEM_PATH=$PWD/ruby/gems/3.3.0/ SDK_VERSION=$(ruby -e 'require "opentelemetry-sdk"; puts OpenTelemetry::SDK::VERSION') echo "component-version=$SDK_VERSION" >> "$GITHUB_OUTPUT" + + - name: Skip version output for non-amd64 + if: ${{ inputs.architecture != 'amd64' }} + id: version-skip + shell: bash + run: echo "component-version=" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 4d3aebb93e..83e1f8a4aa 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -71,15 +71,29 @@ jobs: fail-fast: false matrix: language: ${{ fromJson(needs.prepare-languages.outputs.languages) }} + architecture: [amd64, arm64] + exclude: + - language: nodejs + architecture: arm64 + - language: python + architecture: arm64 + - language: javaagent + architecture: arm64 + - language: javawrapper + architecture: arm64 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: ./.github/actions/build-layer id: build with: language: ${{ matrix.language }} + architecture: ${{ matrix.architecture }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: opentelemetry-${{ matrix.language }}-layer.zip + name: >- + ${{ matrix.language == 'ruby' + && format('opentelemetry-ruby-layer-{0}.zip', matrix.architecture) + || format('opentelemetry-{0}-layer.zip', matrix.language) }} path: ${{ steps.build.outputs.artifact-path }} test: @@ -93,6 +107,15 @@ jobs: matrix: language: ${{ fromJson(needs.prepare-languages.outputs.languages) }} architecture: [amd64, arm64] + exclude: + - language: nodejs + architecture: arm64 + - language: python + architecture: arm64 + - language: javaagent + architecture: arm64 + - language: javawrapper + architecture: arm64 runs-on: ubuntu-latest permissions: contents: read @@ -111,7 +134,10 @@ jobs: - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: - name: opentelemetry-${{ matrix.language }}-layer.zip + name: >- + ${{ matrix.language == 'ruby' + && format('opentelemetry-ruby-layer-{0}.zip', matrix.architecture) + || format('opentelemetry-{0}-layer.zip', matrix.language) }} path: artifacts/ - uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0 @@ -148,6 +174,9 @@ jobs: TEST_LANGUAGE: ${{ matrix.language }} TEST_ARCHITECTURE: ${{ matrix.architecture }} COLLECTOR_LAYER_ZIP: ${{ github.workspace }}/artifacts/opentelemetry-collector-layer-${{ matrix.architecture }}.zip - INSTRUMENTATION_LAYER_ZIP: ${{ github.workspace }}/artifacts/opentelemetry-${{ matrix.language }}-layer.zip + INSTRUMENTATION_LAYER_ZIP: >- + ${{ matrix.language == 'ruby' + && format('{0}/artifacts/opentelemetry-ruby-layer-{1}.zip', github.workspace, matrix.architecture) + || format('{0}/artifacts/opentelemetry-{1}-layer.zip', github.workspace, matrix.language) }} GITHUB_RUN_ID: ${{ github.run_id }} GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }} diff --git a/.github/workflows/release-layer-ruby.yml b/.github/workflows/release-layer-ruby.yml index c1be779f58..8b535d1b63 100644 --- a/.github/workflows/release-layer-ruby.yml +++ b/.github/workflows/release-layer-ruby.yml @@ -12,20 +12,52 @@ permissions: jobs: build-layer: runs-on: ubuntu-latest - outputs: - component-version: ${{ steps.build.outputs.component-version }} + strategy: + fail-fast: false + matrix: + architecture: + - amd64 + - arm64 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: ./.github/actions/build-ruby-layer id: build + with: + architecture: ${{ matrix.architecture }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 name: Save assembled layer to build with: - name: opentelemetry-ruby-layer.zip + name: opentelemetry-ruby-layer-${{ matrix.architecture }}.zip path: ${{ steps.build.outputs.artifact-path }} + - name: Save component version to file (amd64 only) + if: ${{ matrix.architecture == 'amd64' }} + shell: bash + run: echo "${{ steps.build.outputs.component-version }}" > component-version.txt + + - name: Upload component version artifact (amd64 only) + if: ${{ matrix.architecture == 'amd64' }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ruby-component-version + path: component-version.txt + + get-version: + runs-on: ubuntu-latest + needs: [build-layer] + outputs: + component-version: ${{ steps.read-version.outputs.version }} + steps: + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: ruby-component-version + + - id: read-version + shell: bash + run: echo "version=$(cat component-version.txt)" >> "$GITHUB_OUTPUT" + integration-test: permissions: contents: read @@ -52,21 +84,30 @@ jobs: - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: - name: opentelemetry-ruby-layer.zip + name: opentelemetry-ruby-layer-amd64.zip - - name: Add Binary to Release - run: gh release upload ${{ github.ref_name }} opentelemetry-ruby-layer.zip + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: opentelemetry-ruby-layer-arm64.zip + + - name: Add Binaries to Release + run: | + gh release upload ${{ github.ref_name }} opentelemetry-ruby-layer-amd64.zip + gh release upload ${{ github.ref_name }} opentelemetry-ruby-layer-arm64.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-layer: - permissions: # required by the reusable workflow + permissions: contents: read id-token: write uses: ./.github/workflows/layer-publish.yml - needs: [build-layer, create-release] + needs: [build-layer, create-release, get-version] strategy: matrix: + architecture: + - amd64 + - arm64 aws_region: - af-south-1 - ap-east-1 @@ -103,9 +144,10 @@ jobs: - us-west-1 - us-west-2 with: - artifact-name: opentelemetry-ruby-layer.zip + artifact-name: opentelemetry-ruby-layer-${{ matrix.architecture }}.zip layer-name: opentelemetry-ruby - component-version: ${{ needs.build-layer.outputs.component-version }} + component-version: ${{ needs.get-version.outputs.component-version }} + architecture: ${{ matrix.architecture }} runtimes: ruby3.3 ruby3.4 release-group: prod aws_region: ${{ matrix.aws_region }} diff --git a/ruby/src/build.sh b/ruby/src/build.sh index 01503ee944..672cc150ed 100755 --- a/ruby/src/build.sh +++ b/ruby/src/build.sh @@ -1,7 +1,16 @@ #!/bin/sh set -e +ARCH=${ARCH:-amd64} +PLATFORM="linux/${ARCH}" + mkdir -p build -docker build --progress plain -t aws-otel-lambda-ruby-layer otel -docker run --rm -v "$(pwd)/build:/out" aws-otel-lambda-ruby-layer +docker build --progress plain --platform "$PLATFORM" \ + -t "aws-otel-lambda-ruby-layer-${ARCH}" otel + +docker run --rm --platform "$PLATFORM" \ + -v "$(pwd)/build:/out" \ + "aws-otel-lambda-ruby-layer-${ARCH}" + +mv build/opentelemetry-ruby-layer.zip "build/opentelemetry-ruby-layer-${ARCH}.zip" From ddf4cfbdde42bf57bbc76b61cd39a009d2bb6e79 Mon Sep 17 00:00:00 2001 From: DCchoudhury15 Date: Wed, 10 Jun 2026 09:29:50 +0530 Subject: [PATCH 2/8] fix: use native arm64 runner instead of QEMU, restore integration test coverage --- .github/workflows/integration-test.yml | 35 ++---------------------- .github/workflows/release-layer-ruby.yml | 2 +- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 83e1f8a4aa..4d3aebb93e 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -71,29 +71,15 @@ jobs: fail-fast: false matrix: language: ${{ fromJson(needs.prepare-languages.outputs.languages) }} - architecture: [amd64, arm64] - exclude: - - language: nodejs - architecture: arm64 - - language: python - architecture: arm64 - - language: javaagent - architecture: arm64 - - language: javawrapper - architecture: arm64 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: ./.github/actions/build-layer id: build with: language: ${{ matrix.language }} - architecture: ${{ matrix.architecture }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: >- - ${{ matrix.language == 'ruby' - && format('opentelemetry-ruby-layer-{0}.zip', matrix.architecture) - || format('opentelemetry-{0}-layer.zip', matrix.language) }} + name: opentelemetry-${{ matrix.language }}-layer.zip path: ${{ steps.build.outputs.artifact-path }} test: @@ -107,15 +93,6 @@ jobs: matrix: language: ${{ fromJson(needs.prepare-languages.outputs.languages) }} architecture: [amd64, arm64] - exclude: - - language: nodejs - architecture: arm64 - - language: python - architecture: arm64 - - language: javaagent - architecture: arm64 - - language: javawrapper - architecture: arm64 runs-on: ubuntu-latest permissions: contents: read @@ -134,10 +111,7 @@ jobs: - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: - name: >- - ${{ matrix.language == 'ruby' - && format('opentelemetry-ruby-layer-{0}.zip', matrix.architecture) - || format('opentelemetry-{0}-layer.zip', matrix.language) }} + name: opentelemetry-${{ matrix.language }}-layer.zip path: artifacts/ - uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0 @@ -174,9 +148,6 @@ jobs: TEST_LANGUAGE: ${{ matrix.language }} TEST_ARCHITECTURE: ${{ matrix.architecture }} COLLECTOR_LAYER_ZIP: ${{ github.workspace }}/artifacts/opentelemetry-collector-layer-${{ matrix.architecture }}.zip - INSTRUMENTATION_LAYER_ZIP: >- - ${{ matrix.language == 'ruby' - && format('{0}/artifacts/opentelemetry-ruby-layer-{1}.zip', github.workspace, matrix.architecture) - || format('{0}/artifacts/opentelemetry-{1}-layer.zip', github.workspace, matrix.language) }} + INSTRUMENTATION_LAYER_ZIP: ${{ github.workspace }}/artifacts/opentelemetry-${{ matrix.language }}-layer.zip GITHUB_RUN_ID: ${{ github.run_id }} GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }} diff --git a/.github/workflows/release-layer-ruby.yml b/.github/workflows/release-layer-ruby.yml index 8b535d1b63..e39190feef 100644 --- a/.github/workflows/release-layer-ruby.yml +++ b/.github/workflows/release-layer-ruby.yml @@ -11,7 +11,7 @@ permissions: jobs: build-layer: - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: From d885bc1ab4325d1d72d238dca021d2c5cc6b0706 Mon Sep 17 00:00:00 2001 From: DCchoudhury15 Date: Wed, 10 Jun 2026 15:12:42 +0530 Subject: [PATCH 3/8] fix: remove QEMU, use native arm64 runner, restore integration test arm64 coverage --- .github/actions/build-ruby-layer/action.yml | 6 ----- .github/workflows/integration-test.yml | 28 ++++++++++++++++++--- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/actions/build-ruby-layer/action.yml b/.github/actions/build-ruby-layer/action.yml index 5e75d6179f..97ca71f115 100644 --- a/.github/actions/build-ruby-layer/action.yml +++ b/.github/actions/build-ruby-layer/action.yml @@ -18,12 +18,6 @@ outputs: runs: using: composite steps: - - name: Set up QEMU for cross-platform builds - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 - - name: Build Ruby layer shell: bash working-directory: ruby/src diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 4d3aebb93e..1d12fc7207 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -66,20 +66,34 @@ jobs: build-layer: needs: prepare-languages if: ${{ !inputs.use-existing-layer-artifact }} - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: language: ${{ fromJson(needs.prepare-languages.outputs.languages) }} + architecture: [amd64, arm64] + exclude: + - language: nodejs + architecture: arm64 + - language: python + architecture: arm64 + - language: javaagent + architecture: arm64 + - language: javawrapper + architecture: arm64 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: ./.github/actions/build-layer id: build with: language: ${{ matrix.language }} + architecture: ${{ matrix.architecture }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: opentelemetry-${{ matrix.language }}-layer.zip + name: >- + ${{ matrix.language == 'ruby' + && format('opentelemetry-ruby-layer-{0}.zip', matrix.architecture) + || format('opentelemetry-{0}-layer.zip', matrix.language) }} path: ${{ steps.build.outputs.artifact-path }} test: @@ -111,7 +125,10 @@ jobs: - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: - name: opentelemetry-${{ matrix.language }}-layer.zip + name: >- + ${{ matrix.language == 'ruby' + && format('opentelemetry-ruby-layer-{0}.zip', matrix.architecture) + || format('opentelemetry-{0}-layer.zip', matrix.language) }} path: artifacts/ - uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0 @@ -148,6 +165,9 @@ jobs: TEST_LANGUAGE: ${{ matrix.language }} TEST_ARCHITECTURE: ${{ matrix.architecture }} COLLECTOR_LAYER_ZIP: ${{ github.workspace }}/artifacts/opentelemetry-collector-layer-${{ matrix.architecture }}.zip - INSTRUMENTATION_LAYER_ZIP: ${{ github.workspace }}/artifacts/opentelemetry-${{ matrix.language }}-layer.zip + INSTRUMENTATION_LAYER_ZIP: >- + ${{ matrix.language == 'ruby' + && format('{0}/artifacts/opentelemetry-ruby-layer-{1}.zip', github.workspace, matrix.architecture) + || format('{0}/artifacts/opentelemetry-{1}-layer.zip', github.workspace, matrix.language) }} GITHUB_RUN_ID: ${{ github.run_id }} GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }} From a01610e518175e853ae406d42f545390ca615365 Mon Sep 17 00:00:00 2001 From: Divyanshu Choudhury Date: Wed, 10 Jun 2026 19:05:17 +0530 Subject: [PATCH 4/8] Update .github/workflows/integration-test.yml Co-authored-by: James Thompson --- .github/workflows/integration-test.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 1d12fc7207..ec6b9cdddc 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -71,16 +71,14 @@ jobs: fail-fast: false matrix: language: ${{ fromJson(needs.prepare-languages.outputs.languages) }} - architecture: [amd64, arm64] - exclude: - - language: nodejs - architecture: arm64 - - language: python - architecture: arm64 - - language: javaagent - architecture: arm64 - - language: javawrapper + runner: ubuntu-latest + include: + - language: ruby + architecture: amd64 + runner: ubuntu-latest + - language: ruby architecture: arm64 + runner: ubuntu-24.04-arm steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: ./.github/actions/build-layer From 7b4af32e4e74657f5a5410d679b79fbacea8350c Mon Sep 17 00:00:00 2001 From: Divyanshu Choudhury Date: Wed, 10 Jun 2026 19:05:25 +0530 Subject: [PATCH 5/8] Update .github/workflows/integration-test.yml Co-authored-by: James Thompson --- .github/workflows/integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index ec6b9cdddc..560e3200a1 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -66,7 +66,7 @@ jobs: build-layer: needs: prepare-languages if: ${{ !inputs.use-existing-layer-artifact }} - runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} + runs-on: ${{ matrix.runner }} strategy: fail-fast: false matrix: From 20f2e4db90b47c51faf3a52548f4919bc3470bb7 Mon Sep 17 00:00:00 2001 From: Divyanshu Choudhury Date: Wed, 10 Jun 2026 20:53:52 +0530 Subject: [PATCH 6/8] Update .github/workflows/integration-test.yml Co-authored-by: James Thompson --- .github/workflows/integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 560e3200a1..9ace088519 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -71,7 +71,7 @@ jobs: fail-fast: false matrix: language: ${{ fromJson(needs.prepare-languages.outputs.languages) }} - runner: ubuntu-latest + runner: ["ubuntu-latest"] include: - language: ruby architecture: amd64 From 8ce68cdbc316acc9134ab8bf98309655579bc55c Mon Sep 17 00:00:00 2001 From: DCchoudhury15 Date: Fri, 12 Jun 2026 09:12:13 +0530 Subject: [PATCH 7/8] fix: mirror collector pattern, remove get-version job and version-skip step --- .github/actions/build-ruby-layer/action.yml | 8 +----- .github/workflows/release-layer-ruby.yml | 32 +++------------------ 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/.github/actions/build-ruby-layer/action.yml b/.github/actions/build-ruby-layer/action.yml index 97ca71f115..0d7376671d 100644 --- a/.github/actions/build-ruby-layer/action.yml +++ b/.github/actions/build-ruby-layer/action.yml @@ -13,7 +13,7 @@ outputs: value: ${{ github.workspace }}/ruby/src/build/opentelemetry-ruby-layer-${{ inputs.architecture }}.zip component-version: description: 'OpenTelemetry Ruby SDK version included in the layer' - value: ${{ steps.version.outputs.component-version || steps.version-skip.outputs.component-version }} + value: ${{ steps.version.outputs.component-version }} runs: using: composite @@ -35,9 +35,3 @@ runs: export GEM_PATH=$PWD/ruby/gems/3.3.0/ SDK_VERSION=$(ruby -e 'require "opentelemetry-sdk"; puts OpenTelemetry::SDK::VERSION') echo "component-version=$SDK_VERSION" >> "$GITHUB_OUTPUT" - - - name: Skip version output for non-amd64 - if: ${{ inputs.architecture != 'amd64' }} - id: version-skip - shell: bash - run: echo "component-version=" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/release-layer-ruby.yml b/.github/workflows/release-layer-ruby.yml index e39190feef..0eae4979c8 100644 --- a/.github/workflows/release-layer-ruby.yml +++ b/.github/workflows/release-layer-ruby.yml @@ -18,6 +18,8 @@ jobs: architecture: - amd64 - arm64 + outputs: + component-version: ${{ steps.build.outputs.component-version }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -32,32 +34,6 @@ jobs: name: opentelemetry-ruby-layer-${{ matrix.architecture }}.zip path: ${{ steps.build.outputs.artifact-path }} - - name: Save component version to file (amd64 only) - if: ${{ matrix.architecture == 'amd64' }} - shell: bash - run: echo "${{ steps.build.outputs.component-version }}" > component-version.txt - - - name: Upload component version artifact (amd64 only) - if: ${{ matrix.architecture == 'amd64' }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: ruby-component-version - path: component-version.txt - - get-version: - runs-on: ubuntu-latest - needs: [build-layer] - outputs: - component-version: ${{ steps.read-version.outputs.version }} - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: ruby-component-version - - - id: read-version - shell: bash - run: echo "version=$(cat component-version.txt)" >> "$GITHUB_OUTPUT" - integration-test: permissions: contents: read @@ -102,7 +78,7 @@ jobs: contents: read id-token: write uses: ./.github/workflows/layer-publish.yml - needs: [build-layer, create-release, get-version] + needs: [build-layer, create-release] strategy: matrix: architecture: @@ -146,7 +122,7 @@ jobs: with: artifact-name: opentelemetry-ruby-layer-${{ matrix.architecture }}.zip layer-name: opentelemetry-ruby - component-version: ${{ needs.get-version.outputs.component-version }} + component-version: ${{ needs.build-layer.outputs.component-version }} architecture: ${{ matrix.architecture }} runtimes: ruby3.3 ruby3.4 release-group: prod From 79a6daa4cde67ef761c554735126e0492d1ace08 Mon Sep 17 00:00:00 2001 From: DCchoudhury15 Date: Fri, 12 Jun 2026 09:18:24 +0530 Subject: [PATCH 8/8] fix: replace runner+include matrix with exclude approach in integration-test --- .github/workflows/integration-test.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 9ace088519..1d12fc7207 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -66,19 +66,21 @@ jobs: build-layer: needs: prepare-languages if: ${{ !inputs.use-existing-layer-artifact }} - runs-on: ${{ matrix.runner }} + runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: language: ${{ fromJson(needs.prepare-languages.outputs.languages) }} - runner: ["ubuntu-latest"] - include: - - language: ruby - architecture: amd64 - runner: ubuntu-latest - - language: ruby + architecture: [amd64, arm64] + exclude: + - language: nodejs + architecture: arm64 + - language: python + architecture: arm64 + - language: javaagent + architecture: arm64 + - language: javawrapper architecture: arm64 - runner: ubuntu-24.04-arm steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: ./.github/actions/build-layer