Skip to content

Conversation

@kumargu
Copy link
Contributor

@kumargu kumargu commented Apr 11, 2025

A quick fix to unblock load of PA plugins which defines Attach Permissions in its policy.

Fixes: opensearch-project/performance-analyzer#795

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.

@kumargu
Copy link
Contributor Author

kumargu commented Apr 11, 2025

cc @cwperks @andrross

cwperks
cwperks previously approved these changes Apr 11, 2025
@andrross
Copy link
Member

The error seems to be coming from this line:

https://github.com/opensearch-project/OpenSearch/blob/main/libs/agent-sm/agent-policy/src/main/java/org/opensearch/secure_sm/policy/PolicyFile.java#L148

and it's a java.lang.ClassNotFoundException: com/sun/tools/attach/AttachPermission. I don't think this change will fix it, will it?

@kumargu kumargu force-pushed the fix_plugin_with_attach_permission branch from 466cb71 to 1924325 Compare April 11, 2025 02:02
@kumargu kumargu changed the title Include AttachPermission to be able to load as known permissions [Java Agent Policy Parser] Skip evaluation of AttachPermission Apr 11, 2025
@andrross
Copy link
Member

Right. I overlooked that its ClassNotFoundException. Not sure tho why we would see that. Maybe because packages in sun.tools are not directly visible outside of JDK?

@kumargu My reading of the JDK policy file is that it would handle all class not found exceptions, so the fact this class isn't available to the class loader for whatever reason is probably not new.

@github-actions
Copy link
Contributor

❌ Gradle check result for 1924325: 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 1924325: 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 1924325: 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 1924325: 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 1924325: 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?

@kumargu kumargu force-pushed the fix_plugin_with_attach_permission branch from 1924325 to fa9d554 Compare April 11, 2025 06:09
@github-actions
Copy link
Contributor

❌ Gradle check result for fa9d554: 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 fa9d554: SUCCESS

@codecov
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.55%. Comparing base (1628152) to head (fa9d554).
Report is 13 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17896      +/-   ##
============================================
+ Coverage     72.43%   72.55%   +0.11%     
- Complexity    66789    66846      +57     
============================================
  Files          5449     5452       +3     
  Lines        309085   309210     +125     
  Branches      44979    44991      +12     
============================================
+ Hits         223899   224343     +444     
+ Misses        66906    66494     -412     
- Partials      18280    18373      +93     

☔ 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.

@cwperks cwperks merged commit 4d0ac04 into opensearch-project:main Apr 11, 2025
31 checks passed
@kumargu kumargu deleted the fix_plugin_with_attach_permission branch April 11, 2025 11:24
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Apr 15, 2025
Harsh-87 pushed a commit to Harsh-87/OpenSearch that referenced this pull request May 7, 2025
Harsh-87 pushed a commit to Harsh-87/OpenSearch that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][Release 3.0] Unable to start 3.0.0 after JSM changes

4 participants