Skip to content

Breaking changes: Node/Standalone Docker config path change to /opt/selenium/docker.toml #2754

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
Apr 7, 2025

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Apr 6, 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

Fixes #2738

This breaking change is due to the assumption that users are using Dynamic Grid (Node/Standalone Docker), which enables the share volume mount configuration between Node Docker and node browser containers by default.
To avoid conflict with the config file in node browser containers, and not require users walk through README to see the context, set extra env variables to change config path, etc.
Set the default from the beginning for users to follow, this is a special case for Dynamic Grid only.

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

  • Changed Docker configuration path to /opt/selenium/docker.toml.

  • Updated environment variable SE_NODE_DOCKER_CONFIG_FILENAME for dynamic grid.

  • Enhanced documentation to reflect new configuration path and usage.

  • Updated Docker Compose files to use the new configuration path.


Changes walkthrough 📝

Relevant files
Enhancement
2 files
Dockerfile
Update Dockerfile to use new config path and environment variable
+3/-2     
config.toml
Add shared host configuration keys for node-docker and browser
containers
+2/-0     
Documentation
1 files
README.md
Update documentation to reflect new config path and usage
+11/-8   
Configuration changes
2 files
docker-compose-v3-dynamic-grid.yml
Update Docker Compose file with new config path                   
+1/-1     
docker-compose-v3-video-upload-dynamic-grid.yml
Update video upload Docker Compose with new config path   
+1/-1     
Tests
2 files
docker-compose-v3-test-node-docker.yaml
Remove redundant environment variable and update test config
+0/-1     
docker-compose-v3-test-standalone-docker.yaml
Update standalone Docker test config with new path             
+1/-1     

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 Apr 6, 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

    Environment Variable Removal

    The PR removes the environment variable 'SE_NODE_DOCKER_CONFIG_FILENAME=docker.toml' from the test configuration, but adds it as a default in the Dockerfile. Verify this doesn't cause issues in test environments.

    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_NODE_ENABLE_MANAGED_DOWNLOADS=${SELENIUM_ENABLE_MANAGED_DOWNLOADS}
      - SE_OPTS=--enable-managed-downloads ${SELENIUM_ENABLE_MANAGED_DOWNLOADS}
      - SE_BROWSER_ARGS_DISABLE_DSHM=--disable-dev-shm-usage
    New Configuration

    The PR adds a new host-config-keys configuration that wasn't present before. Ensure this change is intentional and properly documented for users who will need to update their configuration files.

    # Share configs of volumes, DNS, extra hosts between node-docker and node browser containers
    host-config-keys = ["Dns", "DnsOptions", "DnsSearch", "ExtraHosts", "Binds"]

    Copy link

    qodo-merge-pro bot commented Apr 6, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Copy link

    qodo-merge-pro bot commented Apr 6, 2025

    CI Feedback 🧐

    (Feedback updated until commit 8d69804)

    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 CLI authentication token (GH_CLI_TOKEN_PR) is missing the
    required scope 'read:org'. When the workflow attempted to authenticate with GitHub using gh auth
    login --with-token, it failed with the error: "error validating token: missing required scope
    'read:org'" (line 186).

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    22:  Issues: write
    23:  Metadata: read
    24:  Models: read
    25:  Packages: write
    26:  Pages: write
    27:  PullRequests: write
    28:  RepositoryProjects: write
    29:  SecurityEvents: write
    30:  Statuses: write
    31:  ##[endgroup]
    32:  Secret source: Actions
    33:  Prepare workflow directory
    34:  Prepare all required actions
    35:  Getting action download info
    36:  Download action repository 'actions/checkout@main' (SHA:85e6279cec87321a52edac9c87bce653a07cf6c2)
    37:  Complete job name: Rerun workflow when failure
    38:  ##[group]Run actions/checkout@main
    ...
    
    42:  ssh-strict: true
    43:  ssh-user: git
    44:  persist-credentials: true
    45:  clean: true
    46:  sparse-checkout-cone-mode: true
    47:  fetch-depth: 1
    48:  fetch-tags: false
    49:  show-progress: true
    50:  lfs: false
    51:  submodules: false
    52:  set-safe-directory: true
    53:  env:
    54:  GH_CLI_TOKEN: ***
    55:  GH_CLI_TOKEN_PR: ***
    56:  RUN_ID: 14299718204
    57:  RERUN_FAILED_ONLY: true
    58:  RUN_ATTEMPT: 1
    ...
    
    113:  Or undo this operation with:
    114:  git switch -
    115:  Turn off this advice by setting config variable advice.detachedHead to false
    116:  HEAD is now at 0c6543a Merge 8d698040d8fd3f62ce43d5cb1c32bbccd4f76a91 into b1ceb7c0cf799450fb837cb5fe8c227e857ad65d
    117:  ##[endgroup]
    118:  [command]/usr/bin/git log -1 --format=%H
    119:  0c6543ae2cbf1765aa274ada28ecc74550e6c0f0
    120:  ##[group]Run sudo apt update
    121:  �[36;1msudo apt update�[0m
    122:  �[36;1msudo apt install gh�[0m
    123:  shell: /usr/bin/bash -e {0}
    124:  env:
    125:  GH_CLI_TOKEN: ***
    126:  GH_CLI_TOKEN_PR: ***
    127:  RUN_ID: 14299718204
    128:  RERUN_FAILED_ONLY: true
    129:  RUN_ATTEMPT: 1
    ...
    
    168:  Reading state information...
    169:  118 packages can be upgraded. Run 'apt list --upgradable' to see them.
    170:  WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
    171:  Reading package lists...
    172:  Building dependency tree...
    173:  Reading state information...
    174:  gh is already the newest version (2.69.0).
    175:  0 upgraded, 0 newly installed, 0 to remove and 118 not upgraded.
    176:  ##[group]Run echo "$GH_CLI_TOKEN_PR" | gh auth login --with-token
    177:  �[36;1mecho "$GH_CLI_TOKEN_PR" | gh auth login --with-token�[0m
    178:  shell: /usr/bin/bash -e {0}
    179:  env:
    180:  GH_CLI_TOKEN: ***
    181:  GH_CLI_TOKEN_PR: ***
    182:  RUN_ID: 14299718204
    183:  RERUN_FAILED_ONLY: true
    184:  RUN_ATTEMPT: 1
    185:  ##[endgroup]
    186:  error validating token: missing required scope 'read:org'
    187:  ##[error]Process completed with exit code 1.
    188:  Post job cleanup.
    

    …selenium/docker.toml`
    
    Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
    @VietND96 VietND96 force-pushed the node-docker-config branch from 8e3b6a6 to 8d69804 Compare April 7, 2025 02:47
    @VietND96 VietND96 merged commit 15eb64a into trunk Apr 7, 2025
    24 of 28 checks passed
    @VietND96 VietND96 deleted the node-docker-config branch April 7, 2025 04:05
    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.

    [🐛 Bug]: Grid can't create a session in Dynamic mode
    1 participant