Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename logback-classic to logback-core #51

Merged
merged 3 commits into from
Feb 24, 2025
Merged

rename logback-classic to logback-core #51

merged 3 commits into from
Feb 24, 2025

Conversation

lvjing2
Copy link
Contributor

@lvjing2 lvjing2 commented Feb 24, 2025

Summary by CodeRabbit

  • Refactor
    • Updated logging adapter configurations to transition from the classic version to the core version.
  • Tests
    • Adjusted test cases to verify the new logging adapter settings.
  • Chores
    • Updated project module declarations and applied minor formatting improvements.
  • Bug Fixes
    • Incremented version numbers in configuration files to reflect the latest updates.

@lvjing2 lvjing2 requested a review from gaosaroma February 24, 2025 03:38
Copy link
Contributor

coderabbitai bot commented Feb 24, 2025

Walkthrough

The changes update configuration and test files to transition from using Logback Classic to Logback Core. The adapter mappings in YAML files have been modified to update the artifactId values. Test cases in MatcherTest.java now reference the new Logback Core dependency, and corresponding module declarations in the root pom.xml have been updated. Minor formatting improvements (newline additions) were also applied to pom.xml files.

Changes

File(s) Change Summary
.../conf/adapter-mapping.yaml (1.1.6 & 1.4.12) Updated version from 1.2.4 to 1.2.7 and artifactId in both matcher and adapter sections from logback-classic to logback-core.
.../pom.xml (within 1.1.6 & 1.4.12) Modified <artifactId> from koupleless-adapter-logback-classic to koupleless-adapter-logback-core and appended a newline at the end of the file for consistent formatting.
.../MatcherTest.java (1.1.6 & 1.4.12) Modified parameters and assertions in mockArtifact calls to replace references from logback-classic with logback-core.
pom.xml (root) Removed module entries for koupleless-adapter-logback-classic and added entries for koupleless-adapter-logback-core for versions 1.1.6 and 1.4.12.
.../pom.xml (koupleless-adapter-logback) Updated dependency artifact ID from koupleless-adapter-logback-classic-1.1.6 to koupleless-adapter-logback-core-1.1.6.
.../pom.xml (koupleless-adapter-spring-boot-logback) Updated dependency artifact ID from koupleless-adapter-logback-classic-1.1.6 to koupleless-adapter-logback-core-1.1.6.

Possibly related PRs

  • Feat adaptor configs for logback #44: The changes in the main PR are related to the modifications of the artifactId for the matcher and adapter in the adapter-mapping.yaml, which aligns with the updates in the retrieved PR that also involve changes to the matcher configuration in a similar file.
  • fix: adaptor configs #36: The changes in the main PR are related to the updates of artifact IDs from logback-classic to logback-core, which is also reflected in the retrieved PR's modifications to the adapter-mapping.yaml and MatcherTest.java files.
  • Fix: adaptor configs #38: The changes in the main PR are related to the modifications in the adapter-mapping.yaml file, specifically updating the artifact IDs and version numbers for the Logback libraries, which aligns with the changes made in the retrieved PR that also involves the adapter-mapping.yaml for the Logback Classic library.

Suggested reviewers

  • gaosaroma

Poem

I’m the rabbit in the code, so fleet,
Hopping through mappings with a gentle beat.
Out with the classic, in with the core,
Each test and module now sings more.
With whiskers twitching at each new line,
I celebrate smooth changes—simply divine!
(=^・ω・^)=


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8c24a2f and 270d99d.

📒 Files selected for processing (3)
  • koupleless-adapter-logback-core-1.1.6/conf/adapter-mapping.yaml (1 hunks)
  • koupleless-adapter-logback-core-1.4.12/conf/adapter-mapping.yaml (1 hunks)
  • koupleless-adaptor-module-resource-load-spring-boot-2.7.14/conf/adapter-mapping.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • koupleless-adaptor-module-resource-load-spring-boot-2.7.14/conf/adapter-mapping.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • koupleless-adapter-logback-core-1.1.6/conf/adapter-mapping.yaml
  • koupleless-adapter-logback-core-1.4.12/conf/adapter-mapping.yaml
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: unit-test-for-springboot-samples
  • GitHub Check: unit-test-for-springboot3-samples
  • GitHub Check: unit-test-for-dubbo-samples
  • GitHub Check: unit-test-for-sofaboot-samples
  • GitHub Check: unit-test-for-multi-version-jdk
  • GitHub Check: unit-test-for-dubbo32-samples
  • GitHub Check: Analyze (java-kotlin)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@lvjing2 lvjing2 force-pushed the youji-dev branch 2 times, most recently from 4e4affb to a1e84e9 Compare February 24, 2025 03:45
Copy link
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.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently, please check "Code review limits" under "Moderation" settings.

Actionable comments posted: 1

🧹 Nitpick comments (5)
koupleless-adapter-logback-core-1.1.6/src/test/java/com/alipay/sofa/koupleless/base/build/plugin/MatcherTest.java (1)

39-48: Update test documentation to reflect logback-core.

The test documentation still references logback-classic and koupleless-adapter-logback-classic while the implementation has been updated to use core variants.

 * test for adaptor: koupleless-adapter-logback
 * pattern:
 *     matcher:
 *       groupId: ch.qos.logback
-*       artifactId: logback-classic
+*       artifactId: logback-core
 *       versionRange: "(,1.4.12)"
 *     adapter:
-*       artifactId: koupleless-adapter-logback-classic-1.1.6
+*       artifactId: koupleless-adapter-logback-core-1.1.6
 *       groupId: com.alipay.sofa.koupleless
koupleless-adapter-logback-core-1.4.12/src/test/java/com/alipay/sofa/koupleless/base/build/plugin/MatcherTest.java (1)

39-48: Update test documentation to reflect logback-core.

The test documentation still references logback-classic and koupleless-adapter-logback-classic while the implementation has been updated to use core variants.

 * test for adaptor: koupleless-adapter-logback
 * pattern:
 *     matcher:
 *       groupId: ch.qos.logback
-*       artifactId: logback-classic
+*       artifactId: logback-core
 *       versionRange: "[1.4.12,)"
 *     adapter:
-*       artifactId: koupleless-adapter-logback-classic-1.4.12
+*       artifactId: koupleless-adapter-logback-core-1.4.12
 *       groupId: com.alipay.sofa.koupleless
koupleless-adapter-logback-core-1.1.6/pom.xml (1)

13-13: ArtifactId Renaming and Consistency Check:
The artifactId has been updated to "6" as part of shifting from Logback Classic to Logback Core. This numeric identifier is unconventional and might not be self-descriptive. Please ensure this naming change is intentional, documented, and that all downstream processes or references are updated accordingly.

koupleless-adapter-logback-core-1.4.12/pom.xml (1)

13-13: ArtifactId Update for Logback Core Module:
Here the artifactId is now set to "12". As with the previous module, using a numeric identifier can be non-intuitive. Please confirm that this naming convention is part of the overall design and that proper documentation or mapping exists for these numbers across versions.

koupleless-adapter-spring-boot-logback-2.7.14/pom.xml (1)

25-26: Spring Boot Adapter Dependency Update:
The dependency artifactId in this Spring Boot module is now "6", which aligns it with the new Logback Core approach. Please ensure that this change integrates smoothly with the configured Spring Boot version and that it does not conflict with any other logging dependencies.

🛑 Comments failed to post (1)
pom.xml (1)

110-111: 🛠️ Refactor suggestion

Module Replacement Update:
The modules section now replaces the old Logback Classic modules with koupleless-adapter-logback-core-1.4.12 and koupleless-adapter-logback-core-1.1.6. Confirm that there are no residual references to the classic modules elsewhere and that these new modules integrate correctly in the build setup.

Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 4.87%. Comparing base (8c8b738) to head (270d99d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##              main     #51   +/-   ##
=======================================
  Coverage     4.87%   4.87%           
  Complexity       2       2           
=======================================
  Files            6       6           
  Lines           41      41           
  Branches         4       4           
=======================================
  Hits             2       2           
  Misses          39      39           

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

Copy link
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: 0

🧹 Nitpick comments (2)
koupleless-adapter-spring-boot-logback-2.7.14/pom.xml (1)

24-29: Dependency Update Verification

The dependency for the adapter has been correctly updated to use the new artifact ID "koupleless-adapter-logback-core-1.1.6" as required by the PR objective. Please verify that this change is consistently applied across the codebase and that any components relying on the previous adapter are updated accordingly.

Also, note that the dependency on Logback from the group "ch.qos.logback" (lines 38–44) still specifies "logback-classic". If the intent is to fully transition to Logback Core, you may need to update or document the rationale for retaining "logback-classic" here.

koupleless-adapter-logback/pom.xml (1)

29-33: Verify Logback Library Dependency
Although the PR title indicates a transition from Logback Classic to Logback Core, the dependency on ch.qos.logback:logback-classic remains unchanged here. Please confirm whether this dependency should also be updated to logback-core to fully align with the change. If an update is needed, consider applying the following diff:

-            <artifactId>logback-classic</artifactId>
+            <artifactId>logback-core</artifactId>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 24f8e59 and d2e44aa.

📒 Files selected for processing (6)
  • koupleless-adapter-logback-core-1.1.6/pom.xml (2 hunks)
  • koupleless-adapter-logback-core-1.1.6/src/test/java/com/alipay/sofa/koupleless/base/build/plugin/MatcherTest.java (1 hunks)
  • koupleless-adapter-logback-core-1.4.12/pom.xml (2 hunks)
  • koupleless-adapter-logback-core-1.4.12/src/test/java/com/alipay/sofa/koupleless/base/build/plugin/MatcherTest.java (1 hunks)
  • koupleless-adapter-logback/pom.xml (1 hunks)
  • koupleless-adapter-spring-boot-logback-2.7.14/pom.xml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • koupleless-adapter-logback-core-1.1.6/src/test/java/com/alipay/sofa/koupleless/base/build/plugin/MatcherTest.java
  • koupleless-adapter-logback-core-1.4.12/pom.xml
  • koupleless-adapter-logback-core-1.4.12/src/test/java/com/alipay/sofa/koupleless/base/build/plugin/MatcherTest.java
  • koupleless-adapter-logback-core-1.1.6/pom.xml
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: unit-test-for-springboot3-samples
  • GitHub Check: unit-test-for-springboot-samples
  • GitHub Check: unit-test-for-sofaboot-samples
  • GitHub Check: unit-test-for-dubbo-samples
  • GitHub Check: Analyze (java-kotlin)
  • GitHub Check: unit-test-for-dubbo32-samples
  • GitHub Check: unit-test-for-multi-version-jdk
🔇 Additional comments (1)
koupleless-adapter-logback/pom.xml (1)

22-27: Consistent Renaming of Adapter Artifact
The updated artifactId now reflects the new naming convention (koupleless-adapter-logback-core-1.1.6), which aligns with the PR objective. Please ensure that all references (such as in adapter-mapping files and documentation) are updated consistently across the project.

Copy link
Contributor

@gaosaroma gaosaroma left a comment

Choose a reason for hiding this comment

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

LGTM

@gaosaroma gaosaroma merged commit 6fa61e2 into main Feb 24, 2025
10 checks passed
@gaosaroma gaosaroma deleted the youji-dev branch February 24, 2025 11:55
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.

2 participants