Skip to content

Docker: Resolve default event bus port 4442 and 4443 in env var #2688

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

Merged
merged 1 commit into from
Mar 2, 2025

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Mar 2, 2025

User description

Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it

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

Description

In part of #2662
SE_EVENT_BUS_PUBLISH_PORT="4442"
SE_EVENT_BUS_SUBSCRIBE_PORT="4443"
these 2 env vars were added to Dockerfile instruction as default. So, command docker run or docker compose file no need to specify anymore if the default is being used.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

enhancement, documentation


Description

  • Removed explicit event bus port environment variables from Docker Compose files.

  • Simplified Docker Compose configurations by relying on default values.

  • Updated documentation to reflect the removal of explicit port settings.

  • Improved maintainability by reducing redundancy in environment variables.


Changes walkthrough 📝

Relevant files
Documentation
1 files
README.md
Removed explicit event bus port settings from examples.   
+4/-71   
Enhancement
12 files
docker-compose-v3-basicauth.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3-beta-channel.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3-dev-channel.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3-dev.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3-dynamic-grid.yml
Removed explicit event bus port environment variables.     
+0/-3     
docker-compose-v3-tracing.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3-video-in-node.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3-video-upload-dynamic-grid.yml
Removed explicit event bus port environment variables.     
+0/-3     
docker-compose-v3-video-upload-standalone.yml
Removed explicit event bus port environment variables.     
+0/-1     
docker-compose-v3-video-upload.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3-video.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3.yml
Removed explicit event bus port environment variables.     
+0/-7     
Tests
5 files
docker-compose-v3-test-node-docker.yaml
Removed explicit event bus port environment variables.     
+0/-3     
docker-compose-v3-test-parallel.yml
Removed explicit event bus port environment variables.     
+0/-7     
docker-compose-v3-test-standalone-docker.yaml
Removed explicit event bus port environment variables.     
+0/-1     
docker-compose-v3-test-standalone.yml
Removed explicit event bus port environment variables.     
+0/-1     
docker-compose-v3-test-video.yml
Removed explicit event bus port environment variables.     
+0/-3     

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    qodo-merge-pro bot commented Mar 2, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Configuration Change

    Removing default event bus port environment variables could affect existing deployments that rely on these explicit port configurations. Validate that removing these variables doesn't break compatibility with existing setups.

    image: selenium/node-chrome:4.29.0-20250222
    shm_size: 2gb
    depends_on:
      - selenium-hub
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub

    Copy link

    qodo-merge-pro bot commented Mar 2, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Document default port values

    The PR removes the event bus port environment variables without documenting the
    default values. Add a comment explaining that ports 4442 and 4443 are used by
    default for event bus publish/subscribe.

    README.md [397-400]

    +# Hub uses default ports 4442/4443 for event bus publish/subscribe
     $ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.29.0-20250222
     $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \
         --shm-size="2g" \
         selenium/node-chrome:4.29.0-20250222
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    __

    Why: The suggestion improves documentation clarity by explicitly stating the default event bus ports that were previously specified but are now implicit. This helps users understand the networking setup better.

    Medium
    • Update

    @VietND96 VietND96 force-pushed the default-event-port branch from d9eef1c to b681221 Compare March 2, 2025 14:05
    Copy link

    qodo-merge-pro bot commented Mar 2, 2025

    CI Feedback 🧐

    (Feedback updated until commit 872efb7)

    A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

    Action: Rerun workflow when failure

    Failed stage: Authenticate GitHub CLI for PR [❌]

    Failure summary:

    The action failed because the GitHub authentication token (GH_CLI_TOKEN_PR) lacks the required
    'read:org' permission scope. The GitHub CLI (gh) command attempted to authenticate using the
    provided token but failed due to insufficient permissions.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    28:  SecurityEvents: write
    29:  Statuses: write
    30:  ##[endgroup]
    31:  Secret source: Actions
    32:  Prepare workflow directory
    33:  Prepare all required actions
    34:  Getting action download info
    35:  Download action repository 'actions/checkout@main' (SHA:85e6279cec87321a52edac9c87bce653a07cf6c2)
    36:  Complete job name: Rerun workflow when failure
    ...
    
    48:  show-progress: true
    49:  lfs: false
    50:  submodules: false
    51:  set-safe-directory: true
    52:  env:
    53:  GH_CLI_TOKEN: ***
    54:  GH_CLI_TOKEN_PR: ***
    55:  RUN_ID: 13616594494
    56:  RERUN_FAILED_ONLY: true
    ...
    
    119:  ##[group]Run sudo apt update
    120:  �[36;1msudo apt update�[0m
    121:  �[36;1msudo apt install gh�[0m
    122:  shell: /usr/bin/bash -e {0}
    123:  env:
    124:  GH_CLI_TOKEN: ***
    125:  GH_CLI_TOKEN_PR: ***
    126:  RUN_ID: 13616594494
    127:  RERUN_FAILED_ONLY: true
    ...
    
    176:  0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
    177:  ##[group]Run echo "$GH_CLI_TOKEN_PR" | gh auth login --with-token
    178:  �[36;1mecho "$GH_CLI_TOKEN_PR" | gh auth login --with-token�[0m
    179:  shell: /usr/bin/bash -e {0}
    180:  env:
    181:  GH_CLI_TOKEN: ***
    182:  GH_CLI_TOKEN_PR: ***
    183:  RUN_ID: 13616594494
    184:  RERUN_FAILED_ONLY: true
    185:  RUN_ATTEMPT: 1
    186:  ##[endgroup]
    187:  error validating token: missing required scope 'read:org'
    188:  ##[error]Process completed with exit code 1.
    

    @VietND96 VietND96 force-pushed the default-event-port branch from b681221 to 872efb7 Compare March 2, 2025 14:59
    @VietND96 VietND96 merged commit 714678d into trunk Mar 2, 2025
    23 of 27 checks passed
    @VietND96 VietND96 deleted the default-event-port branch March 2, 2025 19:09
    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