Skip to content

Conversation

@rithin-pullela-aws
Copy link
Contributor

@rithin-pullela-aws rithin-pullela-aws commented Oct 18, 2025

Description

  • Add filtering for jrt: protocol URLs in StackCallerProtectionDomainChainExtractor
  • Added test case testFiltersJrtProtocolWithoutMockito() to verify the filtering behavior

Related Issues

Resolves opensearch-project/ml-commons#4209

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@rithin-pullela-aws rithin-pullela-aws requested a review from a team as a code owner October 18, 2025 06:41
@github-actions
Copy link
Contributor

❌ Gradle check result for 5b1a49f: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@cwperks
Copy link
Member

cwperks commented Oct 18, 2025

Re-ran the CI. Jenkins didn't pick it up on the first try.

@cwperks
Copy link
Member

cwperks commented Oct 18, 2025

@getsaurabh02 @peterzhuamazon Can this be included in the 3.3.1 patch release?

@owaiskazi19 @rithin-pullela-aws to provide impact on ml-commons. In some distributions, agentic search is hitting issues with the java agent due to this. See opensearch-project/ml-commons#4209

@github-actions
Copy link
Contributor

❌ Gradle check result for 5b1a49f: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@ylwu-amzn
Copy link
Contributor

This PR is to solve this issue opensearch-project/ml-commons#4209 right ? Not opensearch-project/ml-commons#4194

@owaiskazi19
Copy link
Member

owaiskazi19 commented Oct 18, 2025

This PR is to solve this issue opensearch-project/ml-commons#4209 right ? Not opensearch-project/ml-commons#4194

Yes, updated the description

@github-actions github-actions bot added the backport PRs or issues specific to backporting features or enhancments label Oct 18, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for 52a614f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@owaiskazi19 owaiskazi19 added the backport 3.3 Backport to 3.3 branch label Oct 18, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for 52a614f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@cwperks
Copy link
Member

cwperks commented Oct 18, 2025

Need to fix the compiler warnings. These are due to the test added in the PR.

 [3.3.0] > Task :libs:agent-sm:agent:compileJava
 [3.3.0] /home/ubuntu/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.17.7/3856bfab61beb23e099a0d6629f2ba8de4b98ace/byte-buddy-1.17.7.jar(/net/bytebuddy/implementation/bytecode/assign/Assigner.class): warning: Cannot find annotation method 'value()' in type 'SuppressFBWarnings': class file for edu.umd.cs.findbugs.annotations.SuppressFBWarnings not found
 [3.3.0] /home/ubuntu/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.17.7/3856bfab61beb23e099a0d6629f2ba8de4b98ace/byte-buddy-1.17.7.jar(/net/bytebuddy/implementation/bytecode/assign/Assigner.class): warning: Cannot find annotation method 'justification()' in type 'SuppressFBWarnings'
 [3.3.0] /home/ubuntu/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.17.7/3856bfab61beb23e099a0d6629f2ba8de4b98ace/byte-buddy-1.17.7.jar(/net/bytebuddy/description/type/TypeDescription$ForLoadedType.class): warning: Cannot find annotation method 'value()' in type 'SuppressFBWarnings'
 [3.3.0] /home/ubuntu/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.17.7/3856bfab61beb23e099a0d6629f2ba8de4b98ace/byte-buddy-1.17.7.jar(/net/bytebuddy/description/type/TypeDescription$ForLoadedType.class): warning: Cannot find annotation method 'justification()' in type 'SuppressFBWarnings'
...

You can fix by adding compileOnly dependency on spotbugs-annotations in libs/agent-sm/agent/build.gradle

i.e. compileOnly("com.github.spotbugs:spotbugs-annotations:4.9.7")

@owaiskazi19
Copy link
Member

owaiskazi19 commented Oct 21, 2025

@cwperks gradle check is failing with. Will rebase

Execution failed for task ':distribution:bwc:minor:buildBwcLinuxTar'.
> Building 3.3.0 didn't generate expected file /var/jenkins/workspace/gradle-check/search/distribution/bwc/minor/build/bwc/checkout-3.3/distribution/archives/linux-tar/build/distributions/opensearch-min-3.3.0-SNAPSHOT-linux-x64.tar.gz

@github-actions
Copy link
Contributor

❌ Gradle check result for a5d9659: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for a5d9659: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for a5d9659: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

rithin-pullela-aws and others added 4 commits October 21, 2025 13:02
Signed-off-by: rithin-pullela-aws <[email protected]>
Signed-off-by: rithin-pullela-aws <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
@github-actions
Copy link
Contributor

✅ Gradle check result for 37a938e: SUCCESS

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.09%. Comparing base (3ffa49a) to head (37a938e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ent/StackCallerProtectionDomainChainExtractor.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19683      +/-   ##
============================================
+ Coverage     73.07%   73.09%   +0.02%     
- Complexity    70741    70765      +24     
============================================
  Files          5732     5732              
  Lines        324140   324141       +1     
  Branches      46922    46922              
============================================
+ Hits         236853   236945      +92     
+ Misses        68117    68038      -79     
+ Partials      19170    19158      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@owaiskazi19 owaiskazi19 merged commit 3443d27 into opensearch-project:main Oct 21, 2025
32 of 33 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 21, 2025
…19683)

* [Java Agent] Allow JRT protocol URLs in protection domain extraction

Signed-off-by: rithin-pullela-aws <[email protected]>

* Add changelog

Signed-off-by: rithin-pullela-aws <[email protected]>

* Use static imports

Signed-off-by: rithin-pullela-aws <[email protected]>

* Add spotbugs dependency

Signed-off-by: Owais Kazi <[email protected]>

---------

Signed-off-by: rithin-pullela-aws <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
Co-authored-by: Owais Kazi <[email protected]>
(cherry picked from commit 3443d27)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
testingConventions.enabled = false

dependencies {
compileOnly "com.github.spotbugs:spotbugs-annotations:4.9.7"
Copy link
Member

Choose a reason for hiding this comment

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

Why was this added?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

For the warnings reported here

owaiskazi19 added a commit that referenced this pull request Oct 22, 2025
…19683) (#19709)

* [Java Agent] Allow JRT protocol URLs in protection domain extraction



* Add changelog



* Use static imports



* Add spotbugs dependency



---------




(cherry picked from commit 3443d27)

Signed-off-by: rithin-pullela-aws <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Owais Kazi <[email protected]>
kh3ra pushed a commit to kh3ra/OpenSearch that referenced this pull request Oct 23, 2025
…pensearch-project#19683)

* [Java Agent] Allow JRT protocol URLs in protection domain extraction

Signed-off-by: rithin-pullela-aws <[email protected]>

* Add changelog

Signed-off-by: rithin-pullela-aws <[email protected]>

* Use static imports

Signed-off-by: rithin-pullela-aws <[email protected]>

* Add spotbugs dependency

Signed-off-by: Owais Kazi <[email protected]>

---------

Signed-off-by: rithin-pullela-aws <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
Co-authored-by: Owais Kazi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport PRs or issues specific to backporting features or enhancments backport 3.3 Backport to 3.3 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Failed to get tools from external MCP server

5 participants