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 usage instructions for multiple appid in the Apollo client #5295

Merged

Conversation

TerryLam2010
Copy link
Contributor

@TerryLam2010 TerryLam2010 commented Dec 12, 2024

What's the purpose of this PR

Add usage instructions for multiple appid in the Apollo client

Which issue(s) this PR fixes:

Fixes #

Brief changelog

update docs for java client

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

  • New Features

    • Enhanced documentation for Apollo client configuration and usage.
    • Added support for multiple AppIds and namespaces.
    • Introduced new configuration options and methods for AppId and Apollo Meta Server.
    • Expanded sections on caching paths and environment configurations.
    • New annotations for easier Spring integration and configuration management.
    • Added instructions for using the Apollo mock server for unit testing.
  • Bug Fixes

    • Clarified Java and Guava version requirements.
  • Documentation

    • Significant updates to both English and Chinese user guides, including clearer instructions and additional examples.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 12, 2024
Copy link
Contributor

coderabbitai bot commented Dec 12, 2024

Walkthrough

The pull request includes substantial updates to the java-sdk-user-guide.md documentation for the Apollo client, enhancing clarity and detail on configuration and usage. Key areas of improvement include specifications for reading configurations corresponding to multiple app IDs and namespaces, expanded mandatory settings, and new configuration options. The document now provides comprehensive guidance on local cache paths, optional settings, and integration with Spring, including support for multiple AppIds and namespaces. Additionally, new methods and annotations have been introduced to facilitate better configuration management and event listening in Spring.

Changes

File Path Change Summary
docs/en/client/java-sdk-user-guide.md Updates include new features and clarifications on Apollo client configuration, support for multiple app IDs, and enhanced instructions for mandatory and optional settings. New methods and annotations added.
docs/zh/client/java-sdk-user-guide.md Similar updates as the English version, focusing on Apollo client configuration, support for multiple AppIds and namespaces, and enhanced Spring integration, with new methods and annotations introduced.

Possibly related PRs

Suggested labels

size:XS

Suggested reviewers

  • nobodyiam

🐰 In the garden where changes bloom,
The Apollo guide dispels the gloom.
With clearer paths and methods new,
Configuration made easy for you!
Spring integration, oh what a delight,
Hop along, developers, and code with might! 🌼

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. This feature will be included in our Pro Plan when released.


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.

@nobodyiam nobodyiam force-pushed the 20241207-multiple-appid-docs branch from 9932bc4 to fedb5ad Compare December 14, 2024 06:17
Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 14, 2024
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 (2)
docs/zh/client/java-sdk-user-guide.md (1)

733-742: Consider adding more details about key collision handling.

While the implementation is correct, it would be helpful to expand the comment about key precedence when using multiple AppIDs to include:

  • Examples of key collision scenarios
  • How the priority is determined when the same key exists in multiple AppIDs
docs/en/client/java-sdk-user-guide.md (1)

763-774: Consider enhancing the documentation around key precedence.

While the implementation is correct, the comment about key precedence could be expanded to include:

  • Specific examples showing key collision scenarios
  • A detailed explanation of how priority is determined when identical keys exist across multiple AppIDs
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fedb5ad and 45bb064.

📒 Files selected for processing (2)
  • docs/en/client/java-sdk-user-guide.md (2 hunks)
  • docs/zh/client/java-sdk-user-guide.md (2 hunks)
🔇 Additional comments (2)
docs/zh/client/java-sdk-user-guide.md (1)

586-595: LGTM! Clear documentation for the new multi-AppID API feature.

The code example clearly demonstrates how to retrieve configurations from different AppIDs and their namespaces.

docs/en/client/java-sdk-user-guide.md (1)

614-623: LGTM! Clear documentation for the new multi-AppID API feature.

The code example effectively demonstrates the usage of the new multi-AppID configuration retrieval functionality.

@nobodyiam nobodyiam merged commit 0c7c341 into apolloconfig:master Dec 14, 2024
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants