Skip to content

Run tests in Gitlab #8656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 130 commits into from
May 9, 2025
Merged

Run tests in Gitlab #8656

merged 130 commits into from
May 9, 2025

Conversation

randomanderson
Copy link
Contributor

@randomanderson randomanderson commented Apr 1, 2025

What Does This Do

Runs the test suite in Gitlab.

The main bulk of the changes are in .gitlab-ci.yml which creates the test jobs, applies the appropriate caches, uploads the results to Datadog CI Observability, saves artifacts, etc.

Changes to tests

  • Use specific container versions for test containers
  • Replace many instances where localhost was assumed with the appropriate getHost()-like methods
  • Use forward-headers-strategy: NONE for Spring Boot tests. Spring Boot strips x-forwarded-for headers which breaks forwarding tests
  • Many minor changes to decrease flakiness

Motivation

Eventually, all CircleCI jobs will be migrated to Gitlab

Future Work

  • Further work needs to be done on "right-sizing" the test jobs. There are multiple knobs to tweak between:
    • total memory
    • CPU cores
    • Gradle workers
    • Gradle memory per work
    • Number of parallel jobs
      where there is an optimization between job duration, number of jobs, size of cache, "stability".
  • This PR doesn't support using PR labels to enable specific jdks
  • CircleCI scripts for reporting are used mostly unmodified. When CircleCI is no longer being used, these scripts can be updated to be more Gitlab specific
  • Gating release jobs and publishing on tests passing
  • system-tests are not run in Gitlab. They will temporarily run in Github Actions

Flaky Tests

  • InstrumenterUnloadTest
  • GradleLauncherSmokeTest
  • ApmTracingDisabledMatrixSmokeTest

Contributor Checklist

Jira ticket: [PROJ-IDENT]

This reverts commit 26a7adb.
…-tests

# Conflicts:
#	dd-java-agent/instrumentation/kafka-clients-3.8/src/test/groovy/KafkaClientCustomPropagationConfigTest.groovy
#	dd-java-agent/instrumentation/kafka-clients-3.8/src/test/groovy/KafkaClientTestBase.groovy
@randomanderson randomanderson marked this pull request as ready for review April 18, 2025 15:38
@randomanderson randomanderson requested review from a team as code owners April 18, 2025 15:38
@amarziali amarziali requested a review from PerfectSlayer April 18, 2025 15:41
Copy link
Contributor

@sarahchen6 sarahchen6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited to see this go in!

@randomanderson randomanderson force-pushed the landerson/migrate-tests branch from 528ce5a to 2b5d9ac Compare May 6, 2025 19:50
…ests

# Conflicts:
#	dd-smoke-tests/spring-boot-3.0-native/src/test/groovy/SpringBootNativeInstrumentationTest.groovy
@randomanderson randomanderson enabled auto-merge (squash) May 9, 2025 15:17
@randomanderson randomanderson disabled auto-merge May 9, 2025 15:17
@randomanderson randomanderson enabled auto-merge (squash) May 9, 2025 21:06
@randomanderson randomanderson merged commit f494c33 into master May 9, 2025
584 of 589 checks passed
@randomanderson randomanderson deleted the landerson/migrate-tests branch May 9, 2025 21:23
@github-actions github-actions bot added this to the 1.50.0 milestone May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: tooling Build & Tooling tag: no release notes Changes to exclude from release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants