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 Google Chrome #5651

Closed
3 of 10 tasks
malesci opened this issue May 31, 2022 · 6 comments
Closed
3 of 10 tasks

Update Google Chrome #5651

malesci opened this issue May 31, 2022 · 6 comments
Labels
awaiting-deployment Code complete; awaiting deployment and/or deployment in progress feature request OS: Ubuntu

Comments

@malesci
Copy link

malesci commented May 31, 2022

Tool name

Google Chrome

Tool license

Proprietary freeware, based on open source components.

Add or update?

  • Add
  • Update

Desired version

Chrome version 102

Approximate size

No response

Brief description of tool

No response

URL for tool's homepage

No response

Provide a basic test case to validate the tool's functionality.

No response

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Can this tool be installed during the build?

No response

Tool installation time in runtime

No response

Are you willing to submit a PR?

No response

@al-cheb al-cheb added awaiting-deployment Code complete; awaiting deployment and/or deployment in progress OS: Ubuntu and removed needs triage labels May 31, 2022
@al-cheb
Copy link
Contributor

al-cheb commented May 31, 2022

@malesci, the new image rollout is in progress, we are planning to finish it by Friday.

@malesci
Copy link
Author

malesci commented May 31, 2022

@malesci, the new image rollout is in progress, we are planning to finish it by Friday.

Thanks for update. Waiting for the rollout finish, is it possible in the use the the runner with the updated chrome in meanwhile?
Basically I would like to set a run-on specific version from GitHub actions.

@al-cheb
Copy link
Contributor

al-cheb commented May 31, 2022

@malesci, the new image rollout is in progress, we are planning to finish it by Friday.

Thanks for update. Waiting for the rollout finish, is it possible in the use the the runner with the updated chrome in meanwhile? Basically I would like to set a run-on specific version from GitHub actions.

You can't specify runner version.

@miketimofeev
Copy link
Contributor

miketimofeev commented May 31, 2022

@malesci you can install the latest version of chrome and chromedriver in runtime to not wait for the deployment to finish

download_with_retries() {
# Due to restrictions of bash functions, positional arguments are used here.
# In case if you using latest argument NAME, you should also set value to all previous parameters.
# Example: download_with_retries $ANDROID_SDK_URL "." "android_sdk.zip"
    local URL="$1"
    local DEST="${2:-.}"
    local NAME="${3:-${URL##*/}}"
    local COMPRESSED="$4"

    if [[ $COMPRESSED == "compressed" ]]; then
        local COMMAND="curl $URL -4 -sL --compressed -o '$DEST/$NAME' -w '%{http_code}'"
    else
        local COMMAND="curl $URL -4 -sL -o '$DEST/$NAME' -w '%{http_code}'"
    fi

    echo "Downloading '$URL' to '${DEST}/${NAME}'..."
    retries=20
    interval=30
    while [ $retries -gt 0 ]; do
        ((retries--))
        # Temporary disable exit on error to retry on non-zero exit code
        set +e
        http_code=$(eval $COMMAND)
        exit_code=$?
        if [ $http_code -eq 200 ] && [ $exit_code -eq 0 ]; then
            echo "Download completed"
            return 0
        else
            echo "Error — Either HTTP response code for '$URL' is wrong - '$http_code' or exit code is not 0 - '$exit_code'. Waiting $interval seconds before the next attempt, $retries attempts left"
            sleep 30
        fi
        # Enable exit on error back
        set -e
    done

    echo "Could not download $URL"
    return 1
}

# Download and install Google Chrome
CHROME_DEB_URL="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
CHROME_DEB_NAME="google-chrome-stable_current_amd64.deb"
download_with_retries $CHROME_DEB_URL "/tmp" "${CHROME_DEB_NAME}"
sudo apt install "/tmp/${CHROME_DEB_NAME}" -f

CHROME_VERSION=$(google-chrome --product-version)
CHROME_VERSION=${CHROME_VERSION%.*}

# Determine latest release of chromedriver
# Compatibility of Google Chrome and Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/downloads/version-selection
LATEST_CHROMEDRIVER_VERSION=$(curl "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION")

# Download and unpack latest release of chromedriver
echo "Downloading chromedriver v$LATEST_CHROMEDRIVER_VERSION..."
wget "https://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
unzip chromedriver_linux64.zip
rm chromedriver_linux64.zip

CHROMEDRIVER_DIR="/usr/local/share/chrome_driver"
CHROMEDRIVER_BIN="$CHROMEDRIVER_DIR/chromedriver"

sudo rm -rf $CHROMEDRIVER_DIR/*
sudo rm -rf $CHROMEDRIVER_BIN/*

sudo mkdir -p $CHROMEDRIVER_DIR
sudo mv "chromedriver" $CHROMEDRIVER_BIN
sudo chmod +x $CHROMEDRIVER_BIN
chromedriver --version

@malesci
Copy link
Author

malesci commented May 31, 2022

thanks a lot

@miketimofeev
Copy link
Contributor

@malesci the new images with chrome 102 are deployed.
I'm going to close the issue. Feel free to contact us if you have any concerns.
Thank you1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-deployment Code complete; awaiting deployment and/or deployment in progress feature request OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

3 participants