Skip to content

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Sep 19, 2025

Description

Quick follow up from #714 to solve a dependency injection issue resulting as the change of LockService from a class to an interface. Since JS returns LockService from createComponents, it also needs to bind the interface to the concrete class to let Guice know how to do the dependency injection.

Related Issues

Resolves issue seen in https://github.com/opensearch-project/security-analytics/actions/runs/17865468930/job/50806591993?pr=1577

»  org.opensearch.common.inject.ConfigurationException: Guice configuration errors:
»  
»  1) No implementation for org.opensearch.jobscheduler.spi.utils.LockService was bound.
»    while locating org.opensearch.jobscheduler.spi.utils.LockService
»      for parameter 0 at org.opensearch.securityanalytics.SecurityAnalyticsPlugin$GuiceHolder.<init>(Unknown Source)
»    while locating org.opensearch.securityanalytics.SecurityAnalyticsPlugin$GuiceHolder
»  
»  1 error
»  	at <<<guice>>>
»  	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)

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.

@cwperks cwperks changed the title Create guice model to bind LockService interface from SPI to LockServiceImpl Create guice module to bind LockService interface from SPI to LockServiceImpl Sep 19, 2025
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.49%. Comparing base (8b2c5fa) to head (f20703d).
⚠️ Report is 4 commits behind head on main.

❌ Your project status has failed because the head coverage (70.49%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #833      +/-   ##
==========================================
+ Coverage   69.99%   70.49%   +0.49%     
==========================================
  Files          38       42       +4     
  Lines        1733     2057     +324     
  Branches      156      165       +9     
==========================================
+ Hits         1213     1450     +237     
- Misses        430      497      +67     
- Partials       90      110      +20     

☔ 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 726c2ac into opensearch-project:main Sep 19, 2025
30 of 34 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in Engineering Effectiveness Board Sep 19, 2025
@cwperks cwperks mentioned this pull request Sep 23, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants