Skip to content

Various Gitlab tweaks and test fixes #8847

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 3 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ muzzle-dep-report:
needs: [ build_tests ]
stage: tests
variables:
KUBERNETES_MEMORY_REQUEST: 16Gi
KUBERNETES_MEMORY_LIMIT: 16Gi
KUBERNETES_MEMORY_REQUEST: 17Gi
KUBERNETES_MEMORY_LIMIT: 17Gi
KUBERNETES_CPU_REQUEST: 10
GRADLE_WORKERS: 4
GRADLE_MEM: 3G
Expand All @@ -402,7 +402,7 @@ muzzle-dep-report:
export PROFILER_COMMAND="-XX:StartFlightRecording=settings=profile,filename=/tmp/${CI_JOB_NAME_SLUG}.jfr,dumponexit=true";
fi
- *prepare_test_env
- export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xms$GRADLE_MEM -Xmx$GRADLE_MEM $PROFILER_COMMAND -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp' -Ddatadog.forkedMaxHeapSize=768M -Ddatadog.forkedMinHeapSize=128M"
- export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xms$GRADLE_MEM -Xmx$GRADLE_MEM $PROFILER_COMMAND -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp' -Ddatadog.forkedMaxHeapSize=1024M -Ddatadog.forkedMinHeapSize=128M"
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Maybe make the forkedMaxHeapSize a variable.

Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: On another topic, I believe we should remove -Xms param here (or reduce the minimum like 512M or 1G). I removed some during the CircleCi tweaks

- ./gradlew $GRADLE_TARGET $GRADLE_PARAMS -PtestJvm=$testJvm -PtaskPartitionCount=$NORMALIZED_NODE_TOTAL -PtaskPartition=$NORMALIZED_NODE_INDEX $GRADLE_ARGS --continue || $CONTINUE_ON_FAILURE
after_script:
- *restore_pretest_env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import jdk.jfr.FlightRecorder;
import jdk.jfr.Recording;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.openjdk.jmc.common.item.Aggregators;
Expand Down Expand Up @@ -60,9 +61,13 @@ public boolean equals(final Object obj) {
private Recording snapshot;
private ExceptionHistogram instance;

@BeforeAll
public static void precheck() {
assumeFalse(Platform.isJ9());
}

@BeforeEach
public void setup() {
assumeFalse(Platform.isJ9());
recording = new Recording();
recording.enable("datadog.ExceptionCount");
recording.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static ProcessBuilder createProcessBuilder(
Arrays.asList(
javaPath(),
// "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5006",
"-Xmx" + System.getProperty("datadog.forkedMaxHeapSize", "512M"),
"-Xmx" + System.getProperty("datadog.forkedMaxHeapSize", "1024M"),
"-Xms" + System.getProperty("datadog.forkedMinHeapSize", "64M"),
"-javaagent:" + agentShadowJar(),
"-XX:ErrorFile=/tmp/hs_err_pid%p.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ private static ProcessBuilder createProcessBuilder(
final List<String> command =
Arrays.asList(
javaPath(),
"-Xmx" + System.getProperty("datadog.forkedMaxHeapSize", "512M"),
"-Xmx" + System.getProperty("datadog.forkedMaxHeapSize", "1024M"),
"-Xms" + System.getProperty("datadog.forkedMinHeapSize", "64M"),
"-javaagent:" + agentShadowJar(),
"-XX:ErrorFile=/tmp/hs_err_pid%p.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static ProcessBuilder createProcessBuilder(
new ArrayList<>(
Arrays.asList(
javaPath(),
"-Xmx" + System.getProperty("datadog.forkedMaxHeapSize", "512M"),
"-Xmx" + System.getProperty("datadog.forkedMaxHeapSize", "1024M"),
"-Xms" + System.getProperty("datadog.forkedMinHeapSize", "64M"),
"-javaagent:" + agentShadowJar(),
"-XX:ErrorFile=/tmp/hs_err_pid%p.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class ForkedTestUtils {
public static String getMaxMemoryArgumentForFork() {
return "-Xmx" + System.getProperty("datadog.forkedMaxHeapSize", "512M");
return "-Xmx" + System.getProperty("datadog.forkedMaxHeapSize", "1024M");
}

public static String getMinMemoryArgumentForFork() {
Expand Down
Loading