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

Remove lookout #1447

Merged
merged 3 commits into from
Oct 8, 2024
Merged

Remove lookout #1447

merged 3 commits into from
Oct 8, 2024

Conversation

EvenLjj
Copy link
Collaborator

@EvenLjj EvenLjj commented Sep 20, 2024

Remove lookout

Summary by CodeRabbit

  • New Features

    • Removed dependencies related to the Lookout metrics library, streamlining the project.
    • Updated the Hessian library version for improved performance.
    • Updated the version of the Sofa Registry library for enhanced functionality.
  • Bug Fixes

    • Deprecated the LOOKOUT_COLLECT_DISABLE constant to prevent its usage in new code.
  • Documentation

    • Updated project configuration to reflect the removal of the Lookout library and its associated components.
  • Chores

    • Cleaned up unused files and tests related to the Lookout metrics framework to enhance maintainability.

Copy link
Contributor

coderabbitai bot commented Sep 20, 2024

Walkthrough

The changes involve the removal of dependencies related to the Lookout metrics library from various Maven POM files, including all/pom.xml and bom/pom.xml. The hessian.version has been updated from 3.5.4 to 3.5.5. Additionally, several Java classes and test files associated with the Lookout metrics functionality have been deleted, indicating a significant reduction in the project's reliance on the Lookout metrics framework.

Changes

File Path Change Summary
all/pom.xml Removed dependencies: sofa-rpc-metrics-lookout, lookout-api; updated hessian.version to 3.5.5.
bom/pom.xml Removed dependencies: lookout-api, lookout-core; updated hessian.version to 3.5.5.
core/api/src/main/java/com/alipay/sofa/rpc/common/RpcOptions.java Marked LOOKOUT_COLLECT_DISABLE as deprecated.
metrics/metrics-lookout/pom.xml Deleted file.
metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/event/LookoutSubscriber.java Deleted file.
metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/* Deleted multiple classes: RpcAbstractLookoutModel, RpcClientLookoutModel, RpcLookout, RpcLookoutId, RpcServerLookoutModel.
metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/module/LookoutModule.java Deleted file.
metrics/metrics-lookout/src/main/resources/META-INF/services/sofa-rpc/com.alipay.sofa.rpc.module.Module Deleted file.
metrics/metrics-lookout/src/test/java/com/alipay/sofa/rpc/module/* Deleted multiple test classes: ConsumerSubTest, LookoutModuleTest, ProviderPubTest.
metrics/pom.xml Removed module: metrics-lookout.
registry/registry-sofa/pom.xml Removed dependency: lookout-api.
test/test-integration/pom.xml Removed dependencies: sofa-rpc-metrics-lookout, lookout-core.
test/test-integration/src/test/java/com/alipay/sofa/rpc/metrics/lookout/* Deleted multiple classes: LookoutService, LookoutServiceImpl, RpcLookoutTest, RestLookoutTest.

Possibly related PRs

Suggested labels

size/XS

Suggested reviewers

  • Lo1nt
  • chuailiwu

Poem

🐰 In the meadow where rabbits play,
Dependencies hopped away today.
With Lookout gone, the code feels light,
A brighter path, oh what a sight!
Hession's version, now up we cheer,
A cleaner code, let's all draw near! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9055a20 and 4e5f2f5.

📒 Files selected for processing (2)
  • all/pom.xml (1 hunks)
  • bom/pom.xml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • all/pom.xml
  • bom/pom.xml

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 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
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)
bom/pom.xml (1)

Remove remaining lookout references from the codebase

The removal of the lookout library dependencies from pom.xml is incomplete. Several files still contain references to lookout, which may lead to compilation errors, runtime issues, or confusion for developers. Please address the following:

  • Remove lookout imports and usages from:
    • tracer/tracer-opentracing-resteasy/src/main/java/com/alipay/sofa/rpc/server/rest/LookoutRequestFilter.java
    • remoting/remoting-resteasy/src/main/java/com/alipay/sofa/rpc/server/rest/SofaRestRequestHandler.java
  • Delete or refactor the following lookout-related files:
    • remoting/remoting-resteasy/src/main/java/com/alipay/sofa/rpc/lookout/RestLookoutAdapter.java
    • remoting/remoting-resteasy/src/main/java/com/alipay/sofa/rpc/lookout/RestConstants.java
  • Update core/api/src/main/java/com/alipay/sofa/rpc/common/RpcOptions.java to remove the LOOKOUT_COLLECT_DISABLE option.
  • Remove or update the lookout-related log code in core/api/src/main/resources/sofa-rpc/logcodes-common_en.properties.

Ensure that all lookout-related functionality is properly removed or replaced to maintain the consistency and stability of the codebase.

Analysis chain

Line range hint 1-1: Verify the impact of removing the lookout library dependencies.

The dependency declarations for lookout-api and lookout-core have been completely removed, which aligns with the PR objective to remove the "lookout" component from the project.

Please ensure that the removal of the lookout library dependencies doesn't break any existing functionality or cause runtime exceptions in the codebase.

Run the following script to search for potential lookout library usage in the codebase:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for potential `lookout` library usage in the codebase.

# Test: Search for `lookout` package imports. Expect: No results.
rg --type java 'import com\.alipay\.lookout\.'

# Test: Search for `lookout` class references. Expect: No results.
rg --type java -w 'lookout'

Length of output: 1049

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d5b8c50 and 9055a20.

Files selected for processing (22)
  • all/pom.xml (1 hunks)
  • bom/pom.xml (1 hunks)
  • core/api/src/main/java/com/alipay/sofa/rpc/common/RpcOptions.java (1 hunks)
  • metrics/metrics-lookout/pom.xml (0 hunks)
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/event/LookoutSubscriber.java (0 hunks)
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcAbstractLookoutModel.java (0 hunks)
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcClientLookoutModel.java (0 hunks)
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcLookout.java (0 hunks)
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcLookoutId.java (0 hunks)
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcServerLookoutModel.java (0 hunks)
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/module/LookoutModule.java (0 hunks)
  • metrics/metrics-lookout/src/main/resources/META-INF/services/sofa-rpc/com.alipay.sofa.rpc.module.Module (0 hunks)
  • metrics/metrics-lookout/src/test/java/com/alipay/sofa/rpc/module/ConsumerSubTest.java (0 hunks)
  • metrics/metrics-lookout/src/test/java/com/alipay/sofa/rpc/module/LookoutModuleTest.java (0 hunks)
  • metrics/metrics-lookout/src/test/java/com/alipay/sofa/rpc/module/ProviderPubTest.java (0 hunks)
  • metrics/pom.xml (0 hunks)
  • registry/registry-sofa/pom.xml (0 hunks)
  • test/test-integration/pom.xml (0 hunks)
  • test/test-integration/src/test/java/com/alipay/sofa/rpc/metrics/lookout/LookoutService.java (0 hunks)
  • test/test-integration/src/test/java/com/alipay/sofa/rpc/metrics/lookout/LookoutServiceImpl.java (0 hunks)
  • test/test-integration/src/test/java/com/alipay/sofa/rpc/metrics/lookout/RpcLookoutTest.java (0 hunks)
  • test/test-integration/src/test/java/com/alipay/sofa/rpc/server/rest/RestLookoutTest.java (0 hunks)
Files not reviewed due to no reviewable changes (19)
  • metrics/metrics-lookout/pom.xml
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/event/LookoutSubscriber.java
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcAbstractLookoutModel.java
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcClientLookoutModel.java
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcLookout.java
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcLookoutId.java
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcServerLookoutModel.java
  • metrics/metrics-lookout/src/main/java/com/alipay/sofa/rpc/module/LookoutModule.java
  • metrics/metrics-lookout/src/main/resources/META-INF/services/sofa-rpc/com.alipay.sofa.rpc.module.Module
  • metrics/metrics-lookout/src/test/java/com/alipay/sofa/rpc/module/ConsumerSubTest.java
  • metrics/metrics-lookout/src/test/java/com/alipay/sofa/rpc/module/LookoutModuleTest.java
  • metrics/metrics-lookout/src/test/java/com/alipay/sofa/rpc/module/ProviderPubTest.java
  • metrics/pom.xml
  • registry/registry-sofa/pom.xml
  • test/test-integration/pom.xml
  • test/test-integration/src/test/java/com/alipay/sofa/rpc/metrics/lookout/LookoutService.java
  • test/test-integration/src/test/java/com/alipay/sofa/rpc/metrics/lookout/LookoutServiceImpl.java
  • test/test-integration/src/test/java/com/alipay/sofa/rpc/metrics/lookout/RpcLookoutTest.java
  • test/test-integration/src/test/java/com/alipay/sofa/rpc/server/rest/RestLookoutTest.java
Additional comments not posted (3)
core/api/src/main/java/com/alipay/sofa/rpc/common/RpcOptions.java (1)

532-532: Deprecation of LOOKOUT_COLLECT_DISABLE constant is appropriate.

Marking the LOOKOUT_COLLECT_DISABLE constant as deprecated aligns with the objective of removing the Lookout metrics library. This communicates that the constant should not be used in new code.

Please ensure that any existing code referencing this constant is updated to remove its usage.

bom/pom.xml (1)

35-35: LGTM!

The hessian.version property has been updated from 3.5.4 to 3.5.5, which is a minor version bump. This should be a safe update that includes bug fixes and improvements while maintaining backward compatibility.

all/pom.xml (1)

62-62: Verify compatibility of the hessian version update.

The hessian.version has been updated from 3.5.4 to 3.5.5. This appears to be a minor version update, but it's important to ensure compatibility with the rest of the project.

Please run the following script to search for any usage of the hessian library in the codebase and verify that the version update doesn't introduce any issues:

Also, ensure that all tests pass successfully after updating the version.

Verification successful

Hessian version update approved, but careful testing is crucial.

The update of the hessian library from version 3.5.4 to 3.5.5 is a minor version change that likely includes bug fixes and improvements. Given the extensive use of Hessian throughout the project, including custom implementations and extensions, this update is approved but with the following important considerations:

  1. Conduct thorough testing across all components that use Hessian serialization to ensure compatibility with the new version.
  2. Pay special attention to the sofa-rpc-codec-sofa-hessian module and any custom Hessian serialization implementations.
  3. Verify that both Hessian and Hessian2 serialization protocols continue to function correctly.
  4. Review the security implications mentioned in SECURITY.md, ensuring that existing security measures (such as blacklisting) remain effective with the new version.
  5. Update any version-specific documentation or comments in the code to reflect the new Hessian version.

After implementing the update, please run a comprehensive test suite and monitor for any unexpected behavior in production environments.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for usage of the `hessian` library in the codebase.

# Test: Search for import statements of the `hessian` library.
rg --type java 'import com\.alipay\.sofa\.hessian\.'

Length of output: 54


Script:

#!/bin/bash
# Description: Perform a broader search for `hessian` usage in the codebase

# Search for 'hessian' in all files
echo "Searching for 'hessian' in all files:"
rg -i 'hessian' --type-add 'xml:*.xml' --type-add 'properties:*.properties'

# Search for 'hessian' dependency in pom.xml files
echo -e "\nSearching for 'hessian' dependency in pom.xml files:"
rg -i '<artifactId>hessian</artifactId>' --type xml

# List all pom.xml files that contain 'hessian'
echo -e "\nListing pom.xml files containing 'hessian':"
rg -i 'hessian' --type xml --files-with-matches

Length of output: 71050

@EvenLjj EvenLjj merged commit 29999af into sofastack:master Oct 8, 2024
4 checks passed
Jiiiiiin added a commit to Jiiiiiin/sofa-boot that referenced this pull request Oct 19, 2024
fix 针对 上游 sofa-rpc-all 清理 Lookout sofastack/sofa-rpc#1447 修复类缺失问题
Jiiiiiin added a commit to Jiiiiiin/sofa-boot that referenced this pull request Oct 19, 2024
fix 针对 上游 sofa-rpc-all 清理 Lookout sofastack/sofa-rpc#1447 修复类缺失问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants