Skip to content

Commit f998f3f

Browse files
authored
Try to fix continued graalvm test flakes (#8319)
1 parent 3c0f6ff commit f998f3f

5 files changed

Lines changed: 18 additions & 18 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ jobs:
127127
echo "JAVA_HOME: $JAVA_HOME"
128128
java --version
129129
native-image --version
130-
./gradlew nativeTest
130+
# GraalVM Native Build Tools plugin is not compatible with configuration cache
131+
# https://github.com/graalvm/native-build-tools/issues/477
132+
./gradlew nativeTest --no-configuration-cache
131133
env:
132134
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
133135

docs/knowledge/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ is the signal.
1818
| [api-stability.md](api-stability.md) | Public API additions, removals, renames, or deprecations; stable vs alpha compatibility |
1919
| [gradle-conventions.md](gradle-conventions.md) | `build.gradle.kts` or `settings.gradle.kts` changes; new modules |
2020
| [testing-patterns.md](testing-patterns.md) | Test files in scope — assertions, test utilities, test suites |
21-
| [other-tasks.md](other-tasks.md) | Dev environment setup, benchmarks, composite builds, OTLP protobuf updates |
21+
| [other-tasks.md](other-tasks.md) | Dev environment setup, benchmarks, composite builds, native image tests, OTLP protobuf updates |
2222

2323
## Conventions
2424

docs/knowledge/other-tasks.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,20 @@ cp buildscripts/pre-commit .git/hooks/pre-commit
7070
ln -s ../../buildscripts/pre-commit .git/hooks/pre-commit
7171
```
7272

73+
## Native image tests (GraalVM)
74+
75+
GraalVM native image integration tests live in `integration-tests/graal` and
76+
`integration-tests/graal-incubating`. They are **not** part of the standard `build` task and
77+
require a GraalVM JDK with `native-image` installed.
78+
79+
```bash
80+
./gradlew nativeTest --no-configuration-cache
81+
```
82+
83+
The `--no-configuration-cache` flag is required because the GraalVM Native Build Tools plugin
84+
triggers cross-project configuration resolution during the cache store phase, which races with
85+
task execution under Gradle's parallel executor.
86+
7387
## Updating OTLP protobufs
7488

7589
OTLP protobuf Java bindings are published via

integration-tests/graal-incubating/build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,3 @@ graalvmNative {
4545
enabled.set(false)
4646
}
4747
}
48-
49-
// GraalVM Native Build Tools plugin is not yet compatible with configuration cache
50-
// https://github.com/graalvm/native-build-tools/issues/477
51-
tasks.configureEach {
52-
if (name.startsWith("native") || name == "test" || name == "collectReachabilityMetadata") {
53-
notCompatibleWithConfigurationCache("GraalVM Native Build Tools plugin is not compatible with configuration cache")
54-
}
55-
}

integration-tests/graal/build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,3 @@ graalvmNative {
4242
enabled.set(false)
4343
}
4444
}
45-
46-
// GraalVM Native Build Tools plugin is not yet compatible with configuration cache
47-
// https://github.com/graalvm/native-build-tools/issues/477
48-
tasks.configureEach {
49-
if (name.startsWith("native") || name == "test" || name == "collectReachabilityMetadata") {
50-
notCompatibleWithConfigurationCache("GraalVM Native Build Tools plugin is not compatible with configuration cache")
51-
}
52-
}

0 commit comments

Comments
 (0)