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

Update endpoint URLs point to Router in distributed mode #1974

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Sep 26, 2024

User description

Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.

Description

In distributed mode, Router should route request to the corresponding component. So endpoint URLs update to Router URL only.

Motivation and Context

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

documentation


Description

  • Updated documentation to change endpoint URLs from Distributor to Router in distributed mode across multiple languages.
  • Adjusted port numbers in cURL commands to reflect the Router server address.
  • Ensured consistency in documentation for distributed mode configurations.

Changes walkthrough 📝

Relevant files
Documentation
endpoints.en.md
Update endpoint URLs to Router in distributed mode             

website_and_docs/content/documentation/grid/advanced_features/endpoints.en.md

  • Updated URL references from Distributor to Router in distributed mode.
  • Changed port numbers for Router server address.
  • Modified cURL commands to reflect new Router URL.
  • +11/-11 
    endpoints.ja.md
    Update endpoint URLs to Router in distributed mode (Japanese)

    website_and_docs/content/documentation/grid/advanced_features/endpoints.ja.md

  • Updated URL references from Distributor to Router in distributed mode.
  • Changed port numbers for Router server address.
  • Modified cURL commands to reflect new Router URL.
  • +7/-7     
    endpoints.pt-br.md
    Update endpoint URLs to Router in distributed mode (Portuguese)

    website_and_docs/content/documentation/grid/advanced_features/endpoints.pt-br.md

  • Updated URL references from Distributor to Router in distributed mode.
  • Changed port numbers for Router server address.
  • Modified cURL commands to reflect new Router URL.
  • +9/-9     
    endpoints.zh-cn.md
    Update endpoint URLs to Router in distributed mode (Chinese)

    website_and_docs/content/documentation/grid/advanced_features/endpoints.zh-cn.md

  • Updated URL references from Distributor to Router in distributed mode.
  • Changed port numbers for Router server address.
  • Modified cURL commands to reflect new Router URL.
  • +7/-7     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    netlify bot commented Sep 26, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit a3024b7

    @codiumai-pr-agent-pro codiumai-pr-agent-pro bot added the documentation Improvements or additions to documentation label Sep 26, 2024
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Inconsistent URL
    The URL for the Router is inconsistent. Some instances use 'http://localhost:4444' while others use ''.

    Incorrect Header
    The header 'X-REGISTRATION-SECRET;' is used without a value, which may be incorrect. It should probably be 'X-REGISTRATION-SECRET:' or have a value.

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Add a note explaining the Router's role in forwarding requests to the Distributor

    Consider adding a note explaining that while the Router is now the entry point, it
    internally forwards requests to the Distributor, maintaining backwards compatibility
    with existing API paths.

    website_and_docs/content/documentation/grid/advanced_features/endpoints.en.md [63]

     cURL --request DELETE 'http://<Router-URL>/se/grid/distributor/node/<node-id>' --header 'X-REGISTRATION-SECRET;'
    +```
     
    +Note: The Router internally forwards requests to the Distributor, maintaining compatibility with existing API paths.
    +
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: This suggestion adds valuable information about the internal workings of the Router, enhancing the documentation's clarity and helping maintain backward compatibility awareness. It addresses a significant aspect of the system's operation.

    8
    Clarify the Router's role as the central point in the fully distributed mode

    Consider updating the explanation to clarify that the Router is now the central
    point of contact in the fully distributed mode, replacing the Distributor's role in
    handling requests.

    website_and_docs/content/documentation/grid/advanced_features/endpoints.en.md [57-59]

    -In the fully distributed mode, the URL is the Router server address. 
    +In the fully distributed mode, the URL is the Router server address, which acts as the central point for all Grid operations. 
     ```shell
     cURL --request DELETE 'http://localhost:4444/se/grid/distributor/node/<node-id>' --header 'X-REGISTRATION-SECRET: <secret>'
    
    - [ ] **Apply this suggestion** <!-- /improve --apply_suggestion=1 -->
    
    <details><summary>Suggestion importance[1-10]: 7</summary>
    
    Why: The suggestion provides additional clarity on the Router's role, which can help users understand the system architecture better. However, it is not a critical change, hence a moderate score.
    
    
    </details></details></td><td align=center>7
    
    </td></tr></tr></tbody></table>
    
    >💡 Need additional feedback ? start a [PR chat](https://chromewebstore.google.com/detail/ephlnjeghhogofkifjloamocljapahnl)
    
    

    Copy link
    Member

    @harsha509 harsha509 left a comment

    Choose a reason for hiding this comment

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

    Thank you @VietND96 !

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    documentation Improvements or additions to documentation Review effort [1-5]: 2
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants