From e19beb485dd2db8b1b9f8266b9000402865b110e Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 27 Oct 2025 22:43:51 -0500 Subject: [PATCH 1/8] ci: Add path-based triggers to CI workflows This should skip running tests for cases where it is not needed Fixes: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/1753 --- .github/workflows/ci-contrib.yml | 24 ++++++ .../ci-instrumentation-with-services.yml | 40 +++++++++ .github/workflows/ci-instrumentation.yml | 82 +++++++++++++++++++ .github/workflows/ci-markdownlint.yml | 2 + 4 files changed, 148 insertions(+) diff --git a/.github/workflows/ci-contrib.yml b/.github/workflows/ci-contrib.yml index d24873ac3d..0741ee71c2 100644 --- a/.github/workflows/ci-contrib.yml +++ b/.github/workflows/ci-contrib.yml @@ -5,9 +5,33 @@ on: push: branches: - main + paths: + - 'helpers/**' + - 'propagator/**' + - 'resources/**' + - 'processor/**' + - 'sampler/**' + - '.github/workflows/ci-contrib.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' pull_request: branches: - main + paths: + - 'helpers/**' + - 'propagator/**' + - 'resources/**' + - 'processor/**' + - 'sampler/**' + - '.github/workflows/ci-contrib.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/ci-instrumentation-with-services.yml b/.github/workflows/ci-instrumentation-with-services.yml index ac93634b9d..2f46c60c9f 100644 --- a/.github/workflows/ci-instrumentation-with-services.yml +++ b/.github/workflows/ci-instrumentation-with-services.yml @@ -5,9 +5,49 @@ on: push: branches: - main + paths: + - 'instrumentation/bunny/**' + - 'instrumentation/dalli/**' + - 'instrumentation/mongo/**' + - 'instrumentation/mysql2/**' + - 'instrumentation/pg/**' + - 'instrumentation/que/**' + - 'instrumentation/racecar/**' + - 'instrumentation/rdkafka/**' + - 'instrumentation/redis/**' + - 'instrumentation/resque/**' + - 'instrumentation/ruby_kafka/**' + - 'instrumentation/sidekiq/**' + - 'instrumentation/trilogy/**' + - '.github/workflows/ci-instrumentation-with-services.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' pull_request: branches: - main + paths: + - 'instrumentation/bunny/**' + - 'instrumentation/dalli/**' + - 'instrumentation/mongo/**' + - 'instrumentation/mysql2/**' + - 'instrumentation/pg/**' + - 'instrumentation/que/**' + - 'instrumentation/racecar/**' + - 'instrumentation/rdkafka/**' + - 'instrumentation/redis/**' + - 'instrumentation/resque/**' + - 'instrumentation/ruby_kafka/**' + - 'instrumentation/sidekiq/**' + - 'instrumentation/trilogy/**' + - '.github/workflows/ci-instrumentation-with-services.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/ci-instrumentation.yml b/.github/workflows/ci-instrumentation.yml index eb65ca6b4f..b788ce4c18 100644 --- a/.github/workflows/ci-instrumentation.yml +++ b/.github/workflows/ci-instrumentation.yml @@ -5,9 +5,91 @@ on: push: branches: - main + paths: + - 'instrumentation/action_mailer/**' + - 'instrumentation/action_pack/**' + - 'instrumentation/action_view/**' + - 'instrumentation/active_job/**' + - 'instrumentation/active_model_serializers/**' + - 'instrumentation/active_record/**' + - 'instrumentation/active_storage/**' + - 'instrumentation/active_support/**' + - 'instrumentation/all/**' + - 'instrumentation/aws_sdk/**' + - 'instrumentation/aws_lambda/**' + - 'instrumentation/base/**' + - 'instrumentation/concurrent_ruby/**' + - 'instrumentation/delayed_job/**' + - 'instrumentation/ethon/**' + - 'instrumentation/excon/**' + - 'instrumentation/faraday/**' + - 'instrumentation/grape/**' + - 'instrumentation/graphql/**' + - 'instrumentation/grpc/**' + - 'instrumentation/gruf/**' + - 'instrumentation/http/**' + - 'instrumentation/http_client/**' + - 'instrumentation/httpx/**' + - 'instrumentation/koala/**' + - 'instrumentation/lmdb/**' + - 'instrumentation/logger/**' + - 'instrumentation/net_http/**' + - 'instrumentation/rack/**' + - 'instrumentation/rails/**' + - 'instrumentation/restclient/**' + - 'instrumentation/rspec/**' + - 'instrumentation/sinatra/**' + - 'helpers/**' + - '.github/workflows/ci-instrumentation.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' pull_request: branches: - main + paths: + - 'instrumentation/action_mailer/**' + - 'instrumentation/action_pack/**' + - 'instrumentation/action_view/**' + - 'instrumentation/active_job/**' + - 'instrumentation/active_model_serializers/**' + - 'instrumentation/active_record/**' + - 'instrumentation/active_storage/**' + - 'instrumentation/active_support/**' + - 'instrumentation/all/**' + - 'instrumentation/aws_sdk/**' + - 'instrumentation/aws_lambda/**' + - 'instrumentation/base/**' + - 'instrumentation/concurrent_ruby/**' + - 'instrumentation/delayed_job/**' + - 'instrumentation/ethon/**' + - 'instrumentation/excon/**' + - 'instrumentation/faraday/**' + - 'instrumentation/grape/**' + - 'instrumentation/graphql/**' + - 'instrumentation/grpc/**' + - 'instrumentation/gruf/**' + - 'instrumentation/http/**' + - 'instrumentation/http_client/**' + - 'instrumentation/httpx/**' + - 'instrumentation/koala/**' + - 'instrumentation/lmdb/**' + - 'instrumentation/logger/**' + - 'instrumentation/net_http/**' + - 'instrumentation/rack/**' + - 'instrumentation/rails/**' + - 'instrumentation/restclient/**' + - 'instrumentation/rspec/**' + - 'instrumentation/sinatra/**' + - 'helpers/**' + - '.github/workflows/ci-instrumentation.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/ci-markdownlint.yml b/.github/workflows/ci-markdownlint.yml index edd41025e9..9bd034aa77 100644 --- a/.github/workflows/ci-markdownlint.yml +++ b/.github/workflows/ci-markdownlint.yml @@ -2,6 +2,8 @@ name: Markdown Lint Check on: pull_request: + paths: + - '**/*.md' permissions: contents: read From 7cf11a3fbcf55429a0ba3111a60f982c53f673d8 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 27 Oct 2025 23:05:18 -0500 Subject: [PATCH 2/8] squash: Revert me --- .github/workflows/ci-instrumentation-with-services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-instrumentation-with-services.yml b/.github/workflows/ci-instrumentation-with-services.yml index 2f46c60c9f..586961b08a 100644 --- a/.github/workflows/ci-instrumentation-with-services.yml +++ b/.github/workflows/ci-instrumentation-with-services.yml @@ -42,7 +42,7 @@ on: - 'instrumentation/ruby_kafka/**' - 'instrumentation/sidekiq/**' - 'instrumentation/trilogy/**' - - '.github/workflows/ci-instrumentation-with-services.yml' + # - '.github/workflows/ci-instrumentation-with-services.yml' - '.github/actions/**' - 'Gemfile' - 'Rakefile' From 3aeef34e25bf2e7a6b801b99bd818d6e6080413b Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 27 Oct 2025 23:08:07 -0500 Subject: [PATCH 3/8] squash: Reverting changes --- .github/workflows/ci-instrumentation-with-services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-instrumentation-with-services.yml b/.github/workflows/ci-instrumentation-with-services.yml index 586961b08a..2f46c60c9f 100644 --- a/.github/workflows/ci-instrumentation-with-services.yml +++ b/.github/workflows/ci-instrumentation-with-services.yml @@ -42,7 +42,7 @@ on: - 'instrumentation/ruby_kafka/**' - 'instrumentation/sidekiq/**' - 'instrumentation/trilogy/**' - # - '.github/workflows/ci-instrumentation-with-services.yml' + - '.github/workflows/ci-instrumentation-with-services.yml' - '.github/actions/**' - 'Gemfile' - 'Rakefile' From 3d029c51f4204840571c034344913cd61e5faa13 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 27 Oct 2025 23:18:47 -0500 Subject: [PATCH 4/8] Add dedicated workflow for 'all' instrumentation meta-package - Created ci-instrumentation-all.yml to handle the 'all' instrumentation - This workflow triggers on any instrumentation/** or helpers/** changes - Removed 'all' from ci-instrumentation.yml to avoid duplication - Ensures 'all' instrumentation tests run for any instrumentation change as required for merging while maintaining CI optimization benefits --- .github/workflows/ci-instrumentation-all.yml | 84 ++++++++++++++++++++ .github/workflows/ci-instrumentation.yml | 3 - 2 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci-instrumentation-all.yml diff --git a/.github/workflows/ci-instrumentation-all.yml b/.github/workflows/ci-instrumentation-all.yml new file mode 100644 index 0000000000..6073f05c43 --- /dev/null +++ b/.github/workflows/ci-instrumentation-all.yml @@ -0,0 +1,84 @@ +name: CI Instrumentation All + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - 'instrumentation/**' + - 'helpers/**' + - '.github/workflows/ci-instrumentation-all.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' + pull_request: + branches: + - main + paths: + - 'instrumentation/**' + - 'helpers/**' + - '.github/workflows/ci-instrumentation-all.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' + schedule: + - cron: "0 0 * * *" + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request + cancel-in-progress: true # Cancel any previous runs of this workflow + +jobs: + instrumentation_all: + strategy: + fail-fast: false + matrix: + gem: + - all + os: + - ubuntu-latest + + name: ${{ matrix.gem }} / ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v5 + - name: "Test Ruby 3.4" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.4" + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" + - name: "Test Ruby 3.2" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.2" + yard: true + rubocop: true + coverage: true + build: true + - name: "JRuby Filter" + id: jruby_skip + shell: bash + run: | + echo "skip=false" >> $GITHUB_OUTPUT + # The 'all' instrumentation should work with JRuby + true + - name: "Test JRuby" + if: "${{ matrix.os == 'ubuntu-latest' && steps.jruby_skip.outputs.skip == 'false' }}" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "jruby-10.0.2.0" \ No newline at end of file diff --git a/.github/workflows/ci-instrumentation.yml b/.github/workflows/ci-instrumentation.yml index b788ce4c18..dd4d3288af 100644 --- a/.github/workflows/ci-instrumentation.yml +++ b/.github/workflows/ci-instrumentation.yml @@ -14,7 +14,6 @@ on: - 'instrumentation/active_record/**' - 'instrumentation/active_storage/**' - 'instrumentation/active_support/**' - - 'instrumentation/all/**' - 'instrumentation/aws_sdk/**' - 'instrumentation/aws_lambda/**' - 'instrumentation/base/**' @@ -58,7 +57,6 @@ on: - 'instrumentation/active_record/**' - 'instrumentation/active_storage/**' - 'instrumentation/active_support/**' - - 'instrumentation/all/**' - 'instrumentation/aws_sdk/**' - 'instrumentation/aws_lambda/**' - 'instrumentation/base/**' @@ -114,7 +112,6 @@ jobs: - active_record - active_storage - active_support - - all - aws_sdk - aws_lambda - base From cb5410e5613418429f2d69433117633495256b35 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 27 Oct 2025 23:28:55 -0500 Subject: [PATCH 5/8] squash: rename a few files to keep required builds --- .github/workflows/ci-instrumentation-all.yml | 84 -------- .github/workflows/ci-instrumentation-full.yml | 195 ++++++++++++++++++ .github/workflows/ci-instrumentation.yml | 135 +----------- .github/workflows/ci-markdown-link.yml | 25 --- .../{ci-markdownlint.yml => ci-markdown.yml} | 18 +- 5 files changed, 215 insertions(+), 242 deletions(-) delete mode 100644 .github/workflows/ci-instrumentation-all.yml create mode 100644 .github/workflows/ci-instrumentation-full.yml delete mode 100644 .github/workflows/ci-markdown-link.yml rename .github/workflows/{ci-markdownlint.yml => ci-markdown.yml} (50%) diff --git a/.github/workflows/ci-instrumentation-all.yml b/.github/workflows/ci-instrumentation-all.yml deleted file mode 100644 index 6073f05c43..0000000000 --- a/.github/workflows/ci-instrumentation-all.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: CI Instrumentation All - -on: - workflow_dispatch: - push: - branches: - - main - paths: - - 'instrumentation/**' - - 'helpers/**' - - '.github/workflows/ci-instrumentation-all.yml' - - '.github/actions/**' - - 'Gemfile' - - 'Rakefile' - - '.rubocop.yml' - - 'gemspecs/**' - pull_request: - branches: - - main - paths: - - 'instrumentation/**' - - 'helpers/**' - - '.github/workflows/ci-instrumentation-all.yml' - - '.github/actions/**' - - 'Gemfile' - - 'Rakefile' - - '.rubocop.yml' - - 'gemspecs/**' - schedule: - - cron: "0 0 * * *" - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request - cancel-in-progress: true # Cancel any previous runs of this workflow - -jobs: - instrumentation_all: - strategy: - fail-fast: false - matrix: - gem: - - all - os: - - ubuntu-latest - - name: ${{ matrix.gem }} / ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v5 - - name: "Test Ruby 3.4" - uses: ./.github/actions/test_gem - with: - gem: "opentelemetry-instrumentation-${{ matrix.gem }}" - ruby: "3.4" - - name: "Test Ruby 3.3" - uses: ./.github/actions/test_gem - with: - gem: "opentelemetry-instrumentation-${{ matrix.gem }}" - ruby: "3.3" - - name: "Test Ruby 3.2" - uses: ./.github/actions/test_gem - with: - gem: "opentelemetry-instrumentation-${{ matrix.gem }}" - ruby: "3.2" - yard: true - rubocop: true - coverage: true - build: true - - name: "JRuby Filter" - id: jruby_skip - shell: bash - run: | - echo "skip=false" >> $GITHUB_OUTPUT - # The 'all' instrumentation should work with JRuby - true - - name: "Test JRuby" - if: "${{ matrix.os == 'ubuntu-latest' && steps.jruby_skip.outputs.skip == 'false' }}" - uses: ./.github/actions/test_gem - with: - gem: "opentelemetry-instrumentation-${{ matrix.gem }}" - ruby: "jruby-10.0.2.0" \ No newline at end of file diff --git a/.github/workflows/ci-instrumentation-full.yml b/.github/workflows/ci-instrumentation-full.yml new file mode 100644 index 0000000000..d64d7112cc --- /dev/null +++ b/.github/workflows/ci-instrumentation-full.yml @@ -0,0 +1,195 @@ +name: CI Instrumentation Full + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - 'instrumentation/action_mailer/**' + - 'instrumentation/action_pack/**' + - 'instrumentation/action_view/**' + - 'instrumentation/active_job/**' + - 'instrumentation/active_model_serializers/**' + - 'instrumentation/active_record/**' + - 'instrumentation/active_storage/**' + - 'instrumentation/active_support/**' + - 'instrumentation/aws_sdk/**' + - 'instrumentation/aws_lambda/**' + - 'instrumentation/base/**' + - 'instrumentation/concurrent_ruby/**' + - 'instrumentation/delayed_job/**' + - 'instrumentation/ethon/**' + - 'instrumentation/excon/**' + - 'instrumentation/faraday/**' + - 'instrumentation/grape/**' + - 'instrumentation/graphql/**' + - 'instrumentation/grpc/**' + - 'instrumentation/gruf/**' + - 'instrumentation/http/**' + - 'instrumentation/http_client/**' + - 'instrumentation/httpx/**' + - 'instrumentation/koala/**' + - 'instrumentation/lmdb/**' + - 'instrumentation/logger/**' + - 'instrumentation/net_http/**' + - 'instrumentation/rack/**' + - 'instrumentation/rails/**' + - 'instrumentation/restclient/**' + - 'instrumentation/rspec/**' + - 'instrumentation/sinatra/**' + - 'helpers/**' + - '.github/workflows/ci-instrumentation.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' + pull_request: + branches: + - main + paths: + - 'instrumentation/action_mailer/**' + - 'instrumentation/action_pack/**' + - 'instrumentation/action_view/**' + - 'instrumentation/active_job/**' + - 'instrumentation/active_model_serializers/**' + - 'instrumentation/active_record/**' + - 'instrumentation/active_storage/**' + - 'instrumentation/active_support/**' + - 'instrumentation/aws_sdk/**' + - 'instrumentation/aws_lambda/**' + - 'instrumentation/base/**' + - 'instrumentation/concurrent_ruby/**' + - 'instrumentation/delayed_job/**' + - 'instrumentation/ethon/**' + - 'instrumentation/excon/**' + - 'instrumentation/faraday/**' + - 'instrumentation/grape/**' + - 'instrumentation/graphql/**' + - 'instrumentation/grpc/**' + - 'instrumentation/gruf/**' + - 'instrumentation/http/**' + - 'instrumentation/http_client/**' + - 'instrumentation/httpx/**' + - 'instrumentation/koala/**' + - 'instrumentation/lmdb/**' + - 'instrumentation/logger/**' + - 'instrumentation/net_http/**' + - 'instrumentation/rack/**' + - 'instrumentation/rails/**' + - 'instrumentation/restclient/**' + - 'instrumentation/rspec/**' + - 'instrumentation/sinatra/**' + - 'helpers/**' + - '.github/workflows/ci-instrumentation-full.yml' + - '.github/actions/**' + - 'Gemfile' + - 'Rakefile' + - '.rubocop.yml' + - 'gemspecs/**' + schedule: + - cron: "0 0 * * *" + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request + cancel-in-progress: true # Cancel any previous runs of this workflow + +jobs: + instrumentation: + strategy: + fail-fast: false + matrix: + gem: + - action_mailer + - action_pack + - action_view + - active_job + - active_model_serializers + - active_record + - active_storage + - active_support + - aws_sdk + - aws_lambda + - base + - concurrent_ruby + - delayed_job + - ethon + - excon + - faraday + - grape + - graphql + - grpc + - gruf + - http + - http_client + - httpx + - koala + - lmdb + - logger + - net_http + - rack + - rails + - restclient + - rspec + - sinatra + os: + - ubuntu-latest + + name: ${{ matrix.gem }} / ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v5 + - name: "Test Ruby 3.4" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.4" + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" + - name: "Test Ruby 3.2" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.2" + yard: true + rubocop: true + coverage: true + build: true + - name: "JRuby Filter" + id: jruby_skip + shell: bash + run: | + echo "skip=false" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "action_pack" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "action_view" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "active_model_serializers" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "active_record" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "active_storage" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "active_support" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "aws_sdk" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "aws_lambda" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "delayed_job" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "graphql" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "http" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "http_client" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "koala" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "lmdb" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "rack" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "rails" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "grpc" ]] && echo "skip=true" >> $GITHUB_OUTPUT + [[ "${{ matrix.gem }}" == "gruf" ]] && echo "skip=true" >> $GITHUB_OUTPUT + # This is essentially a bash script getting evaluated, so we need to return true or the whole job fails. + true + - name: "Test JRuby" + if: "${{ matrix.os == 'ubuntu-latest' && steps.jruby_skip.outputs.skip == 'false' }}" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "jruby-10.0.2.0" diff --git a/.github/workflows/ci-instrumentation.yml b/.github/workflows/ci-instrumentation.yml index dd4d3288af..0a8e2c7b5e 100644 --- a/.github/workflows/ci-instrumentation.yml +++ b/.github/workflows/ci-instrumentation.yml @@ -5,89 +5,9 @@ on: push: branches: - main - paths: - - 'instrumentation/action_mailer/**' - - 'instrumentation/action_pack/**' - - 'instrumentation/action_view/**' - - 'instrumentation/active_job/**' - - 'instrumentation/active_model_serializers/**' - - 'instrumentation/active_record/**' - - 'instrumentation/active_storage/**' - - 'instrumentation/active_support/**' - - 'instrumentation/aws_sdk/**' - - 'instrumentation/aws_lambda/**' - - 'instrumentation/base/**' - - 'instrumentation/concurrent_ruby/**' - - 'instrumentation/delayed_job/**' - - 'instrumentation/ethon/**' - - 'instrumentation/excon/**' - - 'instrumentation/faraday/**' - - 'instrumentation/grape/**' - - 'instrumentation/graphql/**' - - 'instrumentation/grpc/**' - - 'instrumentation/gruf/**' - - 'instrumentation/http/**' - - 'instrumentation/http_client/**' - - 'instrumentation/httpx/**' - - 'instrumentation/koala/**' - - 'instrumentation/lmdb/**' - - 'instrumentation/logger/**' - - 'instrumentation/net_http/**' - - 'instrumentation/rack/**' - - 'instrumentation/rails/**' - - 'instrumentation/restclient/**' - - 'instrumentation/rspec/**' - - 'instrumentation/sinatra/**' - - 'helpers/**' - - '.github/workflows/ci-instrumentation.yml' - - '.github/actions/**' - - 'Gemfile' - - 'Rakefile' - - '.rubocop.yml' - - 'gemspecs/**' pull_request: branches: - main - paths: - - 'instrumentation/action_mailer/**' - - 'instrumentation/action_pack/**' - - 'instrumentation/action_view/**' - - 'instrumentation/active_job/**' - - 'instrumentation/active_model_serializers/**' - - 'instrumentation/active_record/**' - - 'instrumentation/active_storage/**' - - 'instrumentation/active_support/**' - - 'instrumentation/aws_sdk/**' - - 'instrumentation/aws_lambda/**' - - 'instrumentation/base/**' - - 'instrumentation/concurrent_ruby/**' - - 'instrumentation/delayed_job/**' - - 'instrumentation/ethon/**' - - 'instrumentation/excon/**' - - 'instrumentation/faraday/**' - - 'instrumentation/grape/**' - - 'instrumentation/graphql/**' - - 'instrumentation/grpc/**' - - 'instrumentation/gruf/**' - - 'instrumentation/http/**' - - 'instrumentation/http_client/**' - - 'instrumentation/httpx/**' - - 'instrumentation/koala/**' - - 'instrumentation/lmdb/**' - - 'instrumentation/logger/**' - - 'instrumentation/net_http/**' - - 'instrumentation/rack/**' - - 'instrumentation/rails/**' - - 'instrumentation/restclient/**' - - 'instrumentation/rspec/**' - - 'instrumentation/sinatra/**' - - 'helpers/**' - - '.github/workflows/ci-instrumentation.yml' - - '.github/actions/**' - - 'Gemfile' - - 'Rakefile' - - '.rubocop.yml' - - 'gemspecs/**' schedule: - cron: "0 0 * * *" @@ -99,43 +19,12 @@ concurrency: cancel-in-progress: true # Cancel any previous runs of this workflow jobs: - instrumentation: + instrumentation_all: strategy: fail-fast: false matrix: gem: - - action_mailer - - action_pack - - action_view - - active_job - - active_model_serializers - - active_record - - active_storage - - active_support - - aws_sdk - - aws_lambda - - base - - concurrent_ruby - - delayed_job - - ethon - - excon - - faraday - - grape - - graphql - - grpc - - gruf - - http - - http_client - - httpx - - koala - - lmdb - - logger - - net_http - - rack - - rails - - restclient - - rspec - - sinatra + - all os: - ubuntu-latest @@ -167,25 +56,7 @@ jobs: shell: bash run: | echo "skip=false" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "action_pack" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "action_view" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "active_model_serializers" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "active_record" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "active_storage" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "active_support" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "aws_sdk" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "aws_lambda" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "delayed_job" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "graphql" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "http" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "http_client" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "koala" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "lmdb" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "rack" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "rails" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "grpc" ]] && echo "skip=true" >> $GITHUB_OUTPUT - [[ "${{ matrix.gem }}" == "gruf" ]] && echo "skip=true" >> $GITHUB_OUTPUT - # This is essentially a bash script getting evaluated, so we need to return true or the whole job fails. + # The 'all' instrumentation should work with JRuby true - name: "Test JRuby" if: "${{ matrix.os == 'ubuntu-latest' && steps.jruby_skip.outputs.skip == 'false' }}" diff --git a/.github/workflows/ci-markdown-link.yml b/.github/workflows/ci-markdown-link.yml deleted file mode 100644 index 0dc66fe50e..0000000000 --- a/.github/workflows/ci-markdown-link.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Markdown Link Check - -on: - pull_request: - paths: - - '**/*.md' - -permissions: - contents: read - -jobs: - markdown-link-check: - permissions: - pull-requests: write # required for posting PR review comments - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - # equivalent cli: linkspector check - - name: Run linkspector - uses: umbrelladocs/action-linkspector@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - reporter: github-pr-review - fail_on_error: true diff --git a/.github/workflows/ci-markdownlint.yml b/.github/workflows/ci-markdown.yml similarity index 50% rename from .github/workflows/ci-markdownlint.yml rename to .github/workflows/ci-markdown.yml index 9bd034aa77..19ad361f74 100644 --- a/.github/workflows/ci-markdownlint.yml +++ b/.github/workflows/ci-markdown.yml @@ -1,4 +1,4 @@ -name: Markdown Lint Check +name: Markdown Checks on: pull_request: @@ -7,9 +7,11 @@ on: permissions: contents: read + pull-requests: write # required for posting PR review comments jobs: markdownlint-check: + name: Markdown Lint Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 @@ -23,3 +25,17 @@ jobs: globs: | **/*.md !**/CHANGELOG.md + + markdown-link-check: + name: Markdown Link Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + # equivalent cli: linkspector check + - name: Run linkspector + uses: umbrelladocs/action-linkspector@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + fail_on_error: true From c6d0fc9af50d470afb2aa1d93750d6c10279de20 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 27 Oct 2025 23:37:26 -0500 Subject: [PATCH 6/8] squash: consolidate more linters --- .github/workflows/check-spelling.yml | 20 ------------------- ...ci-markdown.yml => ci-markdown-checks.yml} | 12 +++++++++++ 2 files changed, 12 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/check-spelling.yml rename .github/workflows/{ci-markdown.yml => ci-markdown-checks.yml} (76%) diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml deleted file mode 100644 index 67eac58890..0000000000 --- a/.github/workflows/check-spelling.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Spelling - -on: - pull_request: - -permissions: - contents: read - -jobs: - spelling-check: - name: SPELLING check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: streetsidesoftware/cspell-action@v7 - with: - # Files should be consistent with check:spelling files - files: | - **/*.md - config: .cspell.yml diff --git a/.github/workflows/ci-markdown.yml b/.github/workflows/ci-markdown-checks.yml similarity index 76% rename from .github/workflows/ci-markdown.yml rename to .github/workflows/ci-markdown-checks.yml index 19ad361f74..d9e07b7bca 100644 --- a/.github/workflows/ci-markdown.yml +++ b/.github/workflows/ci-markdown-checks.yml @@ -39,3 +39,15 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-pr-review fail_on_error: true + + spelling-check: + name: Spelling Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: streetsidesoftware/cspell-action@v7 + with: + # Files should be consistent with check:spelling files + files: | + **/*.md + config: .cspell.yml From b346c78270ca87e1c5ade963ab07de26b3c8a4b8 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 28 Oct 2025 09:58:26 -0500 Subject: [PATCH 7/8] squash: move things around --- .github/workflows/ci-instrumentation-full.yml | 2 +- .github/workflows/ci-instrumentation-with-services.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-instrumentation-full.yml b/.github/workflows/ci-instrumentation-full.yml index d64d7112cc..711dc8ce61 100644 --- a/.github/workflows/ci-instrumentation-full.yml +++ b/.github/workflows/ci-instrumentation-full.yml @@ -6,6 +6,7 @@ on: branches: - main paths: + - 'helpers/**' - 'instrumentation/action_mailer/**' - 'instrumentation/action_pack/**' - 'instrumentation/action_view/**' @@ -38,7 +39,6 @@ on: - 'instrumentation/restclient/**' - 'instrumentation/rspec/**' - 'instrumentation/sinatra/**' - - 'helpers/**' - '.github/workflows/ci-instrumentation.yml' - '.github/actions/**' - 'Gemfile' diff --git a/.github/workflows/ci-instrumentation-with-services.yml b/.github/workflows/ci-instrumentation-with-services.yml index 2f46c60c9f..f34dab90ff 100644 --- a/.github/workflows/ci-instrumentation-with-services.yml +++ b/.github/workflows/ci-instrumentation-with-services.yml @@ -6,6 +6,8 @@ on: branches: - main paths: + - 'helpers/**' + - 'instrumentation/base/**' - 'instrumentation/bunny/**' - 'instrumentation/dalli/**' - 'instrumentation/mongo/**' From f9729eee0fb619ac6b29e82af94c5dd68439db42 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Wed, 29 Oct 2025 11:20:43 -0500 Subject: [PATCH 8/8] squash: use anchors to avoid duplication --- .github/workflows/ci-contrib.yml | 15 +------ .github/workflows/ci-instrumentation-full.yml | 45 ++----------------- .../ci-instrumentation-with-services.yml | 23 +--------- 3 files changed, 7 insertions(+), 76 deletions(-) diff --git a/.github/workflows/ci-contrib.yml b/.github/workflows/ci-contrib.yml index 0741ee71c2..7285ed5899 100644 --- a/.github/workflows/ci-contrib.yml +++ b/.github/workflows/ci-contrib.yml @@ -5,7 +5,7 @@ on: push: branches: - main - paths: + paths: &path_filters - 'helpers/**' - 'propagator/**' - 'resources/**' @@ -20,18 +20,7 @@ on: pull_request: branches: - main - paths: - - 'helpers/**' - - 'propagator/**' - - 'resources/**' - - 'processor/**' - - 'sampler/**' - - '.github/workflows/ci-contrib.yml' - - '.github/actions/**' - - 'Gemfile' - - 'Rakefile' - - '.rubocop.yml' - - 'gemspecs/**' + paths: *path_filters schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/ci-instrumentation-full.yml b/.github/workflows/ci-instrumentation-full.yml index 711dc8ce61..f869c7db19 100644 --- a/.github/workflows/ci-instrumentation-full.yml +++ b/.github/workflows/ci-instrumentation-full.yml @@ -5,7 +5,7 @@ on: push: branches: - main - paths: + paths: &path_filters - 'helpers/**' - 'instrumentation/action_mailer/**' - 'instrumentation/action_pack/**' @@ -39,7 +39,7 @@ on: - 'instrumentation/restclient/**' - 'instrumentation/rspec/**' - 'instrumentation/sinatra/**' - - '.github/workflows/ci-instrumentation.yml' + - '.github/workflows/ci-instrumentation-full.yml' - '.github/actions/**' - 'Gemfile' - 'Rakefile' @@ -48,46 +48,7 @@ on: pull_request: branches: - main - paths: - - 'instrumentation/action_mailer/**' - - 'instrumentation/action_pack/**' - - 'instrumentation/action_view/**' - - 'instrumentation/active_job/**' - - 'instrumentation/active_model_serializers/**' - - 'instrumentation/active_record/**' - - 'instrumentation/active_storage/**' - - 'instrumentation/active_support/**' - - 'instrumentation/aws_sdk/**' - - 'instrumentation/aws_lambda/**' - - 'instrumentation/base/**' - - 'instrumentation/concurrent_ruby/**' - - 'instrumentation/delayed_job/**' - - 'instrumentation/ethon/**' - - 'instrumentation/excon/**' - - 'instrumentation/faraday/**' - - 'instrumentation/grape/**' - - 'instrumentation/graphql/**' - - 'instrumentation/grpc/**' - - 'instrumentation/gruf/**' - - 'instrumentation/http/**' - - 'instrumentation/http_client/**' - - 'instrumentation/httpx/**' - - 'instrumentation/koala/**' - - 'instrumentation/lmdb/**' - - 'instrumentation/logger/**' - - 'instrumentation/net_http/**' - - 'instrumentation/rack/**' - - 'instrumentation/rails/**' - - 'instrumentation/restclient/**' - - 'instrumentation/rspec/**' - - 'instrumentation/sinatra/**' - - 'helpers/**' - - '.github/workflows/ci-instrumentation-full.yml' - - '.github/actions/**' - - 'Gemfile' - - 'Rakefile' - - '.rubocop.yml' - - 'gemspecs/**' + paths: *path_filters schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/ci-instrumentation-with-services.yml b/.github/workflows/ci-instrumentation-with-services.yml index f34dab90ff..df7fae9537 100644 --- a/.github/workflows/ci-instrumentation-with-services.yml +++ b/.github/workflows/ci-instrumentation-with-services.yml @@ -5,7 +5,7 @@ on: push: branches: - main - paths: + paths: &path_filters - 'helpers/**' - 'instrumentation/base/**' - 'instrumentation/bunny/**' @@ -30,26 +30,7 @@ on: pull_request: branches: - main - paths: - - 'instrumentation/bunny/**' - - 'instrumentation/dalli/**' - - 'instrumentation/mongo/**' - - 'instrumentation/mysql2/**' - - 'instrumentation/pg/**' - - 'instrumentation/que/**' - - 'instrumentation/racecar/**' - - 'instrumentation/rdkafka/**' - - 'instrumentation/redis/**' - - 'instrumentation/resque/**' - - 'instrumentation/ruby_kafka/**' - - 'instrumentation/sidekiq/**' - - 'instrumentation/trilogy/**' - - '.github/workflows/ci-instrumentation-with-services.yml' - - '.github/actions/**' - - 'Gemfile' - - 'Rakefile' - - '.rubocop.yml' - - 'gemspecs/**' + paths: *path_filters schedule: - cron: "0 0 * * *"