From f1bb7af0e7328e95e42f19c55d788138d437a88d Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Wed, 27 Mar 2024 10:24:41 +0100 Subject: [PATCH 01/15] Remove redundant comment --- lib/datadog/appsec/contrib/rack/request_middleware.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/datadog/appsec/contrib/rack/request_middleware.rb b/lib/datadog/appsec/contrib/rack/request_middleware.rb index 81113e5c57..5532322601 100644 --- a/lib/datadog/appsec/contrib/rack/request_middleware.rb +++ b/lib/datadog/appsec/contrib/rack/request_middleware.rb @@ -15,7 +15,6 @@ module Datadog module AppSec module Contrib module Rack - # Create an array of lowercased headers WAF_VENDOR_HEADERS_TAGS = %w[ X-Amzn-Trace-Id Cloudfront-Viewer-Ja3-Fingerprint From 7902f7c086893f39922201bffd7b17dc3888708e Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Wed, 27 Mar 2024 15:54:21 +0100 Subject: [PATCH 02/15] Add sca_enabled setting and DD_APPSEC_SCA_ENABLED to app-started config --- lib/datadog/appsec/configuration/settings.rb | 5 ++ lib/datadog/core/telemetry/event.rb | 5 +- .../appsec/configuration/settings_spec.rb | 46 +++++++++++++++++++ spec/datadog/core/telemetry/event_spec.rb | 3 ++ 4 files changed, 58 insertions(+), 1 deletion(-) diff --git a/lib/datadog/appsec/configuration/settings.rb b/lib/datadog/appsec/configuration/settings.rb index 05f50449ac..87f7148f7d 100644 --- a/lib/datadog/appsec/configuration/settings.rb +++ b/lib/datadog/appsec/configuration/settings.rb @@ -192,6 +192,11 @@ def self.add_settings!(base) end end end + + option :sca_enabled do |o| + o.type :bool, nilable: true + o.env 'DD_APPSEC_SCA_ENABLED' + end end end end diff --git a/lib/datadog/core/telemetry/event.rb b/lib/datadog/core/telemetry/event.rb index 4c85f94da8..ad98b550dd 100644 --- a/lib/datadog/core/telemetry/event.rb +++ b/lib/datadog/core/telemetry/event.rb @@ -113,7 +113,10 @@ def configuration conf_value('tracing.opentelemetry.enabled', !defined?(Datadog::OpenTelemetry::LOADED).nil?), ) list << conf_value('logger.instance', config.logger.instance.class.to_s) if config.logger.instance - list << conf_value('appsec.enabled', config.dig('appsec', 'enabled')) if config.respond_to?('appsec') + if config.respond_to?('appsec') + list << conf_value('appsec.enabled', config.dig('appsec', 'enabled')) + list << conf_value('appsec.sca_enabled', config.dig('appsec', 'sca_enabled')) + end list << conf_value('ci.enabled', config.dig('ci', 'enabled')) if config.respond_to?('ci') list.reject! { |entry| entry[:value].nil? } diff --git a/spec/datadog/appsec/configuration/settings_spec.rb b/spec/datadog/appsec/configuration/settings_spec.rb index 39c1fd42cb..a19a0a9455 100644 --- a/spec/datadog/appsec/configuration/settings_spec.rb +++ b/spec/datadog/appsec/configuration/settings_spec.rb @@ -711,5 +711,51 @@ def patcher end end end + + describe 'sca' do + describe '#enabled' do + subject(:sca_enabled) { settings.appsec.sca_enabled } + + context 'when DD_APPSEC_SCA_ENABLED' do + around do |example| + ClimateControl.modify('DD_APPSEC_SCA_ENABLED' => sca_enabled_value) do + example.run + end + end + + context 'is not defined' do + let(:sca_enabled_value) { nil } + + it { is_expected.to eq nil } + end + + context 'is defined as true' do + let(:sca_enabled_value) { 'true' } + + it { is_expected.to eq true } + end + + context 'is defined as false' do + let(:sca_enabled_value) { 'false' } + + it { is_expected.to eq false } + end + end + end + + describe '#enabled=' do + subject(:set_sca_enabled) { settings.appsec.sca_enabled = sca_enabled } + + [true, false, nil].each do |value| + context "when given #{value}" do + let(:sca_enabled) { value } + + before { set_sca_enabled } + + it { expect(settings.appsec.sca_enabled).to eq(value) } + end + end + end + end end end diff --git a/spec/datadog/core/telemetry/event_spec.rb b/spec/datadog/core/telemetry/event_spec.rb index 856c576d10..f78f4ab656 100644 --- a/spec/datadog/core/telemetry/event_spec.rb +++ b/spec/datadog/core/telemetry/event_spec.rb @@ -24,6 +24,7 @@ c.telemetry.install_id = 'id' c.telemetry.install_type = 'type' c.telemetry.install_time = 'time' + c.appsec.sca_enabled = false end end @@ -69,6 +70,8 @@ def contain_configuration(*array) ['tracing.opentelemetry.enabled', false], ['logger.instance', 'MyLogger'], ['appsec.enabled', false], + ['appsec.sca_enabled', false], + ['ci.enabled', false] ), install_signature: { install_id: 'id', install_time: 'time', install_type: 'type' }, ) From 7d1bbd3de319cb97b45853c4d037a66613388229 Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 29 Mar 2024 15:49:12 +0100 Subject: [PATCH 03/15] Add SCA Enablement state to app-client-configuration-change --- lib/datadog/core/telemetry/event.rb | 34 +++++++++++++++++------ spec/datadog/core/telemetry/event_spec.rb | 18 ++++++++++++ 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/lib/datadog/core/telemetry/event.rb b/lib/datadog/core/telemetry/event.rb index ad98b550dd..7770017c18 100644 --- a/lib/datadog/core/telemetry/event.rb +++ b/lib/datadog/core/telemetry/event.rb @@ -245,15 +245,31 @@ def initialize(changes, origin) end def payload(seq_id) - { - configuration: @changes.map do |name, value| - { - name: name, - value: value, - origin: @origin, - } - end - } + @seq_id = seq_id + { configuration: configuration } + end + + def configuration + config = Datadog.configuration + + res = @changes.map do |name, value| + { + name: name, + value: value, + origin: @origin, + } + end + + unless config.dig('appsec', 'sca_enabled').nil? + res << { + name: 'appsec.sca_enabled', + value: config.appsec.sca_enabled, + origin: 'code', + seq_id: @seq_id, + } + end + + res end end diff --git a/spec/datadog/core/telemetry/event_spec.rb b/spec/datadog/core/telemetry/event_spec.rb index f78f4ab656..3e867ad2cd 100644 --- a/spec/datadog/core/telemetry/event_spec.rb +++ b/spec/datadog/core/telemetry/event_spec.rb @@ -173,6 +173,24 @@ def contain_configuration(*array) }] ) end + + context 'with env_var state configuration' do + before do + Datadog.configure do |c| + c.appsec.sca_enabled = false + end + end + + it 'includes sca enablement configuration' do + is_expected.to eq( + configuration: + [ + { name: name, value: value, origin: origin }, + { name: 'appsec.sca_enabled', value: false, origin: 'code', seq_id: id } + ] + ) + end + end end context 'AppHeartbeat' do From 345b5dae51453948b4f0f39ff19118a0544cdb78 Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 12 Apr 2024 16:47:11 +0200 Subject: [PATCH 04/15] Activate PARAMETRIC scenario in CI (+ ref to st branch) --- .github/workflows/system-tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index 982b11d9e9..c84ef21fe4 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -11,6 +11,7 @@ on: env: REGISTRY: ghcr.io REPO: ghcr.io/datadog/dd-trace-rb + ST_REF: vpellan/sca-env-var-telemetry jobs: build-harness: @@ -31,6 +32,7 @@ jobs: uses: actions/checkout@v4 with: repository: 'DataDog/system-tests' + ref: ${{ env.ST_REF }} - name: Pull released image run: | if docker pull ${{ env.REPO }}/system-tests/${{ matrix.image.name }}:latest; then @@ -100,6 +102,7 @@ jobs: uses: actions/checkout@v4 with: repository: 'DataDog/system-tests' + ref: ${{ env.ST_REF }} - name: Checkout ${{ matrix.library.repository }} uses: actions/checkout@v4 with: @@ -232,6 +235,9 @@ jobs: - library: ruby app: rack scenario: TELEMETRY_METRIC_GENERATION_DISABLED + - library: ruby + app: rack + scenario: PARAMETRIC runs-on: ubuntu-latest needs: - build-harness @@ -242,6 +248,7 @@ jobs: uses: actions/checkout@v4 with: repository: 'DataDog/system-tests' + ref: ${{ env.ST_REF }} - name: Pull runner image run: | docker pull ${{ env.REPO }}/system-tests/runner:gha${{ github.run_id }}-g${{ github.sha }} @@ -304,6 +311,7 @@ jobs: uses: actions/checkout@v4 with: repository: 'DataDog/system-tests' + ref: ${{ env.ST_REF }} - name: Retrieve logs uses: actions/download-artifact@v4 with: From ae3d150b308610db186bf7dafe832bc7bb1ba34f Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 12 Apr 2024 17:46:13 +0200 Subject: [PATCH 05/15] Add parametric Workflow --- .github/workflows/run-parametric.yml | 73 ++++++++++++++++++++++++++++ .github/workflows/system-tests.yml | 3 -- 2 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/run-parametric.yml diff --git a/.github/workflows/run-parametric.yml b/.github/workflows/run-parametric.yml new file mode 100644 index 0000000000..414810e851 --- /dev/null +++ b/.github/workflows/run-parametric.yml @@ -0,0 +1,73 @@ +name: System Tests + +on: + push: + branches: + - "**" + workflow_dispatch: {} + schedule: + - cron: '00 04 * * 2-6' + +env: + REGISTRY: ghcr.io + REPO: ghcr.io/datadog/dd-trace-rb + ST_REF: vpellan/sca-env-var-telemetry + +jobs: + build-runner: + strategy: + fail-fast: false + matrix: + library: + - name: ruby + repository: DataDog/dd-trace-rb + path: dd-trace-rb + runs-on: ubuntu-latest + name: Run parametric system tests + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: 'DataDog/system-tests' + ref: ${{ env.ST_REF }} + - name: Install python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + - name: Install dependencies + uses: actions/cache@v4 + id: runner_cache + with: + path: venv + key: runner_venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} + - name: Build runner + shell: bash + if: steps.runner_cache.outputs.cache-hit != 'true' + run: ./build.sh -i runner + - name: Print versions + shell: bash + run: | + source venv/bin/activate + python --version + pip freeze + - name: Checkout dd-trace-rb + uses: actions/checkout@v4 + with: + repository: '${{ matrix.library.repository }}' + path: 'binaries/${{ matrix.library.path }}' + fetch-depth: 2 + - name: Run parametric system tests + run: ./run.sh PARAMETRIC + - name: Compress logs + id: compress_logs + if: always() + run: tar -czvf artifact.tar.gz $(ls | grep logs) + - name: Upload artifact + if: always() && steps.compress_logs.outcome == 'success' + uses: actions/upload-artifact@v4 + with: + name: logs_parametric_${{ matrix.library}}_parametric_dev + path: artifact.tar.gz + - name: Print fancy log report + if: ${{ always() }} + run: python utils/scripts/markdown_logs.py >> $GITHUB_STEP_SUMMARY \ No newline at end of file diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index c84ef21fe4..1c3a12dd0e 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -235,9 +235,6 @@ jobs: - library: ruby app: rack scenario: TELEMETRY_METRIC_GENERATION_DISABLED - - library: ruby - app: rack - scenario: PARAMETRIC runs-on: ubuntu-latest needs: - build-harness From b490ac1f3c1919a3563b03296f38247d5e9b7af0 Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 12 Apr 2024 17:50:00 +0200 Subject: [PATCH 06/15] Added TEST_LIBRARY=ruby in env --- .github/workflows/run-parametric.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-parametric.yml b/.github/workflows/run-parametric.yml index 414810e851..c492f49aad 100644 --- a/.github/workflows/run-parametric.yml +++ b/.github/workflows/run-parametric.yml @@ -57,7 +57,7 @@ jobs: path: 'binaries/${{ matrix.library.path }}' fetch-depth: 2 - name: Run parametric system tests - run: ./run.sh PARAMETRIC + run: TEST_LIBRARY=ruby ./run.sh PARAMETRIC - name: Compress logs id: compress_logs if: always() From 3ca5ab80dbdddd982a8e50baf6e6e488604a916b Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 12 Apr 2024 17:53:44 +0200 Subject: [PATCH 07/15] Changed workflow name --- .github/workflows/run-parametric.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-parametric.yml b/.github/workflows/run-parametric.yml index c492f49aad..dbf8b5903d 100644 --- a/.github/workflows/run-parametric.yml +++ b/.github/workflows/run-parametric.yml @@ -1,4 +1,4 @@ -name: System Tests +name: Parametrics on: push: From 27d4f2e6e0090521e4829400c2847f696f8bc9ea Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Wed, 15 May 2024 11:10:46 +0200 Subject: [PATCH 08/15] Removed seq_id instance variable from AppClientConfigurationChange --- lib/datadog/core/telemetry/event.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/datadog/core/telemetry/event.rb b/lib/datadog/core/telemetry/event.rb index 7770017c18..40fa9d9555 100644 --- a/lib/datadog/core/telemetry/event.rb +++ b/lib/datadog/core/telemetry/event.rb @@ -245,11 +245,10 @@ def initialize(changes, origin) end def payload(seq_id) - @seq_id = seq_id - { configuration: configuration } + { configuration: configuration(seq_id) } end - def configuration + def configuration(seq_id) config = Datadog.configuration res = @changes.map do |name, value| @@ -265,7 +264,7 @@ def configuration name: 'appsec.sca_enabled', value: config.appsec.sca_enabled, origin: 'code', - seq_id: @seq_id, + seq_id: seq_id, } end From 3447238bf7dbcef81ca626852e8fd5d9e95eae18 Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 7 Jun 2024 10:53:26 +0200 Subject: [PATCH 09/15] Updated system-tests branch ref --- .../{run-parametric.yml => parametric-system-tests.yml} | 4 ++-- .github/workflows/system-tests.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{run-parametric.yml => parametric-system-tests.yml} (97%) diff --git a/.github/workflows/run-parametric.yml b/.github/workflows/parametric-system-tests.yml similarity index 97% rename from .github/workflows/run-parametric.yml rename to .github/workflows/parametric-system-tests.yml index dbf8b5903d..4ee23da769 100644 --- a/.github/workflows/run-parametric.yml +++ b/.github/workflows/parametric-system-tests.yml @@ -1,4 +1,4 @@ -name: Parametrics +name: Parametric System Tests on: push: @@ -11,7 +11,7 @@ on: env: REGISTRY: ghcr.io REPO: ghcr.io/datadog/dd-trace-rb - ST_REF: vpellan/sca-env-var-telemetry + ST_REF: main jobs: build-runner: diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index 1c3a12dd0e..a19663a350 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -11,7 +11,7 @@ on: env: REGISTRY: ghcr.io REPO: ghcr.io/datadog/dd-trace-rb - ST_REF: vpellan/sca-env-var-telemetry + ST_REF: main jobs: build-harness: From 38e02986faf53c9a256ba108ac4dce978762795f Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 7 Jun 2024 14:34:51 +0200 Subject: [PATCH 10/15] Add FORCE_TESTS env var in system-tests workflow --- .github/workflows/system-tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index a19663a350..b6335e2c51 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -12,6 +12,7 @@ env: REGISTRY: ghcr.io REPO: ghcr.io/datadog/dd-trace-rb ST_REF: main + FORCE_TESTS: ("tests/test_telemetry.py::Test_TelemetrySCAEnvVar") jobs: build-harness: @@ -266,7 +267,14 @@ jobs: run: | docker image list - name: Run scenario - run: ./run.sh ++docker ${{ matrix.scenario }} + run: | + FORCE_EXECUTE="" + declare -a tests=(${{ env.FORCE_TESTS }}) + for test in "${tests[@]}" + do + FORCE_EXECUTE="${FORCE_EXECUTE} -F ${test}" + done + ./run.sh ++docker ${{ matrix.scenario }} $FORCE_EXECUTE env: DD_API_KEY: ${{ secrets.DD_APPSEC_SYSTEM_TESTS_API_KEY }} - name: Archive logs From d705a15c560fef9d73c68b95b43d08ba0b5acf49 Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 7 Jun 2024 15:02:09 +0200 Subject: [PATCH 11/15] Removed bugged -F appender in systm-tests workflow --- .github/workflows/system-tests.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index b6335e2c51..db6dc9165a 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -12,7 +12,7 @@ env: REGISTRY: ghcr.io REPO: ghcr.io/datadog/dd-trace-rb ST_REF: main - FORCE_TESTS: ("tests/test_telemetry.py::Test_TelemetrySCAEnvVar") + FORCE_TESTS: -F tests/test_telemetry.py::Test_TelemetrySCAEnvVar jobs: build-harness: @@ -268,13 +268,7 @@ jobs: docker image list - name: Run scenario run: | - FORCE_EXECUTE="" - declare -a tests=(${{ env.FORCE_TESTS }}) - for test in "${tests[@]}" - do - FORCE_EXECUTE="${FORCE_EXECUTE} -F ${test}" - done - ./run.sh ++docker ${{ matrix.scenario }} $FORCE_EXECUTE + ./run.sh ++docker ${{ matrix.scenario }} ${{ env.FORCE_TESTS }} env: DD_API_KEY: ${{ secrets.DD_APPSEC_SYSTEM_TESTS_API_KEY }} - name: Archive logs From 2168bd476bccfdd0dd84838a9a9035a05ab90605 Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 7 Jun 2024 15:25:02 +0200 Subject: [PATCH 12/15] Forced parametric test --- .github/workflows/parametric-system-tests.yml | 3 ++- .github/workflows/system-tests.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/parametric-system-tests.yml b/.github/workflows/parametric-system-tests.yml index 4ee23da769..aed1e6f43e 100644 --- a/.github/workflows/parametric-system-tests.yml +++ b/.github/workflows/parametric-system-tests.yml @@ -12,6 +12,7 @@ env: REGISTRY: ghcr.io REPO: ghcr.io/datadog/dd-trace-rb ST_REF: main + FORCE_TESTS: -F tests/test_telemetry.py::Test_TelemetrySCAEnvVar jobs: build-runner: @@ -57,7 +58,7 @@ jobs: path: 'binaries/${{ matrix.library.path }}' fetch-depth: 2 - name: Run parametric system tests - run: TEST_LIBRARY=ruby ./run.sh PARAMETRIC + run: TEST_LIBRARY=ruby ./run.sh PARAMETRIC ${{ env.FORCE_TESTS }} - name: Compress logs id: compress_logs if: always() diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index db6dc9165a..41e3e5bc00 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -12,7 +12,7 @@ env: REGISTRY: ghcr.io REPO: ghcr.io/datadog/dd-trace-rb ST_REF: main - FORCE_TESTS: -F tests/test_telemetry.py::Test_TelemetrySCAEnvVar + FORCE_TESTS: jobs: build-harness: From 042eb9dd58c116fbf067c78c26a5b3dc9ac558fb Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Fri, 7 Jun 2024 16:47:30 +0200 Subject: [PATCH 13/15] Fix typo to force-execute the right file --- .github/workflows/parametric-system-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parametric-system-tests.yml b/.github/workflows/parametric-system-tests.yml index aed1e6f43e..e439a29685 100644 --- a/.github/workflows/parametric-system-tests.yml +++ b/.github/workflows/parametric-system-tests.yml @@ -12,7 +12,7 @@ env: REGISTRY: ghcr.io REPO: ghcr.io/datadog/dd-trace-rb ST_REF: main - FORCE_TESTS: -F tests/test_telemetry.py::Test_TelemetrySCAEnvVar + FORCE_TESTS: -F tests/parametric/test_telemetry.py::Test_TelemetrySCAEnvVar jobs: build-runner: From 467b49db17656ac4a3471c3597179776ac9e0d71 Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Mon, 10 Jun 2024 10:28:06 +0200 Subject: [PATCH 14/15] Removed parametric system-tests workflow --- .github/workflows/parametric-system-tests.yml | 74 ------------------- 1 file changed, 74 deletions(-) delete mode 100644 .github/workflows/parametric-system-tests.yml diff --git a/.github/workflows/parametric-system-tests.yml b/.github/workflows/parametric-system-tests.yml deleted file mode 100644 index e439a29685..0000000000 --- a/.github/workflows/parametric-system-tests.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Parametric System Tests - -on: - push: - branches: - - "**" - workflow_dispatch: {} - schedule: - - cron: '00 04 * * 2-6' - -env: - REGISTRY: ghcr.io - REPO: ghcr.io/datadog/dd-trace-rb - ST_REF: main - FORCE_TESTS: -F tests/parametric/test_telemetry.py::Test_TelemetrySCAEnvVar - -jobs: - build-runner: - strategy: - fail-fast: false - matrix: - library: - - name: ruby - repository: DataDog/dd-trace-rb - path: dd-trace-rb - runs-on: ubuntu-latest - name: Run parametric system tests - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - repository: 'DataDog/system-tests' - ref: ${{ env.ST_REF }} - - name: Install python - uses: actions/setup-python@v5 - with: - python-version: "3.9" - - name: Install dependencies - uses: actions/cache@v4 - id: runner_cache - with: - path: venv - key: runner_venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} - - name: Build runner - shell: bash - if: steps.runner_cache.outputs.cache-hit != 'true' - run: ./build.sh -i runner - - name: Print versions - shell: bash - run: | - source venv/bin/activate - python --version - pip freeze - - name: Checkout dd-trace-rb - uses: actions/checkout@v4 - with: - repository: '${{ matrix.library.repository }}' - path: 'binaries/${{ matrix.library.path }}' - fetch-depth: 2 - - name: Run parametric system tests - run: TEST_LIBRARY=ruby ./run.sh PARAMETRIC ${{ env.FORCE_TESTS }} - - name: Compress logs - id: compress_logs - if: always() - run: tar -czvf artifact.tar.gz $(ls | grep logs) - - name: Upload artifact - if: always() && steps.compress_logs.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: logs_parametric_${{ matrix.library}}_parametric_dev - path: artifact.tar.gz - - name: Print fancy log report - if: ${{ always() }} - run: python utils/scripts/markdown_logs.py >> $GITHUB_STEP_SUMMARY \ No newline at end of file From af5570b86c12d2921b7b8338f966830cf51f50f9 Mon Sep 17 00:00:00 2001 From: Victor Pellan Date: Mon, 10 Jun 2024 12:09:29 +0200 Subject: [PATCH 15/15] Fix spec ci.enabled variable introduced during rebase --- spec/datadog/core/telemetry/event_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/datadog/core/telemetry/event_spec.rb b/spec/datadog/core/telemetry/event_spec.rb index 3e867ad2cd..32d83e54fc 100644 --- a/spec/datadog/core/telemetry/event_spec.rb +++ b/spec/datadog/core/telemetry/event_spec.rb @@ -70,8 +70,7 @@ def contain_configuration(*array) ['tracing.opentelemetry.enabled', false], ['logger.instance', 'MyLogger'], ['appsec.enabled', false], - ['appsec.sca_enabled', false], - ['ci.enabled', false] + ['appsec.sca_enabled', false] ), install_signature: { install_id: 'id', install_time: 'time', install_type: 'type' }, )