-
Notifications
You must be signed in to change notification settings - Fork 314
Description
Tracer Version(s)
1.51.2~d5ad1fed74
Java Version(s)
11
JVM Vendor
Eclipse Adoptium / Temurin
Bug Report
In our test executions when test optimization is enabled, we see the following log output:
[dd.trace 2025-08-01 15:44:35:190 +0000] [main] INFO datadog.trace.civisibility.CiVisibilityRepoServices - PR detected: PR{baseBranch='master', baseSHA='<BASE_SHA>', commitSHA='<COMMIT_SHA>', prNumber='null'}We are using the test optimization GitHub Action as follows in our workflow on our GitHub Enterprise Server instance:
- name: 'Configure Datadog Test Optimization'
uses: datadog/test-visibility-github-action@v2
with: { languages: 'java', api_key: '<DD_API_KEY>', service: 'service-name-here' }Expected Behavior
It is expected that when running tests against a pull request, the PR metadata will be obtained from the Git provider and populated with all available data. In this case, the PR number is available (as demonstrated in the GithubActionsInfo implementation), so our expectation is that CiVisibilityRepoServices would obtain and use the same information. It appears an instance of CIProviderInfo is available in the execution context for use.
Reproduction Code
The code in CiVisibilityRepoServices explicitly sets the prNumber field to null via the PullRequestInfo constructor.