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

add biz jar url in biz module #928

Merged
merged 1 commit into from
May 17, 2024
Merged

add biz jar url in biz module #928

merged 1 commit into from
May 17, 2024

Conversation

lvjing2
Copy link
Collaborator

@lvjing2 lvjing2 commented May 17, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new business URL field in the application, allowing retrieval and setting of the business URL.
  • Improvements

    • Enhanced the BizModel class to include the business URL in its string representation for better debugging and logging.
  • Testing

    • Updated test annotations to use ArkBootEmbedRunner for improved test execution.

Copy link
Contributor

coderabbitai bot commented May 17, 2024

Walkthrough

The recent changes enhance the BizModel class by introducing a new bizUrl field for storing business URLs. Methods to manage this field have been added, and the toString() method now includes it. The BizFactoryServiceImpl sets the bizUrl when creating Biz objects. Additionally, the BizInfo interface now provides a method to retrieve the URL, and a test annotation update is made in MultiArkBootRunnerTest.

Changes

File Path Change Summary
.../BizModel.java Added bizUrl field, setBizUrl(URL url), getBizUrl(), and updated toString().
.../BizFactoryServiceImpl.java Modified createBiz method to include .setBizUrl(bizArchive.getUrl()).
.../BizInfo.java Added URL getBizUrl() method to BizInfo interface.
.../MultiArkBootRunnerTest.java Updated @RunWith annotation to ArkBootEmbedRunner.

In code's embrace, the URL's grace,
Now stored in BizModel's space.
Methods to set, methods to get,
Ensuring all is correctly met.
Tests now run with new delight,
As we embark on this coding flight. 🚀


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 17, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 78.56%. Comparing base (1bf4217) to head (cb40193).
Report is 15 commits behind head on master.

Files Patch % Lines
.../com/alipay/sofa/ark/container/model/BizModel.java 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #928      +/-   ##
============================================
- Coverage     78.70%   78.56%   -0.14%     
- Complexity      836      850      +14     
============================================
  Files           164      167       +3     
  Lines          6796     6873      +77     
  Branches       1009     1016       +7     
============================================
+ Hits           5349     5400      +51     
- Misses          923      946      +23     
- Partials        524      527       +3     

☔ 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 41d3cda and 992c91a.
Files selected for processing (4)
  • sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/model/BizModel.java (5 hunks)
  • sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/service/biz/BizFactoryServiceImpl.java (1 hunks)
  • sofa-ark-parent/core/spi/src/main/java/com/alipay/sofa/ark/spi/model/BizInfo.java (1 hunks)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/test/MultiArkBootRunnerTest.java (2 hunks)
Files skipped from review due to trivial changes (1)
  • sofa-ark-parent/core/spi/src/main/java/com/alipay/sofa/ark/spi/model/BizInfo.java
Additional comments not posted (3)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/test/MultiArkBootRunnerTest.java (1)

32-32: Update to ArkBootEmbedRunner approved. Ensure compatibility with existing tests.

sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/service/biz/BizFactoryServiceImpl.java (1)

92-92: Addition of setBizUrl in createBiz method approved. Verify correct URL setting across archive types.

Verification successful

The verification process did not reveal any direct error handling or logging mechanisms related to bizUrl. The setBizUrl method is used correctly in the BizFactoryServiceImpl class and is defined in the BizModel class. The usage of bizUrl in test cases and constants does not indicate any issues.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that `setBizUrl` correctly sets URLs across different archive types.

# Test: Search for incorrect URL settings in logs. Expect: No errors related to URLs.
rg --type java $'setBizUrl' --exec grep 'Error'

Length of output: 453



Script:

#!/bin/bash
# Description: Verify that `setBizUrl` correctly sets URLs across different archive types.

# Search for occurrences of `setBizUrl` in the codebase and inspect the context for error handling or logging.
rg --type java 'setBizUrl' -A 5 -B 5

Length of output: 3466



Script:

#!/bin/bash
# Description: Verify that `setBizUrl` correctly sets URLs and check for any error handling or logging related to `bizUrl`.

# Search for occurrences of `bizUrl` in the codebase and inspect the context for error handling or logging.
rg --type java 'bizUrl' -A 5 -B 5

Length of output: 45342

sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/model/BizModel.java (1)

80-80: Addition of bizUrl field and related methods in BizModel approved. Verify correct usage of bizUrl in the application.

Also applies to: 143-148, 246-248

Verification successful

The bizUrl field is used in the following main files:

  • sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/model/BizModel.java
  • sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/service/biz/BizCommandProvider.java

Let's review the usage in these files to ensure it is correct.

BizModel.java

  • The bizUrl field is declared.
  • It is set using this.bizUrl = url;.
  • It is returned using return bizUrl;.
  • It is included in the toString method.

BizCommandProvider.java

  • The bizUrl is mentioned in a command description string.

Based on the review, the usage of bizUrl in the main files appears to be correct and consistent with the intended functionality.

Conclusion

The addition of the bizUrl field and its usage in the application is correct.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that `bizUrl` is being used correctly in the application.

# Test: Search for incorrect usage of `bizUrl`. Expect: No errors related to `bizUrl`.
rg --type java $'bizUrl' --exec grep 'Error'

Length of output: 450



Script:

#!/bin/bash
# Description: Verify that `bizUrl` is being used correctly in the application.

# Test: Search for the usage of `bizUrl` in the codebase.
rg --type java 'bizUrl'

Length of output: 6778

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: 1

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 992c91a and cb40193.
Files selected for processing (4)
  • sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/model/BizModel.java (4 hunks)
  • sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/service/biz/BizFactoryServiceImpl.java (1 hunks)
  • sofa-ark-parent/core/spi/src/main/java/com/alipay/sofa/ark/spi/model/BizInfo.java (1 hunks)
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/test/MultiArkBootRunnerTest.java (2 hunks)
Files skipped from review as they are similar to previous changes (3)
  • sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/service/biz/BizFactoryServiceImpl.java
  • sofa-ark-parent/core/spi/src/main/java/com/alipay/sofa/ark/spi/model/BizInfo.java
  • sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/test/MultiArkBootRunnerTest.java
Additional Context Used
GitHub Check Runs (1)
codecov/patch success (1)

sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/model/BizModel.java: [warning] 247-247: sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/model/BizModel.java#L247
Added line #L247 was not covered by tests

Additional comments not posted (3)
sofa-ark-parent/core-impl/container/src/main/java/com/alipay/sofa/ark/container/model/BizModel.java (3)

80-81: Added a new field bizUrl to store the business URL.


143-146: Added a setter method setBizUrl for the bizUrl field. This method follows the fluent interface pattern, allowing method chaining which is consistent with other setter methods in this class.


427-429: Updated the toString method to include the bizUrl field. This change ensures that the business URL is part of the object's string representation, which can be useful for logging and debugging purposes.

Comment on lines +245 to +248
@Override
public URL getBizUrl() {
return bizUrl;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

  • No test cases found for the getBizUrl method.

There are no test cases covering the getBizUrl method in the codebase. It is recommended to add unit tests to ensure this method's functionality is verified.

Analysis chain

Added a getter method getBizUrl for the bizUrl field. This method is necessary for accessing the bizUrl outside of this class.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the new getter method `getBizUrl` is covered by unit tests.

# Test: Search for the test coverage of `getBizUrl`. Expect: At least one test case covering this method.
rg --type java $'public void testGetBizUrl\(\)'

Length of output: 48



Script:

#!/bin/bash
# Description: Search for references to the `getBizUrl` method in the test files to check for indirect test coverage.

# Test: Search for any references to `getBizUrl` in the test files.
rg --type java 'getBizUrl'

Length of output: 258

@lvjing2 lvjing2 merged commit e1f5872 into master May 17, 2024
6 of 7 checks passed
@lvjing2 lvjing2 deleted the youji-dev branch May 17, 2024 06:50
lvjing2 added a commit that referenced this pull request May 27, 2024
(cherry picked from commit e1f5872)
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
(cherry picked from commit e1f5872)
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant