Skip to content

Conversation

@dhrubo-os
Copy link
Collaborator

Description

[updating gson version to resolve conflict coming from core]

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

mingshl
mingshl previously approved these changes Sep 17, 2025
pyek-bot
pyek-bot previously approved these changes Sep 17, 2025
Copy link
Collaborator

@pyek-bot pyek-bot left a comment

Choose a reason for hiding this comment

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

is there a way to use to fetch the version directly from core as we do for some other dependencies? approving to unblock

@mingshl
Copy link
Collaborator

mingshl commented Sep 17, 2025

* What went wrong:
Execution failed for task ':opensearch-ml-plugin:compileYamlRestTestJava'.
> Could not resolve all files for configuration ':opensearch-ml-plugin:yamlRestTestCompileClasspath'.
   > Could not resolve com.google.errorprone:error_prone_annotations:2.38.0.
     Required by:
         project :opensearch-ml-plugin > org.apache.logging.log4j:log4j-core:2.25.1
         project :opensearch-ml-plugin > org.apache.logging.log4j:log4j-core:2.25.1 > org.apache.logging.log4j:log4j-api:2.25.1
      > Conflict found for module 'com.google.errorprone:error_prone_annotations': between versions 2.41.0 and 2.38.0
> There is 1 more failure with an identical cause.

@mingshl
Copy link
Collaborator

mingshl commented Sep 17, 2025

try changing

+++ b/plugin/build.gradle

  • implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.19.0"
  • implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.25.1"

@dhrubo-os
Copy link
Collaborator Author

is there a way to use to fetch the version directly from core as we do for some other dependencies? approving to unblock

Good question! I didn't find anything about gson from here

cwperks
cwperks previously approved these changes Sep 17, 2025
@cwperks
Copy link
Member

cwperks commented Sep 17, 2025

is there a way to use to fetch the version directly from core as we do for some other dependencies? approving to unblock

Good question! I didn't find anything about gson from here

We should certainly move this to the version catalog for consistency. I'll create a PR on the core repo.

@cwperks
Copy link
Member

cwperks commented Sep 17, 2025

@dhrubo-os I raised a core PR here: opensearch-project/OpenSearch#19328

@dhrubo-os dhrubo-os merged commit 281c430 into opensearch-project:main Sep 17, 2025
9 checks passed
@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.91%. Comparing base (5cabf63) to head (3f37fae).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4176      +/-   ##
============================================
- Coverage     81.91%   81.91%   -0.01%     
  Complexity     8882     8882              
============================================
  Files           762      762              
  Lines         38200    38200              
  Branches       4267     4267              
============================================
- Hits          31291    31290       -1     
- Misses         5080     5082       +2     
+ Partials       1829     1828       -1     
Flag Coverage Δ
ml-commons 81.91% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

}
implementation group: 'com.google.code.gson', name: 'gson', version: '2.11.0'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.13.2'
api "com.google.errorprone:error_prone_annotations:${versions.error_prone_annotations}"
Copy link
Member

Choose a reason for hiding this comment

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

Why is this API? I'm having to resolve this now :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh bummer, I can remove this line. Seems like this is unnecessary. I'll raise a follow up PR to address this change: opensearch-project/OpenSearch#19328

Copy link
Member

Choose a reason for hiding this comment

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

No worries, already forced it on my end. Just curious if it was required!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants