Skip to content

Fix SLF4J component error#20587

Merged
cwperks merged 1 commit intoopensearch-project:mainfrom
ShawnQiang1:main
Feb 12, 2026
Merged

Fix SLF4J component error#20587
cwperks merged 1 commit intoopensearch-project:mainfrom
ShawnQiang1:main

Conversation

@ShawnQiang1
Copy link
Copy Markdown
Contributor

@ShawnQiang1 ShawnQiang1 commented Feb 10, 2026

Description

The error occurs because slf4j-api has changed from version 1.7.36 to 2.10.17, while the corresponding log4j-slf4j-impl needs to be changed to log4j-slf4j2-impl.

Related Issues

Resolves #20579

@ShawnQiang1 ShawnQiang1 requested a review from a team as a code owner February 10, 2026 14:34
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 10, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This pull request updates the Log4j SLF4J binding implementation across multiple build files from log4j-slf4j-impl to log4j-slf4j2-impl version 2.25.3, updates associated SHA-1 checksums, and documents the fix in the changelog.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Added entry documenting the SLF4J component error fix.
Build Configuration
client/rest/build.gradle, plugins/repository-hdfs/build.gradle, plugins/repository-s3/build.gradle, qa/wildfly/build.gradle
Replaced log4j-slf4j-impl dependency with log4j-slf4j2-impl for test and runtime scopes.
License Checksums - HDFS
plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.25.3.jar.sha1, plugins/repository-hdfs/licenses/log4j-slf4j2-impl-2.25.3.jar.sha1
Removed SHA-1 checksum for old implementation; added checksum for new SLF4J2 binding implementation.
License Checksums - S3
plugins/repository-s3/licenses/log4j-slf4j-impl-2.25.3.jar.sha1, plugins/repository-s3/licenses/log4j-slf4j2-impl-2.25.3.jar.sha1
Removed SHA-1 checksum for old implementation; added checksum for new SLF4J2 binding implementation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

dependencies, patch

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix SLF4J component error' accurately describes the main change: replacing log4j-slf4j-impl with log4j-slf4j2-impl to fix an SLF4J compatibility error after upgrading slf4j-api.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description addresses the core issue and relates to the issue number, but lacks comprehensive details about scope and testing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@CHANGELOG.md`:
- Line 23: Update the changelog entry that currently reads "Fix SLF4J component
error ([20586](https://github.com/opensearch-project/OpenSearch/pull/20586))" to
reference the correct PR number and match the repository's link style: change
the PR number from 20586 to 20587 and add the '#' prefix in the link text so it
reads "Fix SLF4J component error
(#[20587](https://github.com/opensearch-project/OpenSearch/pull/20587))".
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e59c30c and c5d59ae.

📒 Files selected for processing (9)
  • CHANGELOG.md
  • client/rest/build.gradle
  • plugins/repository-hdfs/build.gradle
  • plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.25.3.jar.sha1
  • plugins/repository-hdfs/licenses/log4j-slf4j2-impl-2.25.3.jar.sha1
  • plugins/repository-s3/build.gradle
  • plugins/repository-s3/licenses/log4j-slf4j-impl-2.25.3.jar.sha1
  • plugins/repository-s3/licenses/log4j-slf4j2-impl-2.25.3.jar.sha1
  • qa/wildfly/build.gradle
💤 Files with no reviewable changes (2)
  • plugins/repository-hdfs/licenses/log4j-slf4j-impl-2.25.3.jar.sha1
  • plugins/repository-s3/licenses/log4j-slf4j-impl-2.25.3.jar.sha1
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Code-Diff-Analyzer / Code-Diff-Analyzer
  • GitHub Check: Mend Security Check
🔇 Additional comments (6)
plugins/repository-hdfs/build.gradle (1)

79-79: LGTM!

Correct switch to log4j-slf4j2-impl to match the SLF4J 2.x API declared on line 78.

qa/wildfly/build.gradle (1)

65-65: LGTM!

Correct migration to log4j-slf4j2-impl for the test dependency.

plugins/repository-s3/build.gradle (1)

96-96: LGTM!

Correct migration to log4j-slf4j2-impl for the runtime dependency.

plugins/repository-s3/licenses/log4j-slf4j2-impl-2.25.3.jar.sha1 (1)

1-1: LGTM!

Checksum is consistent with the HDFS plugin's license file for the same artifact.

client/rest/build.gradle (1)

74-74: LGTM!

Correct migration to log4j-slf4j2-impl for the test dependency.

plugins/repository-hdfs/licenses/log4j-slf4j2-impl-2.25.3.jar.sha1 (1)

1-1: SHA-1 checksum for log4j-slf4j2-impl-2.25.3.jar is correct.

The hash 8d1aca17817adb4a15720e64b98caf9cb3b2cc51 matches the published artifact on Maven Central.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@ShawnQiang1 ShawnQiang1 force-pushed the main branch 3 times, most recently from 681f583 to 2e7219e Compare February 10, 2026 14:45
@github-actions github-actions bot added bug Something isn't working Plugins labels Feb 10, 2026
@ShawnQiang1 ShawnQiang1 force-pushed the main branch 3 times, most recently from 3f36c2d to 913a817 Compare February 10, 2026 15:10
@cwperks
Copy link
Copy Markdown
Member

cwperks commented Feb 11, 2026

@ShawnQiang1 Thank you for the PR! The changes look good to me. Waiting to see the results of the gradle check.

@cwperks
Copy link
Copy Markdown
Member

cwperks commented Feb 11, 2026

[Incubating] Problems report is available at: file:///home/runner/work/OpenSearch/OpenSearch/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':plugins:repository-hdfs:dependencyLicenses'.
> Missing LICENSE for log4j-slf4j2-impl-2.25.3.jar, expected in log4j-slf4j2-impl-LICENSE.txt

@ShawnQiang1 we will need to add the LICENSE and NOTICE file into the licenses/ directory of the subproject.

@ShawnQiang1
Copy link
Copy Markdown
Contributor Author

[Incubating] Problems report is available at: file:///home/runner/work/OpenSearch/OpenSearch/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':plugins:repository-hdfs:dependencyLicenses'.
> Missing LICENSE for log4j-slf4j2-impl-2.25.3.jar, expected in log4j-slf4j2-impl-LICENSE.txt

@ShawnQiang1 we will need to add the LICENSE and NOTICE file into the licenses/ directory of the subproject.

Okay, I'll revise it after I get off work.

@ShawnQiang1
Copy link
Copy Markdown
Contributor Author

[Incubating] Problems report is available at: file:///home/runner/work/OpenSearch/OpenSearch/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':plugins:repository-hdfs:dependencyLicenses'.
> Missing LICENSE for log4j-slf4j2-impl-2.25.3.jar, expected in log4j-slf4j2-impl-LICENSE.txt

@ShawnQiang1 we will need to add the LICENSE and NOTICE file into the licenses/ directory of the subproject.

@cwperks done

Signed-off-by: Shawn Qiang <814238703@qq.com>
@github-actions
Copy link
Copy Markdown
Contributor

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

@ShawnQiang1 ShawnQiang1 requested a review from cwperks February 12, 2026 01:41
@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for b6b8d68: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.36%. Comparing base (e59c30c) to head (b6b8d68).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20587      +/-   ##
============================================
- Coverage     73.37%   73.36%   -0.01%     
- Complexity    72197    72201       +4     
============================================
  Files          5798     5798              
  Lines        329816   329816              
  Branches      47538    47538              
============================================
- Hits         242001   241977      -24     
- Misses        68458    68515      +57     
+ Partials      19357    19324      -33     

☔ 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 c94203d into opensearch-project:main Feb 12, 2026
38 of 40 checks passed
@cwperks cwperks added the v3.6.0 Issues and PRs related to version 3.6.0 label Feb 12, 2026
tanyabti pushed a commit to tanyabti/OpenSearch that referenced this pull request Feb 24, 2026
Signed-off-by: Shawn Qiang <814238703@qq.com>
tanyabti pushed a commit to tanyabti/OpenSearch that referenced this pull request Feb 24, 2026
Signed-off-by: Shawn Qiang <814238703@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Plugins v3.6.0 Issues and PRs related to version 3.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] SLF4J warnings in OpenSearch 3.4

2 participants