Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations - #12103
Conversation
There was a problem hiding this comment.
More details
The verification task now isolates its child JVM from inherited JAVA_TOOL_OPTIONS, and the integration-listing path still executes cleanly under valid and misspelled environment-variable inputs. The project task itself could not be launched in this sandbox because the required JDK 25 and Gradle 9.6.1 distribution were unavailable, but the exact JavaExec environment-removal behavior passed in an isolated harness.
📊 Validated against 3 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 5967499 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
| // Listing integrations only inspects classes and metadata in the assembled agent jar, so it does | ||
| // not need inherited JAVA_TOOL_OPTIONS. | ||
| environment.remove('JAVA_TOOL_OPTIONS') |
There was a problem hiding this comment.
I think we can follow this way as a fix (and maybe even keep it).
As alternative solution we may probably need to make check logic more robust.
like add some sort of begin marker and end marker and analyze output between markers.
I just executed locally:
java -jar dd-java-agent/build/libs/dd-java-agent-1.65.0-SNAPSHOT.jar --list-integrations
and got the output:
IastInstrumentation
aerospike
akka-http
....
zio.experimental
So as possible improvements we can generate something like:
java -jar dd-java-agent/build/libs/dd-java-agent-1.65.0-SNAPSHOT.jar --list-integrations --with-marker
List of dd-trace-java integrations:
==============
IastInstrumentation
aerospike
akka-http
....
zio.experimental
===============
This is just my idea and this solution will require more work.
There was a problem hiding this comment.
@AlexeyKuznetsov-DD I'm not sure it's worth introducing this option in the tracer. I.e. I don't see how it would benefit other usages.
|
🎯 Code Coverage (details) 🔗 Commit SHA: 5967499 | Docs | Datadog PR Page | Give us feedback! |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
|
|
||
| // Listing integrations only inspects classes and metadata in the assembled agent jar, so it does | ||
| // not need inherited JAVA_TOOL_OPTIONS. | ||
| environment.remove('JAVA_TOOL_OPTIONS') |
There was a problem hiding this comment.
Q: Does this remove the ENV from this Gradle task only? Meaning this would not affect other tasks running as part of the same build which may require JAVA_TOOL_OPTIONS?
There was a problem hiding this comment.
Yes - JAVA_TOOLS_OPTIONS is removed only from the child JVM of the verifyAgentJarIntegrations Gradle task!
|
/merge --f --reason "Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ" |
|
View all feedbacks in Devflow UI.
Failed to generate input: unknown flag: --f If you need support, contact us on Slack #devflow. with those details! |
|
/merge -f --reason "Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ" |
|
View all feedbacks in Devflow UI.
The expected merge time in
Warning This change was merged without running any pre merge CI checks Reason: Unblock CI - and this change only affects the build job which is fully tested in PR CI, so no need to re-run in MQ |
693988c
into
master
| // Listing integrations only inspects classes and metadata in the assembled agent jar, so it does | ||
| // not need inherited JAVA_TOOL_OPTIONS. | ||
| environment.remove('JAVA_TOOL_OPTIONS') |
There was a problem hiding this comment.
@AlexeyKuznetsov-DD I'm not sure it's worth introducing this option in the tracer. I.e. I don't see how it would benefit other usages.
|
|
||
| // Listing integrations only inspects classes and metadata in the assembled agent jar, so it does | ||
| // not need inherited JAVA_TOOL_OPTIONS. | ||
| environment.remove('JAVA_TOOL_OPTIONS') |
There was a problem hiding this comment.
note: There are another special env var JDK_JAVA_OPTIONS that offer a similar feature (albeit with some restrictions). (Ignoring the undocumented, internal hotspot specific _JAVA_OPTIONS).
That said, I'm not sure this is worth a follow-up at this time.
…2103) Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations Co-authored-by: sarah.chen <sarah.chen@datadoghq.com>
Capture Kafka consumer group membership on join for DSM Instrument ConsumerCoordinator.onJoinComplete (kafka-clients 0.11 and 3.8) to report the broker-assigned member id, generation id and negotiated member protocol each time a consumer (re)joins a group. Reported through Data Streams Monitoring alongside the consumer group and cluster id via a new reportKafkaConsumerGroupMember path (member_host is not available client-side and is intentionally omitted). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> kafka: skip membership report when cluster id is unknown A membership report can't be attributed downstream without a cluster id, so skip it (the kafka_consumer integration reports the member with the cluster id and the tracer re-reports on the next rejoin) rather than emit an empty-cluster row. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Fix membership dedup ordering and strip comments from kafka DSM membership reporting Only mark a membership as reported once reportConsumerGroupMember actually attempts the report (i.e. cluster id is known), instead of marking it unconditionally before the cluster-id check. Also aligns generationId serialization with writeInt/unpackInt used elsewhere for int fields, and removes redundant/duplicated comments introduced by the feature. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Restore pre-existing comments accidentally stripped in previous cleanup Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Encapsulate Kafka membership change detection Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations (#12103) Remove check for JAVA_TOOLS_OPTIONS in verifyAgentJarIntegrations Co-authored-by: sarah.chen <sarah.chen@datadoghq.com> Co-authored-by: sarahchen6 <sarah.chen@datadoghq.com> Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
What Does This Do
Remove check for
JAVA_TOOLS_OPTIONSinverifyAgentJarIntegrationsGradle task.Motivation
Recent Fabric Egress Gateway changes in CI injected proxy settings through
JAVA_TOOLS_OPTIONSwhich the JVM echoes tostderr. Any info instderrcauses the verification task to fail, so this led to a broken CI. The verification task intends to confirm class and metadata info, not tool options, so we can remove theJAVA_TOOLS_OPTIONScheck entirely.Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]