Repository navigation
Avoid disabled agent instrumentation - #905
Merged
jvukicev merged 2 commits intoJul 2, 2026
Merged
Conversation
jvukicev
force-pushed
the
fix-disabled-agent-instrumentation
branch
from
June 5, 2026 08:32
9c4c05d to
a6b1c12
Compare
vjovanov
approved these changes
Jul 2, 2026
mergify Bot
added a commit
to robfrank/linklift
that referenced
this pull request
Jul 17, 2026
….2 to 1.1.4 [skip ci] Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 1.1.2 to 1.1.4. Release notes *Sourced from [org.graalvm.buildtools:native-maven-plugin's releases](https://github.com/graalvm/native-build-tools/releases).* > 1.1.4 > ----- > > What's Changed > -------------- > > * Release 1.1.3 by [`@graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#944](https://redirect.github.com/graalvm/native-build-tools/pull/944) > * Bump version to 1.1.4-SNAPSHOT by [`@graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#946](https://redirect.github.com/graalvm/native-build-tools/pull/946) > * Re-enable layered application functional test by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#904](https://redirect.github.com/graalvm/native-build-tools/pull/904) > * Fix Gradle system property quoting by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#907](https://redirect.github.com/graalvm/native-build-tools/pull/907) > * Avoid disabled agent instrumentation by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#905](https://redirect.github.com/graalvm/native-build-tools/pull/905) > * Use systemPropertyVariables for Maven test plugin injection by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#902](https://redirect.github.com/graalvm/native-build-tools/pull/902) > * Improve missing metadata reporting for newer repository releases by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#948](https://redirect.github.com/graalvm/native-build-tools/pull/948) > * Fix invalid Gradle tracing-agent grund citation by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#950](https://redirect.github.com/graalvm/native-build-tools/pull/950) > * Use explicit Gradle project dependency notation and test on Gradle 9.6.1 by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#903](https://redirect.github.com/graalvm/native-build-tools/pull/903) > * Migrate functional CI to GraalVM for JDK 25 by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#953](https://redirect.github.com/graalvm/native-build-tools/pull/953) > * Add Maven plugin inspections to CI by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#911](https://redirect.github.com/graalvm/native-build-tools/pull/911) > * Add common utils CI gate by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#912](https://redirect.github.com/graalvm/native-build-tools/pull/912) > * Fix Maven metadata repository fallback mutation by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#914](https://redirect.github.com/graalvm/native-build-tools/pull/914) > * Add regression tests for Windows args-file paths by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#915](https://redirect.github.com/graalvm/native-build-tools/pull/915) > * Update reachability metadata to 1.0.5 by [`@graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#962](https://redirect.github.com/graalvm/native-build-tools/pull/962) > > **Full Changelog**: <graalvm/native-build-tools@1.1.3...1.1.4> > > 1.1.3 > ----- > > What's Changed > -------------- > > * Release 1.1.2 by [`@graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#923](https://redirect.github.com/graalvm/native-build-tools/pull/923) > * Bump version to 1.1.3-SNAPSHOT by [`@graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#924](https://redirect.github.com/graalvm/native-build-tools/pull/924) > * Bump io.netty:netty-codec-http from 4.1.132.Final to 4.1.135.Final in /samples/metadata-repo-integration by [`@dependabot`](https://github.com/dependabot)[bot] in [graalvm/native-build-tools#932](https://redirect.github.com/graalvm/native-build-tools/pull/932) > * Refine grund specification by [`@jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#917](https://redirect.github.com/graalvm/native-build-tools/pull/917) > > **Full Changelog**: <graalvm/native-build-tools@1.1.2...1.1.3> Commits * [`68c8e9f`](graalvm/native-build-tools@68c8e9f) Release 1.1.4 * [`a38531d`](graalvm/native-build-tools@a38531d) Merge pull request [#962](https://redirect.github.com/graalvm/native-build-tools/issues/962) from graalvm/update-metadata-to-1.0.5 * [`3073b19`](graalvm/native-build-tools@3073b19) Update reachability metadata to 1.0.5 * [`6a4139f`](graalvm/native-build-tools@6a4139f) Add regression tests for Windows args-file paths ([#915](https://redirect.github.com/graalvm/native-build-tools/issues/915)) * [`128dd2c`](graalvm/native-build-tools@128dd2c) Fix Maven metadata repository fallback mutation ([#914](https://redirect.github.com/graalvm/native-build-tools/issues/914)) * [`12ebca4`](graalvm/native-build-tools@12ebca4) Add common utils CI gate ([#912](https://redirect.github.com/graalvm/native-build-tools/issues/912)) * [`609bc14`](graalvm/native-build-tools@609bc14) Add Maven plugin inspections to CI ([#911](https://redirect.github.com/graalvm/native-build-tools/issues/911)) * [`52a30b1`](graalvm/native-build-tools@52a30b1) Migrate functional CI to GraalVM for JDK 25 ([#953](https://redirect.github.com/graalvm/native-build-tools/issues/953)) * [`4bdb360`](graalvm/native-build-tools@4bdb360) Use explicit Gradle project dependency notation and test on Gradle 9.6.1 ([#903](https://redirect.github.com/graalvm/native-build-tools/issues/903)) * [`fb710bb`](graalvm/native-build-tools@fb710bb) Fix invalid Gradle tracing-agent grund citation ([#950](https://redirect.github.com/graalvm/native-build-tools/issues/950)) * Additional commits viewable in [compare view](graalvm/native-build-tools@1.1.2...1.1.4) [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #847.
Fixes #743.
What changed
This PR avoids wiring native-image agent instrumentation into Gradle Java execution tasks when the resolved agent mode is disabled.
Before this change, Gradle
runand otherJavaExec-style tasks could still pick up agent-related wiring even when the build was not actually running with the tracing agent. That could interfere with repeated executions and task up-to-date behavior.After this change, agent wiring is only applied when the resolved agent mode is enabled, while real agent runs still keep their existing output tracking.
Why
This prevents disabled-agent builds from paying the cost or behavioral side effects of instrumentation wiring, while preserving the expected behavior for builds that do enable the tracing agent.
Example
Before:
Running a Gradle
runtask, or an IntelliJ-styleJavaExectask, multiple times without-Pagentcould still be affected by agent instrumentation wiring even though the agent was disabled.After:
The same tasks run without agent wiring when
-Pagentis not enabled, while builds that do enable the agent still keep the expected tracing-agent behavior and output tracking.Implementation summary
runand IntelliJ-styleJavaExecexecutions without-Pagent.runand configuration-cache coverage in place to verify the enabled path still behaves correctly.Validation
JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:functionalTest --tests 'org.graalvm.buildtools.gradle.JavaApplicationFunctionalTest.does not make JavaExec tasks up-to-date when the agent is disabled'JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal GRAALVM_HOME=/home/jovan/.sdkman/candidates/java/25.0.2-graal ./gradlew :native-gradle-plugin:functionalTest --tests 'org.graalvm.buildtools.gradle.JavaApplicationWithAgentFunctionalTest.agent instruments run task'JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal GRAALVM_HOME=/home/jovan/.sdkman/candidates/java/25.0.2-graal ./gradlew :native-gradle-plugin:functionalTest --tests 'org.graalvm.buildtools.gradle.JavaApplicationWithAgentFunctionalTest.supports configuration cache'JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:checkstyleMain