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

feat: Deploy Node/Standalone Chrome browser version from v97 to v109 on top of Grid 4.28.1 #2626

Merged
merged 4 commits into from
Feb 1, 2025

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Feb 1, 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

Continue of #2620

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, Tests, Documentation


Description

  • Added support for building and deploying Node/Standalone Chrome images for versions 97 to 131 on Grid 4.28.1.

  • Enhanced CI workflows to handle multiple browser versions and automate changelog creation.

  • Updated Helm chart to support autoscaling with multiple Chrome browser versions.

  • Documented tagging conventions and added changelogs for Chrome versions 97 to 109.


Changes walkthrough 📝

Relevant files
Enhancement
3 files
bootstrap.sh
Added browser-specific argument to builder script invocation
+1/-1     
builder.py
Enhanced environment variable generation for specific browsers
+15/-11 
release-chrome-versions.yml
Updated workflow to support multiple browser versions and changelog PR
creation
+77/-9   
Documentation
13 files
chrome_100.md
Added changelog for Chrome version 100                                     
+19/-0   
chrome_101.md
Added changelog for Chrome version 101                                     
+19/-0   
chrome_102.md
Added changelog for Chrome version 102                                     
+19/-0   
chrome_103.md
Added changelog for Chrome version 103                                     
+19/-0   
chrome_104.md
Added changelog for Chrome version 104                                     
+19/-0   
chrome_105.md
Added changelog for Chrome version 105                                     
+19/-0   
chrome_106.md
Added changelog for Chrome version 106                                     
+19/-0   
chrome_107.md
Added changelog for Chrome version 107                                     
+19/-0   
chrome_108.md
Added changelog for Chrome version 108                                     
+19/-0   
chrome_109.md
Added changelog for Chrome version 109                                     
+19/-0   
chrome_97.md
Added changelog for Chrome version 97                                       
+19/-0   
chrome_98.md
Added changelog for Chrome version 98                                       
+19/-0   
chrome_99.md
Added changelog for Chrome version 99                                       
+19/-0   
Configuration changes
2 files
multiple-nodes-platform-version.yaml
Updated Helm chart for multiple Chrome browser versions   
+65/-0   
cdp-matrix.yml
Added Chrome versions 97 to 109 to CDP matrix                       
+30/-0   

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • VietND96 and others added 4 commits February 1, 2025 07:05
    Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
    …28.1 (#2623)
    
    Co-authored-by: Selenium CI Bot <selenium-ci@users.noreply.github.com>
    Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
    Copy link

    qodo-merge-pro bot commented Feb 1, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis 🔶

    2620 - Partially compliant

    Compliant requirements:

    • Create workflow to build/test/deploy Node/Standalone Chrome images with multiple versions
    • Add changelog files under CHANGELOG/4.28.1/chrome_.md
    • Update Helm chart values for testing autoscaling with multiple browser versions
    • Follow specified image tagging convention

    Non-compliant requirements:

    • Support Chrome versions 110-131 (PR implements versions 97-109 instead)

    Requires further human verification:

    • Verify that the build/test workflow works correctly for all Chrome versions
    • Validate that autoscaling works properly with multiple browser versions
    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Code Duplication

    The browser version handling logic could be refactored to reduce duplication in the version-specific file writing blocks

    if browser_name == "firefox" or browser_name == "all":
      FIREFOX_VERSION = matrix["CDP"][cdp_version]["FIREFOX_VERSION"]
      f.write(f"FIREFOX_VERSION={FIREFOX_VERSION}\n")
    if browser_name == "edge" or browser_name == "all":
      EDGE_VERSION = matrix["CDP"][cdp_version]["EDGE_VERSION"]
      f.write(f"EDGE_VERSION={EDGE_VERSION}\n")
    if browser_name == "chrome" or browser_name == "all":
      CHROME_VERSION = matrix["CDP"][cdp_version]["CHROME_VERSION"]
      f.write(f"CHROME_VERSION={CHROME_VERSION}")

    Copy link

    qodo-merge-pro bot commented Feb 1, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Add missing dictionary key validation

    Add error handling for cases where browser version keys don't exist in the matrix
    dictionary to prevent KeyError exceptions when accessing undefined browser versions

    tests/build-backward-compatible/builder.py [44-52]

     if browser_name == "firefox" or browser_name == "all":
    -  FIREFOX_VERSION = matrix["CDP"][cdp_version]["FIREFOX_VERSION"]
    -  f.write(f"FIREFOX_VERSION={FIREFOX_VERSION}\n")
    +  if "FIREFOX_VERSION" in matrix["CDP"][cdp_version]:
    +    FIREFOX_VERSION = matrix["CDP"][cdp_version]["FIREFOX_VERSION"]
    +    f.write(f"FIREFOX_VERSION={FIREFOX_VERSION}\n")
     if browser_name == "edge" or browser_name == "all":
    -  EDGE_VERSION = matrix["CDP"][cdp_version]["EDGE_VERSION"]
    -  f.write(f"EDGE_VERSION={EDGE_VERSION}\n")
    +  if "EDGE_VERSION" in matrix["CDP"][cdp_version]:
    +    EDGE_VERSION = matrix["CDP"][cdp_version]["EDGE_VERSION"]
    +    f.write(f"EDGE_VERSION={EDGE_VERSION}\n")
     if browser_name == "chrome" or browser_name == "all":
    -  CHROME_VERSION = matrix["CDP"][cdp_version]["CHROME_VERSION"]
    -  f.write(f"CHROME_VERSION={CHROME_VERSION}")
    +  if "CHROME_VERSION" in matrix["CDP"][cdp_version]:
    +    CHROME_VERSION = matrix["CDP"][cdp_version]["CHROME_VERSION"]
    +    f.write(f"CHROME_VERSION={CHROME_VERSION}")
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion adds important error handling to prevent KeyError exceptions when browser versions are not defined in the matrix, which is critical since the PR shows that some CDP versions only have Chrome versions defined.

    8

    @VietND96 VietND96 merged commit 7f75dd0 into trunk Feb 1, 2025
    27 checks passed
    @VietND96 VietND96 deleted the patch-changelog branch February 1, 2025 04:41
    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.

    2 participants