Skip to content

Run tests in Gitlab - #8656

Merged
randomanderson merged 130 commits into
masterfrom
landerson/migrate-tests
May 9, 2025
Merged

Run tests in Gitlab#8656
randomanderson merged 130 commits into
masterfrom
landerson/migrate-tests

Conversation

@randomanderson

@randomandersonrandomanderson commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

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
Comment thread.gitlab-ci.yml Outdated
Comment thread.gitlab/check_test_agent_results.sh

@sarahchen6sarahchen6 left a comment

Copy link
Copy Markdown
Contributor

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!

Comment threaddd-smoke-tests/log-injection/src/test/resources/SpockConfig.groovy Outdated
@randomanderson
randomandersonforce-pushed the landerson/migrate-tests branch from 528ce5a to 2b5d9acCompareMay 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 masterMay 9, 2025
@randomanderson
randomanderson deleted the landerson/migrate-tests branch May 9, 2025 21:23
@github-actionsgithub-actionsBot added this to the 1.50.0 milestone May 9, 2025
sarahchen6 pushed a commit that referenced this pull request Jun 12, 2025
* first pass checks
* add some debug
* Revert "add some debug"
This reverts commit 26a7adb.
* Normalize node index and node total
* fix normalization
* actually use the normalized values
* first pass: migrate tests to Gitlab
* less scenarios for now
* bump memory and workers
* actually use task partitions
* Add section start/end
* Allow individual tests to control gradle memory
* remove a little of the reportspam
* use concrete docker image tags
* configure test containers to use mirror
* fix limit
* fix missing container versions
* Better gitlab naming with smarter split
* update caches with test dep cache, save test results
* Cleanup repositories {} blocks
* update proxy url to use internal routing
* no "s"
* allow insecure everywhere
* include apache with confluence
* remove intentional fail
* use gradlePluginCache, mavenCentral after pluginportal
* proxy mule as well
* change BUILD_CACHE_TYPE to CACHE_TYPE since its used for both
* split cache like with circleci. Cache became too big
* Some caches are too big to be saved
* test fixes
* more test fixes
* disable some tests for now
* more fixes
* Use maven proxy with openliberty smoketests
* missed one more mongodb case
* enable some more of the matrix
* Fix lettuce tests
* Fix lettuce tests
* cleanup imports
* create asyncCommands
* codenarc
* Cleanup aggregator tests to try to reduce flakiness
* debug maven logs for now
* try non-ssh url
* Revert "debug maven logs for now"
This reverts commit c5c158f.
* add some debug logging
* codenarc
* try fixed value of parallelism
* enable debug logs for smoketest building only
* limit number of reserved threads
* some debug for why the smoketest is not running
* more debug for gradle launcher failure
* try fixing graal test
* try to force the logging
* codenarc
* set available processors for jetty
* codenarc
* bluntly bump max threads
* some more debug
* remove verbose logging
* try memcached test with new location
* opt out of split by parallel
* Try with 3 gradle workers
* try decreasing reporting interval
* Refractor CrashTrackingSmokeTest to use OutputThreads
* Simple forked memory test
* better ergonomics
* try increasing timeout
* extend agent test runner
* don't override forkedMinHeapSize and forkedMaxHeapSize
* print out requests
* remove logging statement
* Better crash tracking
* remove intentionally failing test
* use a test UDP server to record oom events
* Make crash tracking smoke test more resiliant
* loop through messages until the correct event
* some debug
* configurable dogstatsd port
* enable everything
* use sleep instead of park nanos
* save body data ahead of time
* retry once for system failures
* spotless
* cleanup
* spotless/merge issues
* Skip ExceptionHistogramTest on J9
* add a print statement around the body for debugging
* comment out all but 8, 17, and 21 for now
* fix spring 6 forwarding headers
* revert logging statements
* needs to be set in 3.1 for latestDepTest
* faster OOM
* property was set in incorrect location
* ssi_smoke, flaky, and esoteric jvms on master only
* use normal runner when TestContainers isn't needed
* skip forwarding header filter here too
* tweaks
* limit executor size and fix IPV4 assumptions
* try more workers with less memory
* set max memory for all crashtracking tests
* double retry
* scale up memory, less jobs
* revert memory bump, increase forked tests
* tweaks
* add flag for nondefault jvms and flaky tests
* correct description
* Externalize runtime processors override
* ExceptionHistogramTest exclusions already handled by master
* increase spring native build memory
* bump gradle build timeout
* bump graalvm compile memory
---------
Co-authored-by: Santiago Mola <santiago.mola@datadoghq.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: toolingBuild & Toolingtag: no release notesChanges to exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@randomanderson@bric3@sarahchen6@smola