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

fix ReactiveWebServerFactoryAutoConfiguration not support sprintboot 1.x #927

Merged
merged 1 commit into from
May 11, 2024

Conversation

lvjing2
Copy link
Collaborator

@lvjing2 lvjing2 commented May 11, 2024

fix koupleless/koupleless#229

Summary by CodeRabbit

  • Refactor
    • Improved the configuration order for reactive web server setups in the app, enhancing compatibility and startup performance.

@sofastack-cla sofastack-cla bot added bug Something isn't working cla:yes size/XS labels May 11, 2024
Copy link
Contributor

coderabbitai bot commented May 11, 2024

Walkthrough

The modification involves changes in the auto-configuration order for a Spring Boot application, specifically for reactive web server setups. The update removes a direct import and alters the @AutoConfigureBefore annotation to reference the ReactiveWebServerFactoryAutoConfiguration class by its full name, enhancing compatibility or addressing classpath issues.

Changes

File Path Change Summary
.../ark-springboot-starter/.../ArkReactiveAutoConfiguration.java Removed import of ReactiveWebServerFactoryAutoConfiguration; Updated @AutoConfigureBefore to use full class name.

🌟✨
Oh, dear code, you morph and flow,
Like rivers wide, in sun's soft glow.
A tweak here, a twist there,
Ensuring all is swift and fair.
Hop, hop, hop, on digital toes,
Through lines and loops, the rabbit goes! 🐇💻
✨🌟


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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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 May 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.49%. Comparing base (1bf4217) to head (84456a6).
Report is 14 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #927      +/-   ##
============================================
- Coverage     78.70%   78.49%   -0.22%     
- Complexity      836      849      +13     
============================================
  Files           164      167       +3     
  Lines          6796     6869      +73     
  Branches       1009     1016       +7     
============================================
+ Hits           5349     5392      +43     
- Misses          923      951      +28     
- Partials        524      526       +2     

☔ 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

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 07009d7 and 84456a6.
Files selected for processing (1)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/ArkReactiveAutoConfiguration.java (2 hunks)
Additional comments not posted (2)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/main/java/com/alipay/sofa/ark/springboot/ArkReactiveAutoConfiguration.java (2)

39-39: Update to @AutoConfigureBefore to use fully qualified class name.

This change ensures compatibility with Spring Boot 1.x by avoiding direct import of ReactiveWebServerFactoryAutoConfiguration, which may not exist in earlier versions. Good use of the fully qualified name to maintain backward compatibility.


Line range hint 48-57: Ensure proper resource management in nettyReactiveWebServerFactory.

The method nettyReactiveWebServerFactory configures a NettyReactiveWebServerFactory with custom routes and server customizers. It's crucial to verify that the resources (like ReactorResourceFactory) are properly managed and released, especially when setUseGlobalResources(false) is used.

@lvjing2 lvjing2 merged commit 41d3cda into master May 11, 2024
6 of 7 checks passed
@lvjing2 lvjing2 deleted the youji-dev branch May 11, 2024 08:51
lvjing2 added a commit that referenced this pull request May 27, 2024
lvjing2 added a commit that referenced this pull request May 27, 2024
* 优化排包配置 (#918)

* 优化显示

* fix as bizStateRecords

* 更新显示

* 优化自动排包配置

* 更新排包描述

---------

Co-authored-by: leo james <leojames.googol@gmail.com>
(cherry picked from commit 5a13e01)

* runtime中静态合并部署时多模块并行执行createTempDir时异常 (#911)

Co-authored-by: jiyunfei <jiyunfei@come-future.com>
Co-authored-by: leo james <leojames.googol@gmail.com>
(cherry picked from commit 67a0bdf)

* add string contains (#926)

(cherry picked from commit 07009d7)

* fix ReactiveWebServerFactoryAutoConfiguration not support sprintboot 1.x (#927)

(cherry picked from commit 41d3cda)

* add biz jar url in biz module (#928)

(cherry picked from commit e1f5872)

* update netty version (#931)

* update netty version

* fix version netty

---------

Co-authored-by: tangjiafu <tangjiafu@kuaishou.com>
Co-authored-by: leojames <leojames.googol@gmail.com>

(cherry picked from commit fb233cf)

* update version to 3.0.6-SNAPSHOT

---------

Co-authored-by: Lipeng <44571204+gaosaroma@users.noreply.github.com>
Co-authored-by: FFF <31267018+1034323716@users.noreply.github.com>
Co-authored-by: Laglangyue <35491928+laglangyue@users.noreply.github.com>
lvjing2 added a commit that referenced this pull request May 27, 2024
lvjing2 added a commit that referenced this pull request May 28, 2024
* 优化排包配置 (#918)

* 优化显示

* fix as bizStateRecords

* 更新显示

* 优化自动排包配置

* 更新排包描述

---------

Co-authored-by: leo james <leojames.googol@gmail.com>
(cherry picked from commit 5a13e01)

* runtime中静态合并部署时多模块并行执行createTempDir时异常 (#911)

Co-authored-by: jiyunfei <jiyunfei@come-future.com>
Co-authored-by: leo james <leojames.googol@gmail.com>
(cherry picked from commit 67a0bdf)

* add string contains (#926)

(cherry picked from commit 07009d7)

* fix ReactiveWebServerFactoryAutoConfiguration not support sprintboot 1.x (#927)

(cherry picked from commit 41d3cda)

* add biz jar url in biz module (#928)

(cherry picked from commit e1f5872)

* update netty version (#931)

* update netty version

* fix version netty

---------

Co-authored-by: tangjiafu <tangjiafu@kuaishou.com>
Co-authored-by: leojames <leojames.googol@gmail.com>

(cherry picked from commit fb233cf)

* update version to 3.1.4-SNAPSHOT

* fix multi ark boot runner test

---------

Co-authored-by: Lipeng <44571204+gaosaroma@users.noreply.github.com>
Co-authored-by: FFF <31267018+1034323716@users.noreply.github.com>
Co-authored-by: Laglangyue <35491928+laglangyue@users.noreply.github.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 cla:yes size/XS
Projects
None yet
1 participant