From d520d92ffdddb24237a24778c3d46ab180f0fd0a Mon Sep 17 00:00:00 2001 From: Andrey Marchenko Date: Fri, 3 Jan 2025 10:54:57 +0100 Subject: [PATCH] migrate Datadog Test Optimization setup to use the new datadog-ci gem --- .github/workflows/test.yml | 5 ++++- Gemfile | 2 +- LICENSE-3rdparty.csv | 2 +- features/support/env.rb | 6 ++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 35c58192227..cc2ed5ddea8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,6 +84,9 @@ jobs: env: BUNDLE_WITHOUT: docs DD_PROFILING_NO_EXTENSION: true + DD_CIVISIBILITY_AGENTLESS_ENABLED: true + DD_ENV: prod + DD_API_KEY: ${{ secrets.DD_API_KEY }} steps: - uses: actions/checkout@v3 - name: Set up Ruby ${{ matrix.ruby-version }} @@ -129,7 +132,7 @@ jobs: with: app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }} private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }} - repositories: datadog-api-spec + repositories: datadog-api-spec - name: Post status 3heck uses: DataDog/github-actions/post-status-check@v2 with: diff --git a/Gemfile b/Gemfile index 9750089de1a..7671c0b5d17 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gemspec group :development, :test do gem 'activesupport' gem 'cucumber', '~> 9.1.1' - gem 'ddtrace', '>=1.0.0.beta1' + gem 'datadog-ci', '~> 1.11' gem 'gem-release' gem 'rake', '~> 13.0.1' gem 'rspec-expectations' diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv index 4d6b1ac16ea..01f7f618e21 100644 --- a/LICENSE-3rdparty.csv +++ b/LICENSE-3rdparty.csv @@ -20,7 +20,7 @@ cucumber-messages,MIT,Aslak Hellesøy cucumber-tag-expressions,MIT,"Andrea Nodari, Aslak Hellesøy" cucumber-wire,MIT,Matt Wynne datadog_api_client,Apache-2.0,"Datadog, Inc." -ddtrace,BSD-3-Clause,"Datadog, Inc." +datadog-ci,BSD-3-Clause,"Datadog, Inc." diff-lcs,"Artistic-2.0,GPL-2.0+,MIT",Austin Ziegler docile,MIT,Marc Siegel e2mmap,BSD-2-Clause,Keiju ISHITSUKA diff --git a/features/support/env.rb b/features/support/env.rb index 1a28d543447..19e1baa99cc 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -9,16 +9,14 @@ require 'cgi' require 'cucumber' require 'datadog_api_client' -require 'ddtrace' +require 'datadog/ci' require 'time' require 'timecop' require 'vcr' - Datadog.configure do |c| - c.time_now_provider = -> { Time.now_without_mock_time } c.ci.enabled = true - c.ci.instrument :cucumber, operation_name: 'test' + c.ci.instrument :cucumber c.tracing.instrument :http end