Skip to content

Commit e593140

Browse files
Merge branch 'master' into alexeyk/protocol-v1-1
2 parents 7d86270 + 6162c82 commit e593140

67 files changed

Lines changed: 236 additions & 171 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,6 @@ Close them if no following update within a week.
9191

9292
_Recovery:_ Manually trigger the action again.
9393

94-
### update-docker-build-image [🔗](update-docker-build-image.yaml)
95-
96-
_Trigger:_ Quarterly released, loosely [a day after the new image tag is created](https://github.com/DataDog/dd-trace-java-docker-build/blob/master/.github/workflows/docker-tag.yml).
97-
98-
_Action:_ Update the Docker build image used in GitLab CI with the latest tag.
99-
100-
_Recovery:_ Download artifacts and upload them manually to the related _download release_.
101-
102-
_Notes:_ Manually trigger the action again given the desired image tag as input.
103-
10494
### update-download-releases [🔗](update-download-releases.yaml)
10595

10696
_Trigger:_ When a release is published.

.github/workflows/update-docker-build-image.yaml

Lines changed: 0 additions & 96 deletions
This file was deleted.

.github/workflows/update-smoke-test-latest-versions.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
METADATA=$(curl -sf https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/maven-metadata.xml)
4545
# Get all versions, filter out alpha/beta/rc, take the latest
4646
VERSION=$(echo "$METADATA" \
47-
| xmllint --xpath '//versions/version/text()' - 2>/dev/null \
48-
| tr ' ' '\n' \
47+
| grep -o '<version>[^<]*</version>' \
48+
| sed 's/<[^>]*>//g' \
4949
| grep -v -E '(alpha|beta|rc)' \
5050
| sort -V \
5151
| tail -1)
@@ -62,8 +62,8 @@ jobs:
6262
METADATA=$(curl -sf https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml)
6363
# Get all versions, filter out alpha/beta, take the latest
6464
VERSION=$(echo "$METADATA" \
65-
| xmllint --xpath '//versions/version/text()' - 2>/dev/null \
66-
| tr ' ' '\n' \
65+
| grep -o '<version>[^<]*</version>' \
66+
| sed 's/<[^>]*>//g' \
6767
| grep -v -E '(alpha|beta)' \
6868
| sort -V \
6969
| tail -1)
@@ -80,6 +80,11 @@ jobs:
8080
MAVEN_VERSION: ${{ steps.maven.outputs.version }}
8181
SUREFIRE_VERSION: ${{ steps.surefire.outputs.version }}
8282
run: |
83+
echo "Writing resolved versions to properties files:"
84+
echo " Gradle: ${GRADLE_VERSION}"
85+
echo " Maven: ${MAVEN_VERSION}"
86+
echo " Maven Surefire: ${SUREFIRE_VERSION}"
87+
8388
printf '%s\n' \
8489
"# Pinned \"latest\" versions for CI Visibility Gradle smoke tests." \
8590
"# Updated automatically by the update-smoke-test-latest-versions workflow." \
@@ -97,9 +102,14 @@ jobs:
97102
id: check-changes
98103
run: |
99104
if [[ -z "$(git status -s)" ]]; then
100-
echo "No changes to commit."
105+
echo "No changes detected — pinned versions are already up to date."
101106
echo "has_changes=false" >> "$GITHUB_OUTPUT"
102107
else
108+
echo "Changes detected in the following files:"
109+
git status -s
110+
echo ""
111+
echo "Diff:"
112+
git diff
103113
echo "has_changes=true" >> "$GITHUB_OUTPUT"
104114
fi
105115

.gitlab-ci.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ variables:
2929
GRADLE_VERSION: "8.14.4" # must match gradle-wrapper.properties
3030
MAVEN_REPOSITORY_PROXY: "https://depot-read-api-java.us1.ddbuild.io/magicmirror/magicmirror/@current/"
3131
GRADLE_PLUGIN_PROXY: "https://depot-read-api-java.us1.ddbuild.io/magicmirror/magicmirror/@current/"
32-
BUILDER_IMAGE_VERSION_PREFIX: "v26.02-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "v25.05-")
32+
BUILDER_IMAGE_REPO: "registry.ddbuild.io/images/mirror/dd-trace-java-docker-build" # images are pinned in images/mirror.lock.yaml in the DataDog/images repo
33+
BUILDER_IMAGE_VERSION_PREFIX: "ci-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "ci-" or "123_merge-")
3334
REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations"
3435
DEFAULT_TEST_JVMS: /^(8|11|17|21|25|tip)$/ # the latest "tip" version is 26
3536
PROFILE_TESTS:
@@ -142,7 +143,7 @@ default:
142143
fi
143144
144145
.gradle_build: &gradle_build
145-
image: ghcr.io/datadog/dd-trace-java-docker-build:${BUILDER_IMAGE_VERSION_PREFIX}base
146+
image: ${BUILDER_IMAGE_REPO}:${BUILDER_IMAGE_VERSION_PREFIX}base
146147
stage: build
147148
variables:
148149
MAVEN_OPTS: "-Xms256M -Xmx1024M"
@@ -218,7 +219,7 @@ default:
218219
# on the central publisher portal, it invalidates the old one. This check prevents going further.
219220
# See https://datadoghq.atlassian.net/wiki/x/Oog5OgE
220221
maven-central-pre-release-check:
221-
image: ghcr.io/datadog/dd-trace-java-docker-build:${BUILDER_IMAGE_VERSION_PREFIX}base
222+
image: ${BUILDER_IMAGE_REPO}:${BUILDER_IMAGE_VERSION_PREFIX}base
222223
stage: .pre
223224
rules:
224225
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
@@ -399,7 +400,7 @@ config-inversion-linter:
399400

400401
test_published_artifacts:
401402
extends: .gradle_build
402-
image: ghcr.io/datadog/dd-trace-java-docker-build:${BUILDER_IMAGE_VERSION_PREFIX}7 # Needs Java7 for some tests
403+
image: ${BUILDER_IMAGE_REPO}:${BUILDER_IMAGE_VERSION_PREFIX}7 # Needs Java7 for some tests
403404
stage: tests
404405
needs: [ build ]
405406
variables:
@@ -566,7 +567,7 @@ muzzle-dep-report:
566567

567568
.test_job:
568569
extends: .gradle_build
569-
image: ghcr.io/datadog/dd-trace-java-docker-build:${BUILDER_IMAGE_VERSION_PREFIX}$testJvm
570+
image: ${BUILDER_IMAGE_REPO}:${BUILDER_IMAGE_VERSION_PREFIX}$testJvm
570571
tags: [ "docker-in-docker:amd64" ] # use docker-in-docker runner for testcontainers
571572
needs: [ build_tests ]
572573
stage: tests
@@ -794,7 +795,7 @@ test_smoke_semeru8_debugger:
794795
testJvm: "semeru8"
795796

796797
aggregate_test_counts:
797-
image: ghcr.io/datadog/dd-trace-java-docker-build:${BUILDER_IMAGE_VERSION_PREFIX}base
798+
image: ${BUILDER_IMAGE_REPO}:${BUILDER_IMAGE_VERSION_PREFIX}base
798799
stage: test-summary
799800
# Note: No explicit 'needs' or 'dependencies' required
800801
# By default, GitLab CI automatically downloads artifacts from ALL jobs in previous stages

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/jdbc/JDBCConnectionUrlParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ DBInfo.Builder doParse(final String jdbcUrl, final DBInfo.Builder builder) {
7373
String instanceName = null;
7474
final int hostIndex = jdbcUrl.indexOf("://");
7575

76-
if (hostIndex <= 0) {
76+
if (hostIndex <= 0 || jdbcUrl.length() == 3 + hostIndex) {
7777
return builder;
7878
}
7979

dd-java-agent/agent-ci-visibility/src/test/groovy/datadog/trace/civisibility/git/tree/GitClientTest.groovy

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ class GitClientTest extends Specification {
8787
8888
def "test is shallow"() {
8989
given:
90-
givenGitRepo("ci/git/shallow/git")
90+
givenGitRepos(["ci/git/shallow_with_origin/origin", "ci/git/shallow_with_origin/repo"])
9191
9292
when:
93-
def gitClient = givenGitClient()
93+
def gitClient = givenGitClient("repo")
9494
def shallow = gitClient.isShallow()
9595
9696
then:
@@ -111,22 +111,22 @@ class GitClientTest extends Specification {
111111
112112
def "test get upstream branch SHA"() {
113113
given:
114-
givenGitRepo("ci/git/shallow/git")
114+
givenGitRepos(["ci/git/shallow_with_origin/origin", "ci/git/shallow_with_origin/repo"])
115115
116116
when:
117-
def gitClient = givenGitClient()
117+
def gitClient = givenGitClient("repo")
118118
def upstreamBranch = gitClient.getUpstreamBranchSha()
119119
120120
then:
121-
upstreamBranch == "98b944cc44f18bfb78e3021de2999cdcda8efdf6"
121+
upstreamBranch == "c76ef954d23f8fdb42dcf2fe956d6af5a31fe7bd"
122122
}
123123
124124
def "test unshallow: sha-#remoteSha"() {
125125
given:
126-
givenGitRepo("ci/git/shallow/git")
126+
givenGitRepos(["ci/git/shallow_with_origin/origin", "ci/git/shallow_with_origin/repo"])
127127
128128
when:
129-
def gitClient = givenGitClient()
129+
def gitClient = givenGitClient("repo")
130130
def shallow = gitClient.isShallow()
131131
def commits = gitClient.getLatestCommits()
132132
@@ -209,11 +209,11 @@ class GitClientTest extends Specification {
209209

210210
def "test get commit info with fetching"() {
211211
given:
212-
givenGitRepo("ci/git/shallow/git")
212+
givenGitRepos(["ci/git/shallow_with_origin/origin", "ci/git/shallow_with_origin/repo"])
213213

214214
when:
215-
def commit = "f4377e97f10c2d58696192b170b2fef2a8464b04"
216-
def gitClient = givenGitClient()
215+
def commit = "6e55a15a35ad46f74e4203dd42f7797173a6edcb"
216+
def gitClient = givenGitClient("repo")
217217
def commitInfo = gitClient.getCommitInfo(commit, false)
218218

219219
then:
@@ -224,13 +224,13 @@ class GitClientTest extends Specification {
224224

225225
then:
226226
commitInfo.sha == commit
227-
commitInfo.author.name == "sullis"
228-
commitInfo.author.email == "github@seansullivan.com"
229-
commitInfo.author.iso8601Date == "2023-05-30T07:07:35-07:00"
230-
commitInfo.committer.name == "GitHub"
231-
commitInfo.committer.email == "noreply@github.com"
232-
commitInfo.committer.iso8601Date == "2023-05-30T07:07:35-07:00"
233-
commitInfo.fullMessage == "brotli4j 1.12.0 (#1592)"
227+
commitInfo.author.name == "Test Author"
228+
commitInfo.author.email == "test-author@example.com"
229+
commitInfo.author.iso8601Date == "2026-03-12T17:02:46+01:00"
230+
commitInfo.committer.name == "Test Author"
231+
commitInfo.committer.email == "test-author@example.com"
232+
commitInfo.committer.iso8601Date == "2026-03-12T17:02:46+01:00"
233+
commitInfo.fullMessage == "Commit message 0"
234234
}
235235

236236
def "test get latest commits"() {

dd-java-agent/agent-ci-visibility/src/test/resources/ci/git/shallow/dummy.txt

Whitespace-only changes.

dd-java-agent/agent-ci-visibility/src/test/resources/ci/git/shallow/git/description

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.

dd-java-agent/agent-ci-visibility/src/test/resources/ci/git/shallow/git/info/exclude

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)