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

bump version to 2.4.0 #96

Merged
merged 2 commits into from
Jan 30, 2025
Merged

Conversation

nobodyiam
Copy link
Member

@nobodyiam nobodyiam commented Jan 30, 2025

What's the purpose of this PR

bump version to 2.4.0

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Read the Contributing Guide before making this pull request.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit tests to verify the code.
  • Run mvn clean test to make sure this pull request doesn't break anything.
  • Update the CHANGES log.

Summary by CodeRabbit

  • Chores
    • Updated project version from 2.4.0-SNAPSHOT to 2.4.0, marking the transition to a stable release version.
  • Tests
    • Added a tearDown() method to enhance test isolation by resetting the MockInjector after each test case in multiple test classes.

@nobodyiam nobodyiam added this to the 2.4.0 milestone Jan 30, 2025
Copy link
Contributor

coderabbitai bot commented Jan 30, 2025

Walkthrough

The pull request includes modifications to the project version in the pom.xml file, changing the <revision> property from a snapshot version (2.4.0-SNAPSHOT) to a stable release version (2.4.0). Additionally, new tearDown() methods have been added to multiple test classes, which are designed to reset the MockInjector after each test case, enhancing test isolation and lifecycle management.

Changes

File Change Summary
pom.xml Updated <revision> property from 2.4.0-SNAPSHOT to 2.4.0
apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/event/ApolloClientMonitorEventPublisherTest.java Added tearDown() method annotated with @After for test cleanup
apollo-client/src/test/java/com/ctrip/framework/apollo/internals/ConfigMonitorInitializerTest.java Added tearDown() method annotated with @After for test cleanup
apollo-client/src/test/java/com/ctrip/framework/apollo/internals/K8sConfigMapConfigRepositoryTest.java Added tearDown() method annotated with @After for test cleanup
apollo-client/src/test/java/com/ctrip/framework/apollo/kubernetes/KubernetesManagerTest.java Added tearDown() method annotated with @After for test cleanup
apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/DefaultConfigMonitorTest.java Added tearDown() method annotated with @After for test cleanup
apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/exporter/DefaultApolloClientMetricsExporterFactoryTest.java Added tearDown() method annotated with @After for test cleanup

Possibly related PRs

Poem

🐰 Version bump, oh what a hop!
From snapshot to release, we never stop
Two-point-four is here to shine
Our code's maturity now divine
A rabbit's release, clean and bright 🚀

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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.

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
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7560f5b and ac92ca0.

📒 Files selected for processing (1)
  • apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/event/ApolloClientMonitorEventPublisherTest.java (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (8)
🔇 Additional comments (1)
apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/event/ApolloClientMonitorEventPublisherTest.java (1)

25-25: LGTM!

The import for @After annotation is correctly placed with other JUnit imports.

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 (1)
apollo-client/src/test/java/com/ctrip/framework/apollo/kubernetes/KubernetesManagerTest.java (1)

70-71: Consider standardizing test documentation language.

The test methods use Chinese comments for documentation. For consistency with the codebase and better international collaboration, consider translating these to English.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ac92ca0 and 8172f7d.

📒 Files selected for processing (6)
  • apollo-client/src/test/java/com/ctrip/framework/apollo/internals/ConfigMonitorInitializerTest.java (2 hunks)
  • apollo-client/src/test/java/com/ctrip/framework/apollo/internals/K8sConfigMapConfigRepositoryTest.java (2 hunks)
  • apollo-client/src/test/java/com/ctrip/framework/apollo/kubernetes/KubernetesManagerTest.java (2 hunks)
  • apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/DefaultConfigMonitorTest.java (2 hunks)
  • apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/event/ApolloClientMonitorEventPublisherTest.java (2 hunks)
  • apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/exporter/DefaultApolloClientMetricsExporterFactoryTest.java (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/event/ApolloClientMonitorEventPublisherTest.java
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (8)
🔇 Additional comments (8)
apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/exporter/DefaultApolloClientMetricsExporterFactoryTest.java (1)

52-55: LGTM! Good test hygiene.

The addition of the tearDown method follows JUnit best practices by properly cleaning up the MockInjector after each test, preventing test pollution.

apollo-client/src/test/java/com/ctrip/framework/apollo/internals/ConfigMonitorInitializerTest.java (1)

53-56: LGTM! Consistent test cleanup.

The tearDown method implementation matches the pattern used across the test suite, ensuring proper cleanup of mock instances.

apollo-client/src/test/java/com/ctrip/framework/apollo/monitor/internal/DefaultConfigMonitorTest.java (2)

63-65: LGTM! Consistent test cleanup.

The tearDown method follows the established pattern for proper test isolation.


61-61: Good catch! Fixed the missing brace.

Added the missing closing brace in the setUp method.

apollo-client/src/test/java/com/ctrip/framework/apollo/internals/K8sConfigMapConfigRepositoryTest.java (2)

85-88: LGTM! Essential cleanup for Kubernetes-related mocks.

The addition of the tearDown method is particularly important here as it ensures proper cleanup of Kubernetes-related mock instances, preventing any potential interference between tests involving ConfigMap operations.


Line range hint 1-1: Verify version bump changes.

While these test improvements are valuable, I don't see the actual version bump changes in the provided files. Please ensure that the version is properly updated in the relevant configuration files (e.g., pom.xml).

✅ Verification successful

Version bump from 2.3.0 to 2.4.0 is properly implemented

The version bump is correctly reflected in:

  • pom.xml: <revision>2.4.0</revision>
  • CHANGES.md: Documents the new version Apollo Java 2.4.0
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for version-related changes in pom.xml files
echo "Searching for version changes in pom.xml files..."
rg -A 1 "<revision>" --type xml

Length of output: 226


Script:

#!/bin/bash
# Check git diff for version changes and previous version
echo "Checking version changes in PR..."
git diff origin/master...HEAD -- '*pom.xml'

echo -e "\nChecking previous version..."
git show origin/master:pom.xml | rg "<revision>"

Length of output: 333


Script:

#!/bin/bash
# Search for version-related information in various files
echo "Searching for CHANGELOG files..."
fd -i changelog

echo -e "\nSearching for version numbers and related discussions..."
rg -i "2\.4\.0|version bump|upgrade to" --type md --type txt

echo -e "\nSearching for version patterns in documentation..."
rg -i "version" -A 2 -B 2 --type md --type txt

Length of output: 956

apollo-client/src/test/java/com/ctrip/framework/apollo/kubernetes/KubernetesManagerTest.java (2)

26-26: LGTM!

The import statement for org.junit.After is correctly placed with other JUnit imports.


64-67: LGTM! Good test hygiene practice.

The tearDown method properly resets the MockInjector after each test, preventing test state pollution. This aligns with similar changes across other test classes in this PR.

@nobodyiam nobodyiam merged commit 7ef0be0 into apolloconfig:main Jan 30, 2025
8 checks passed
@nobodyiam nobodyiam deleted the 2.4.0-release branch January 30, 2025 03:37
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2025
@nobodyiam nobodyiam restored the 2.4.0-release branch January 30, 2025 04:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant