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

update to 2.2.14 #1006

Merged
merged 2 commits into from
Sep 13, 2024
Merged

update to 2.2.14 #1006

merged 2 commits into from
Sep 13, 2024

Conversation

lvjing2
Copy link
Collaborator

@lvjing2 lvjing2 commented Sep 11, 2024

Motivation

Explain the context, and why you're making that change.
To make others understand what is the problem you're trying to solve.

Modification

Describe the idea and modifications you've done.

Result

Resolved or fixed #.

If there is no issue then describe the changes introduced by this PR.

Summary by CodeRabbit

  • New Features

    • Transitioned to a stable release version 2.2.14, indicating that new features and fixes are now ready for production use.
    • Enhanced test setup for the ArkTomcatServletWebServerFactory, ensuring a clean state for tests.
    • Added logging for improved observability in the web server retrieval process.
    • Renamed the test class for clarity, indicating its compatibility with Spring Boot 1.
  • Bug Fixes

    • Simplified test logic by removing unnecessary dependencies related to the RegistryService, enhancing test reliability.
  • Chores

    • Removed outdated and placeholder test classes to streamline the testing framework.

Copy link
Contributor

coderabbitai bot commented Sep 11, 2024

Walkthrough

The pull request updates the sofa.ark.version property in the pom.xml file from 2.2.14-SNAPSHOT to 2.2.14, marking a transition from a development snapshot to a stable release version. It simplifies the test logic in ArkTomcatServletWebServerFactoryTest.java by removing unnecessary dependencies related to the RegistryService. Additionally, it introduces logging enhancements in ArkTomcatServletWebServerFactory.java and removes several outdated test classes that are no longer needed. A new test class is introduced for Spring Boot 1, reflecting the project's adaptation to different Spring Boot versions.

Changes

File Change Summary
pom.xml Updated <sofa.ark.version> from 2.2.14-SNAPSHOT to 2.2.14
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java Enhanced setUp method and simplified testGetWebServerWithEmbeddedServerServiceNull test logic.
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactory.java Added logging statement in getWebServer method.
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/test/ArkBootRunnerTest.java Removed ArkBootRunnerTest.java, which tested ArkBootEmbedRunner.
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/test/ArkBootTestNGTest.java Removed ArkBootTestNGTest.java, a placeholder for TestNG tests.
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/test/MultiArkBootRunnerTest.java Removed MultiArkBootRunnerTest.java, which tested Ark Boot integration.
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/test/SpringbootRunnerTest.java Removed SpringbootRunnerTest.java, which validated Spring Boot application functionality.
sofa-ark-parent/support/ark-springboot-integration/ark-compatible-springboot1/src/test/java/com/alipay/sofa/ark/springboot1/web/Springboot1ArkTomcatServletWebServerFactoryTest.java Renamed ArkTomcatServletWebServerFactoryTest to Springboot1ArkTomcatServletWebServerFactoryTest for clarity.

Possibly related PRs

  • update to 2.2.11 #930: Updates the sofa.ark.version property from 2.2.11-SNAPSHOT to 2.2.11, which is directly related to the versioning changes in the main PR.
  • update to 2.2.13-SNAPSHOT #980: Updates the sofa.ark.version from 2.2.12 to 2.2.13-SNAPSHOT, indicating a similar versioning change process as seen in the main PR.
  • update to 2.2.13 #989: Updates the sofa.ark.version from 2.2.13-SNAPSHOT to 2.2.13, indicating a similar transition to a stable release version.
  • update to 2.2.14-SNAPSHOT #1002: Updates the sofa.ark.version from 2.2.13 to 2.2.14-SNAPSHOT, which is relevant to the versioning context of the main PR.
  • update to 2.2.14 #1003: Updates the sofa.ark.version from 2.2.14-SNAPSHOT to 2.2.14, reflecting a similar transition to a stable release version.

Suggested labels

size/XS

🐰 In the meadow, the version's set,
From snapshot dreams, we now beget.
A stable path, we hop along,
With every fix, we grow more strong.
So here’s to 2.2.14, our cheer,
A joyful leap, the release is near! 🌼✨

Tip

OpenAI O1 model for chat
  • We have deployed OpenAI's latest O1 model for chat.
  • OpenAI claims that this model has superior reasoning capabilities than their GPT-4o model.
  • Please share any feedback with us in the discussions post.

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between da02a9e and 470fa41.

Files selected for processing (2)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactory.java (1 hunks)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java (2 hunks)
Files skipped from review due to trivial changes (1)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactory.java
Files skipped from review as they are similar to previous changes (1)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 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.

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.34%. Comparing base (aafbe4c) to head (470fa41).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1006      +/-   ##
============================================
+ Coverage     78.14%   78.34%   +0.19%     
- Complexity      872      873       +1     
============================================
  Files           170      170              
  Lines          7033     7033              
  Branches       1037     1037              
============================================
+ Hits           5496     5510      +14     
+ Misses         1005      992      -13     
+ Partials        532      531       -1     

☔ 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

Outside diff range and nitpick comments (1)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatTest.java (1)

43-47: Test method implementation looks good, but consider renaming the test method.

The test method is correctly asserting the expected behavior of the getWebServer method. However, the test method name could be more descriptive to indicate the expected behavior being tested.

Consider renaming the test method to something like testGetWebServerReturnsInstanceOfTomcatWebServer to better describe the expected behavior being tested.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8adac82 and 1ac9ba9.

Files selected for processing (2)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java.bak (1 hunks)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatTest.java (1 hunks)
Additional comments not posted (2)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatTest.java (1)

27-47: LGTM!

The test class is well-structured and follows the standard test class conventions. The setup and teardown methods are correctly implemented to save and restore the context class loader.

sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java.bak (1)

63-64: LGTM!

The simplification of the testGetWebServerWithEmbeddedServerServiceNull test method by removing the complex logic related to RegistryService and EmbeddedServerService is a good change. The test now directly asserts the class type of the web server returned by arkTomcatServletWebServerFactory, which is a more straightforward approach. This change improves the readability and maintainability of the test without affecting its functionality.

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

Outside diff range and nitpick comments (1)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java (1)

58-67: Approved with a suggestion.

The changes in the setUp method help ensure a clean state for the tests by initializing the ArkServiceContainer, clearing its injector bindings, and setting the ArkClient's injection service to null. This is a valid approach to isolate the test environment.

However, using reflection to access private fields and modify the state of the ArkServiceContainer and ArkClient classes directly can make the tests fragile and dependent on the internal implementation details of these classes.

Consider exploring a more robust approach to manage the state of the ArkServiceContainer and ArkClient classes during testing, if possible. This could involve providing public APIs or test helpers to reset the state of these classes without relying on reflection.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b411f18 and 671d8b8.

Files selected for processing (1)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java (3 hunks)
Additional comments not posted (3)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java (3)

50-50: LGTM!

The @TestNGOnArkEmbeded annotation is correctly added to configure the test class to run on an embedded Ark container.


78-79: LGTM!

The simplification of the testGetWebServerWithEmbeddedServerServiceNull test method improves the clarity and maintainability of the test code. By removing the complex logic to manage a ServiceReference for EmbeddedServerService and directly asserting the expected web server class, the test becomes more focused and reduces potential side effects from service management.

The changes enhance the effectiveness of the test in verifying the functionality of the ArkTomcatServletWebServerFactory.


21-26: LGTM!

The newly added imports for ArkServiceContainer, ArkServiceContainerHolder, TestNGOnArkEmbeded, and Injector classes are necessary to support the changes made in the setUp method and the addition of the @TestNGOnArkEmbeded annotation to the test class.

The imports are valid and correctly added.

@lvjing2 lvjing2 force-pushed the youji-dev branch 7 times, most recently from bc2d2e2 to da02a9e Compare September 13, 2024 05:01
@lvjing2 lvjing2 merged commit 9b66342 into master Sep 13, 2024
7 checks passed
@lvjing2 lvjing2 deleted the youji-dev branch September 13, 2024 06:27
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.

1 participant