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 Firefox browser version from v98 to v134 #2632

Merged
merged 5 commits into from
Feb 3, 2025

Conversation

VietND96
Copy link
Member

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

Deploy images of Node/Standalone Firefox with latest Grid 4.28.1 and browser versions in range [98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134]

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, Configuration changes


Description

  • Added support for deploying Firefox versions 98 to 134 in Selenium Grid.

  • Enhanced workflows with retry mechanisms and environment variable handling.

  • Updated Dockerfile and scripts for improved Firefox version handling.

  • Added detailed changelogs for Firefox versions 98 to 134.


Changes walkthrough 📝

Relevant files
Enhancement
3 files
get_lang_package.sh
Improved error handling for Firefox language pack downloads.
+4/-0     
builder.py
Added default platform handling for Firefox builds.           
+2/-0     
Dockerfile
Improved Firefox installation logic with fallback mechanisms.
+6/-2     
Tests
2 files
bootstrap.sh
Enhanced build process with error handling and retries.   
+19/-4   
__init__.py
Updated test URLs and selectors for video playback.           
+2/-2     
Configuration changes
6 files
update_tag_in_docs_and_files.sh
Updated script to exclude specific files during tag updates.
+1/-1     
release-chrome-versions.yml
Added retry mechanism for Chrome version workflows.           
+9/-3     
release-edge-versions.yml
Added retry mechanism for Edge version workflows.               
+9/-3     
release-firefox-versions.yml
Enhanced Firefox workflows with retries and environment variable
handling.
+10/-4   
Makefile
Enhanced Firefox language pack test logic.                             
+1/-1     
multiple-nodes-platform-version.yaml
Added detailed configurations for Firefox versions 98 to 134.
+241/-11
Documentation
11 files
firefox_100.md
Added changelog for Firefox version 100.                                 
+19/-0   
firefox_101.md
Added changelog for Firefox version 101.                                 
+19/-0   
firefox_102.md
Added changelog for Firefox version 102.                                 
+19/-0   
firefox_103.md
Added changelog for Firefox version 103.                                 
+19/-0   
firefox_104.md
Added changelog for Firefox version 104.                                 
+19/-0   
firefox_105.md
Added changelog for Firefox version 105.                                 
+19/-0   
firefox_106.md
Added changelog for Firefox version 106.                                 
+19/-0   
firefox_107.md
Added changelog for Firefox version 107.                                 
+19/-0   
firefox_108.md
Added changelog for Firefox version 108.                                 
+19/-0   
firefox_109.md
Added changelog for Firefox version 109.                                 
+19/-0   
firefox_110.md
Added changelog for Firefox version 110.                                 
+19/-0   
Additional files
26 files
firefox_111.md +19/-0   
firefox_112.md +19/-0   
firefox_113.md +19/-0   
firefox_114.md +19/-0   
firefox_115.md +19/-0   
firefox_116.md +19/-0   
firefox_117.md +19/-0   
firefox_118.md +19/-0   
firefox_119.md +19/-0   
firefox_120.md +19/-0   
firefox_121.md +19/-0   
firefox_122.md +19/-0   
firefox_123.md +19/-0   
firefox_124.md +19/-0   
firefox_125.md +19/-0   
firefox_126.md +19/-0   
firefox_127.md +19/-0   
firefox_128.md +19/-0   
firefox_129.md +19/-0   
firefox_130.md +19/-0   
firefox_131.md +19/-0   
firefox_132.md +19/-0   
firefox_133.md +19/-0   
firefox_134.md +19/-0   
firefox_98.md +19/-0   
firefox_99.md +19/-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 5 commits February 3, 2025 05:55
    Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
    ….28.1 (#2631)
    
    Co-authored-by: Selenium CI Bot <selenium-ci@users.noreply.github.com>
    Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
    Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
    Copy link

    qodo-merge-pro bot commented Feb 3, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

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

    Error Handling

    The script should validate that the Firefox version exists and is valid before attempting to download language packs. Currently it only checks if the URL returns 404 but doesn't handle other potential errors.

    if [ "404" = "$(curl -s -o /dev/null -w "%{http_code}" ${BASE_URL})" ]; then
      VERSION="$(curl -sk https://product-details.mozilla.org/1.0/firefox_versions.json | jq -r '.LATEST_FIREFOX_VERSION')"
      BASE_URL="https://ftp.mozilla.org/pub/firefox/releases/$VERSION/linux-x86_64/xpi/"
    fi
    Test Reliability

    The video playback test now uses a different URL (googleads.github.io) which may be less reliable than the previous docs.flowplayer.com URL. Should verify the new test endpoint is stable and consistently available.

    driver.get('https://googleads.github.io/googleads-ima-html5/vsi/')
    wait = WebDriverWait(driver, WEB_DRIVER_WAIT_TIMEOUT)
    play_button = wait.until(
        EC.element_to_be_clickable((By.ID, 'play-button'))

    Copy link

    qodo-merge-pro bot commented Feb 3, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Add error handling for downloads

    Add error handling for the second curl request in case the fallback version also
    fails to download.

    NodeFirefox/get_lang_package.sh [16-19]

     if [ "404" = "$(curl -s -o /dev/null -w "%{http_code}" ${BASE_URL})" ]; then
       VERSION="$(curl -sk https://product-details.mozilla.org/1.0/firefox_versions.json | jq -r '.LATEST_FIREFOX_VERSION')"
       BASE_URL="https://ftp.mozilla.org/pub/firefox/releases/$VERSION/linux-x86_64/xpi/"
    +  if [ "404" = "$(curl -s -o /dev/null -w "%{http_code}" ${BASE_URL})" ]; then
    +    echo "Error: Failed to download language package for both specified and latest Firefox versions"
    +    exit 1
    +  fi
     fi
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion adds critical error handling for the fallback download attempt, preventing silent failures and providing clear error messages when both download attempts fail.

    8
    Add error handling for API call

    Add error handling for curl command failure when fetching Firefox version. The
    current implementation assumes the curl command will always succeed.

    Makefile [667]

    -FIREFOX_VERSION=$(or $(FIREFOX_VERSION), $$(curl -sk https://product-details.mozilla.org/1.0/firefox_versions.json | jq -r '.LATEST_FIREFOX_VERSION')) ; \
    +FIREFOX_VERSION=$(or $(FIREFOX_VERSION), $$(curl -sk https://product-details.mozilla.org/1.0/firefox_versions.json | jq -r '.LATEST_FIREFOX_VERSION' || echo "Failed to fetch Firefox version")) ; \
    +if [ "$$FIREFOX_VERSION" = "Failed to fetch Firefox version" ]; then exit 1; fi ; \
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion adds critical error handling for the curl command that fetches Firefox version, preventing silent failures that could cause downstream issues in the build process.

    8
    General
    Improve error message clarity

    The error message "Error building Node image" is misleading since it's used for
    all browser types (Firefox, Edge, Chrome). Use a more specific error message
    that includes the browser type.

    tests/build-backward-compatible/bootstrap.sh [35-38]

     if [ $? -ne 0 ]; then
    -  echo "Error building Node image"
    +  echo "Error building ${BROWSER_NAME} Node image"
       exit 1
     fi
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: The suggestion improves error message clarity by including the browser type in the error output, making it easier to identify which browser build failed.

    5

    @VietND96 VietND96 merged commit c30ae19 into trunk Feb 3, 2025
    25 of 26 checks passed
    @VietND96 VietND96 deleted the deploy-firefox branch February 3, 2025 01:45
    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