Skip to content

Commit 6f1ed2c

Browse files
Merge branch 'master' into daniel.mohedano/git-config-safe-directory
2 parents ddeeecb + ae1f104 commit 6f1ed2c

File tree

193 files changed

+2287
-1171
lines changed

Some content is hidden

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

193 files changed

+2287
-1171
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ variables:
3030
GRADLE_PLUGIN_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/gradle-plugin-portal-proxy/"
3131
BUILDER_IMAGE_VERSION_PREFIX: "v25.06-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "v25.05-")
3232
REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations"
33-
DEFAULT_TEST_JVMS: /^(8|11|17|21)$/
33+
DEFAULT_TEST_JVMS: /^(8|11|17|21|stable)$/
3434
PROFILE_TESTS:
3535
description: "Enable profiling of tests"
3636
value: "false"
@@ -63,6 +63,7 @@ workflow:
6363
- "11"
6464
- "17"
6565
- "21"
66+
- "stable"
6667
- "semeru11"
6768
- "oracle8"
6869
- "zulu8"
@@ -560,7 +561,7 @@ test_inst_latest:
560561
CACHE_TYPE: "latestDep"
561562
parallel:
562563
matrix:
563-
- testJvm: ["8", "17", "21" ]
564+
- testJvm: ["8", "17", "21", "stable"]
564565
# Gitlab doesn't support "parallel" and "parallel:matrix" at the same time
565566
# This emulates "parallel" by including it in the matrix
566567
CI_SPLIT: [ "1/6", "2/6", "3/6", "4/6", "5/6", "6/6"]
@@ -612,7 +613,7 @@ test_debugger:
612613
variables:
613614
GRADLE_TARGET: ":debuggerTest"
614615
CACHE_TYPE: "base"
615-
DEFAULT_TEST_JVMS: /^(8|11|17|21|semeru8)$/
616+
DEFAULT_TEST_JVMS: /^(8|11|17|21|stable|semeru8)$/
616617
parallel:
617618
matrix: *test_matrix
618619

.gitlab/benchmarks.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,36 @@ benchmarks-post-results:
6868
- job: benchmarks-dacapo
6969
artifacts: true
7070

71+
check-big-regressions:
72+
extends: .benchmarks
73+
needs:
74+
- job: benchmarks-startup
75+
artifacts: true
76+
- job: benchmarks-load
77+
artifacts: true
78+
when: on_success
79+
tags: ["arch:amd64"]
80+
# ARTIFACTS_DIR /go/src/github.com/DataDog/apm-reliability/dd-trace-java/reports/
81+
# need to convert them
82+
script:
83+
- !reference [ .benchmarks, script ]
84+
- |
85+
for benchmarkType in startup load; do
86+
find "$ARTIFACTS_DIR/$benchmarkType" -name "benchmark-baseline.json" -o -name "benchmark-candidate.json" | while read file; do
87+
relpath="${file#$ARTIFACTS_DIR/$benchmarkType/}"
88+
prefix="${relpath%/benchmark-*}" # Remove the trailing /benchmark-(baseline|candidate).json
89+
prefix="${prefix#./}" # Remove any leading ./
90+
prefix="${prefix//\//-}" # Replace / with -
91+
case "$file" in
92+
*benchmark-baseline.json) type="baseline" ;;
93+
*benchmark-candidate.json) type="candidate" ;;
94+
esac
95+
echo "Moving $file to $ARTIFACTS_DIR/${type}-${prefix}.converted.json"
96+
cp "$file" "$ARTIFACTS_DIR/${type}-${prefix}.converted.json"
97+
done
98+
done
99+
- bp-runner $CI_PROJECT_DIR/.gitlab/benchmarks/bp-runner.fail-on-regression.yml --debug
100+
71101
.dsm-kafka-benchmarks:
72102
stage: benchmarks
73103
rules:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
experiments:
2+
- name: Run regression check
3+
steps:
4+
- name: Regression Check
5+
run: fail_on_regression
6+
# Applies on all scenarios
7+
regression_threshold: 10.0 # percents

BUILDING.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ or on Windows:
2828
Your output should look something like the following:
2929

3030
```
31-
ℹ️ Checking required JVM:
32-
✅ JAVA_HOME is set to /Users/datadog/.sdkman/candidates/java/8.0.402-zulu.
33-
✅ JAVA_8_HOME is set to /Users/datadog/.sdkman/candidates/java/8.0.402-zulu.
34-
✅ JAVA_11_HOME is set to /Users/datadog/.sdkman/candidates/java/11.0.22-zulu.
35-
✅ JAVA_17_HOME is set to /Users/datadog/.sdkman/candidates/java/17.0.10-zulu.
36-
✅ JAVA_21_HOME is set to /Users/datadog/.sdkman/candidates/java/21.0.2-zulu.
37-
✅ JAVA_GRAALVM17_HOME is set to /Users/datadog/.sdkman/candidates/java/17.0.9-graalce.
31+
ℹ️ Checking required JVMs:
32+
✅ JAVA_HOME is set to /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home.
33+
✅ JAVA_8_HOME is set to /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home.
34+
✅ JAVA_11_HOME is set to /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home.
35+
✅ JAVA_17_HOME is set to /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home.
36+
✅ JAVA_21_HOME is set to /Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home.
37+
✅ JAVA_24_HOME is set to /Library/Java/JavaVirtualMachines/zulu-24.jdk/Contents/Home.
38+
✅ JAVA_GRAALVM17_HOME is set to /Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.3.1/Contents/Home.
3839
ℹ️ Checking git configuration:
3940
✅ The git command line is installed.
4041
✅ pre-commit hook is installed in repository.
@@ -51,22 +52,22 @@ If there is any issue with your output, check the requirements above and use the
5152

5253
Requirements to build the full project:
5354

54-
* The JDK versions 8, 11, 17 and 21 must be installed.
55-
* The `JAVA_8_HOME`, `JAVA_11_HOME`, `JAVA_17_HOME`, `JAVA_21_HOME`, and `JAVA_GRAALVM17_HOME` must point to their respective JDK location.
55+
* The JDK versions 8, 11, 17, 21, and 24 must be installed.
56+
* The `JAVA_8_HOME`, `JAVA_11_HOME`, `JAVA_17_HOME`, `JAVA_21_HOME`, `JAVA_24_HOME`, and `JAVA_GRAALVM17_HOME` must point to their respective JDK location.
5657
* The JDK 8 `bin` directory must be the only JDK on the PATH (e.g. `$JAVA_8_HOME/bin`).
5758
* The `JAVA_HOME` environment variable may be unset. If set, it must point to the JDK 8 location (same as `JAVA_8_HOME`).
5859
* The `git` command line must be installed.
5960
* A container runtime environment must be available to run all tests (e.g. Docker Desktop).
6061

6162
### Install the required JDKs
6263

63-
Download and install JDK versions 8, 11, 17 and 21, and GraalVM 17 for your OS.
64+
Download and install JDK versions 8, 11, 17, 21 and 24, and GraalVM 17 for your OS.
6465

6566
#### macOS
6667

6768
* Install the required JDKs using `brew`:
6869
```shell
69-
brew install --cask zulu@8 zulu@11 zulu@17 zulu@21 graalvm/tap/graalvm-ce-java17
70+
brew install --cask zulu@8 zulu@11 zulu@17 zulu@21 zulu graalvm/tap/graalvm-ce-java17
7071
```
7172
* Fix the GraalVM installation by [removing the quarantine flag](https://www.graalvm.org/latest/docs/getting-started/macos/):
7273
```
@@ -78,6 +79,7 @@ Download and install JDK versions 8, 11, 17 and 21, and GraalVM 17 for your OS.
7879
export JAVA_11_HOME=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
7980
export JAVA_17_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
8081
export JAVA_21_HOME=/Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home
82+
export JAVA_24_HOME=/Library/Java/JavaVirtualMachines/zulu-24.jdk/Contents/Home
8183
export JAVA_GRAALVM17_HOME=/Library/Java/JavaVirtualMachines/graalvm-<current version of graalvm>/Contents/Home
8284
export JAVA_HOME=$JAVA_8_HOME
8385
```
@@ -93,22 +95,23 @@ Download and install JDK versions 8, 11, 17 and 21, and GraalVM 17 for your OS.
9395
9496
#### Linux
9597

96-
* Download and extract JDK 8, 11, 17, and 21 from [Eclipse Temurin releases](https://adoptium.net/temurin/releases/) and GraalVM 17 from [Oracle downloads](https://www.graalvm.org/downloads/).
98+
* Download and extract JDK 8, 11, 17, 21, and 24 from [Eclipse Temurin releases](https://adoptium.net/temurin/releases/) and GraalVM 17 from [Oracle downloads](https://www.graalvm.org/downloads/).
9799
* Install the GraalVM native image requirements for native builds by following [the GraalVM official documentation](https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites).
98100
* Add the required environment variables to your shell using the `export` command. You can permanently install the environment variables by appending the `export` commands into your shell configuration file `~/.zshrc` or `~/.bashrc` or other.
99101
```shell
100102
export JAVA_8_HOME=/<path to extracted archive>/jdk8u<current version of JDK 8>
101103
export JAVA_11_HOME=/<path to extracted archive>/jdk-11.<current version of JDK 11>
102104
export JAVA_17_HOME=/<path to extracted archive>/jdk-17.<current version of JDK 17>
103105
export JAVA_21_HOME=/<path to extracted archive>/jdk-21.<current version of JDK 21>
106+
export JAVA_24_HOME=/<path to extracted archive>/jdk-24.<current version of JDK 24>
104107
export JAVA_GRAALVM17_HOME=/<path to extracted archive>/graalvm-jdk-17.<current version of graalvm>/Contents/Home
105108
export JAVA_HOME=$JAVA_8_HOME
106109
```
107110
* Restart your shell after applying the changes if you appended the commands to your shell configuration file.
108111

109112
#### Windows
110113

111-
* Download and install JDK 8, 11, 17, and 21 [Eclipse Temurin releases](https://adoptium.net/temurin/releases/).
114+
* Download and install JDK 8, 11, 17, 21, and 24 [Eclipse Temurin releases](https://adoptium.net/temurin/releases/).
112115

113116
<details>
114117
<summary>Alternatively, install JDKs using winget or scoop. (click here to expand)</summary>
@@ -118,6 +121,7 @@ Download and install JDK versions 8, 11, 17 and 21, and GraalVM 17 for your OS.
118121
winget install --id EclipseAdoptium.Temurin.11.JDK
119122
winget install --id EclipseAdoptium.Temurin.17.JDK
120123
winget install --id EclipseAdoptium.Temurin.21.JDK
124+
winget install --id EclipseAdoptium.Temurin.24.JDK
121125
```
122126
123127
```pwsh
@@ -126,6 +130,7 @@ Download and install JDK versions 8, 11, 17 and 21, and GraalVM 17 for your OS.
126130
scoop install temurin11-jdk
127131
scoop install temurin17-jdk
128132
scoop install temurin21-jdk
133+
scoop install temurin24-jdk
129134
```
130135

131136
</details>
@@ -136,6 +141,7 @@ Download and install JDK versions 8, 11, 17 and 21, and GraalVM 17 for your OS.
136141
[Environment]::SetEnvironmentVariable("JAVA_11_HOME", "C:\Program Files\Eclipse Adoptium\jdk-11.0.25.9-hotspot", [EnvironmentVariableTarget]::User)
137142
[Environment]::SetEnvironmentVariable("JAVA_17_HOME", "C:\Program Files\Eclipse Adoptium\jdk-17.0.12.7-hotspot", [EnvironmentVariableTarget]::User)
138143
[Environment]::SetEnvironmentVariable("JAVA_21_HOME", "C:\Program Files\Eclipse Adoptium\jdk-21.0.5.11-hotspot", [EnvironmentVariableTarget]::User)
144+
[Environment]::SetEnvironmentVariable("JAVA_24_HOME", "C:\Program Files\Eclipse Adoptium\jdk-24.0.1.9-hotspot", [EnvironmentVariableTarget]::User)
139145
140146
# JAVA_HOME = JAVA_8_HOME
141147
[Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Program Files\Eclipse Adoptium\jdk-8.0.432.6-hotspot", [EnvironmentVariableTarget]::User)

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/ci/GithubActionsInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public CIInfo buildCIInfo() {
9494
@Override
9595
public PullRequestInfo buildPullRequestInfo() {
9696
String baseRef = environment.get(GITHUB_BASE_REF);
97-
if (!Strings.isNotBlank(baseRef)) {
97+
if (Strings.isBlank(baseRef)) {
9898
return PullRequestInfo.EMPTY;
9999
}
100100

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/config/ChangedFiles.java

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

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/config/CiVisibilitySettings.java

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.nio.file.Path;
55
import java.util.Map;
66
import java.util.Objects;
7+
import javax.annotation.Nullable;
78

89
public class CiVisibilitySettings {
910

@@ -17,7 +18,8 @@ public class CiVisibilitySettings {
1718
false,
1819
false,
1920
EarlyFlakeDetectionSettings.DEFAULT,
20-
TestManagementSettings.DEFAULT);
21+
TestManagementSettings.DEFAULT,
22+
null);
2123

2224
private final boolean itrEnabled;
2325
private final boolean codeCoverage;
@@ -28,6 +30,7 @@ public class CiVisibilitySettings {
2830
private final boolean knownTestsEnabled;
2931
private final EarlyFlakeDetectionSettings earlyFlakeDetectionSettings;
3032
private final TestManagementSettings testManagementSettings;
33+
@Nullable private final String defaultBranch;
3134

3235
CiVisibilitySettings(
3336
boolean itrEnabled,
@@ -38,7 +41,8 @@ public class CiVisibilitySettings {
3841
boolean impactedTestsDetectionEnabled,
3942
boolean knownTestsEnabled,
4043
EarlyFlakeDetectionSettings earlyFlakeDetectionSettings,
41-
TestManagementSettings testManagementSettings) {
44+
TestManagementSettings testManagementSettings,
45+
@Nullable String defaultBranch) {
4246
this.itrEnabled = itrEnabled;
4347
this.codeCoverage = codeCoverage;
4448
this.testsSkipping = testsSkipping;
@@ -48,6 +52,7 @@ public class CiVisibilitySettings {
4852
this.knownTestsEnabled = knownTestsEnabled;
4953
this.earlyFlakeDetectionSettings = earlyFlakeDetectionSettings;
5054
this.testManagementSettings = testManagementSettings;
55+
this.defaultBranch = defaultBranch;
5156
}
5257

5358
public boolean isItrEnabled() {
@@ -86,6 +91,11 @@ public TestManagementSettings getTestManagementSettings() {
8691
return testManagementSettings;
8792
}
8893

94+
@Nullable
95+
public String getDefaultBranch() {
96+
return defaultBranch;
97+
}
98+
8999
@Override
90100
public boolean equals(Object o) {
91101
if (this == o) {
@@ -103,7 +113,8 @@ public boolean equals(Object o) {
103113
&& impactedTestsDetectionEnabled == that.impactedTestsDetectionEnabled
104114
&& knownTestsEnabled == that.knownTestsEnabled
105115
&& Objects.equals(earlyFlakeDetectionSettings, that.earlyFlakeDetectionSettings)
106-
&& Objects.equals(testManagementSettings, that.testManagementSettings);
116+
&& Objects.equals(testManagementSettings, that.testManagementSettings)
117+
&& Objects.equals(defaultBranch, that.defaultBranch);
107118
}
108119

109120
@Override
@@ -117,7 +128,8 @@ public int hashCode() {
117128
impactedTestsDetectionEnabled,
118129
knownTestsEnabled,
119130
earlyFlakeDetectionSettings,
120-
testManagementSettings);
131+
testManagementSettings,
132+
defaultBranch);
121133
}
122134

123135
public interface Factory {
@@ -145,13 +157,20 @@ public CiVisibilitySettings fromJson(Map<String, Object> json) {
145157
EarlyFlakeDetectionSettings.JsonAdapter.INSTANCE.fromJson(
146158
(Map<String, Object>) json.get("early_flake_detection")),
147159
TestManagementSettings.JsonAdapter.INSTANCE.fromJson(
148-
(Map<String, Object>) json.get("test_management")));
160+
(Map<String, Object>) json.get("test_management")),
161+
getString(json, "default_branch", null));
149162
}
150163

151164
private static boolean getBoolean(
152165
Map<String, Object> json, String fieldName, boolean defaultValue) {
153166
Object value = json.get(fieldName);
154167
return value instanceof Boolean ? (Boolean) value : defaultValue;
155168
}
169+
170+
private static String getString(
171+
Map<String, Object> json, String fieldName, String defaultValue) {
172+
Object value = json.get(fieldName);
173+
return value instanceof String ? (String) value : defaultValue;
174+
}
156175
}
157176
}

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/config/ConfigurationApi.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ public Map<TestSetting, Map<String, Collection<TestFQN>>> getTestManagementTests
3838
TracerEnvironment tracerEnvironment) {
3939
return Collections.emptyMap();
4040
}
41-
42-
@Override
43-
public ChangedFiles getChangedFiles(TracerEnvironment tracerEnvironment) {
44-
return ChangedFiles.EMPTY;
45-
}
4641
};
4742

4843
CiVisibilitySettings getSettings(TracerEnvironment tracerEnvironment) throws IOException;
@@ -58,6 +53,4 @@ Map<String, Collection<TestFQN>> getKnownTestsByModule(TracerEnvironment tracerE
5853

5954
Map<TestSetting, Map<String, Collection<TestFQN>>> getTestManagementTestsByModule(
6055
TracerEnvironment tracerEnvironment) throws IOException;
61-
62-
ChangedFiles getChangedFiles(TracerEnvironment tracerEnvironment) throws IOException;
6356
}

0 commit comments

Comments
 (0)