Skip to content

Commit

Permalink
Update the download URL for the chrome driver
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Feb 20, 2024
1 parent a8ea2e4 commit 7cf2563
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 30 deletions.
10 changes: 4 additions & 6 deletions ci/testkomodo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ start_integration_test () {
chromium_minor_version=$(echo $chromium_version | grep -oP '^\d+\.\d+\.\d+')

# Sometimes the chromium-browser has no matching chromedriver.
# Check for HTTP 404 error
download_url="https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$chromium_version/linux64/chromedriver-linux64.zip"
download_status=$(curl --head "$download_url" | grep -oP 'HTTP/.+? 200 OK' || true)
download_url="https://storage.googleapis.com/chrome-for-testing-public/$chromium_version/linux64/chromedriver-linux64.zip"

driver_version=$chromium_version
if [[ -z "$download_status" ]]; then
# If 404 error, get last good driver version instead.
if ! wget --spider "$download_url" 2>/dev/null; then
# If file not exists fall back to last good version
googlechromelabs_url='https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json'
driver_version=$(curl -s "$googlechromelabs_url" | jq -r .builds.\"$chromium_minor_version\".version)
download_url="https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$driver_version/linux64/chromedriver-linux64.zip"
download_url="https://storage.googleapis.com/chrome-for-testing-public/$driver_version/linux64/chromedriver-linux64.zip"
fi

echo "Downloading chromedriver v$driver_version for chromium-browser v$chromium_version"
Expand Down
48 changes: 24 additions & 24 deletions tests/data/snake_oil_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,35 +260,35 @@ def to_parquet_helper(dataframe: pd.DataFrame) -> bytes:
).transpose()
)

ensembles_response[
"http://127.0.0.1:5000/ensembles/1/records/SNAKE_OIL_GPR_DIFF"
] = to_parquet_helper(
pd.DataFrame(
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
columns=["0"],
index=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
).transpose()
ensembles_response["http://127.0.0.1:5000/ensembles/1/records/SNAKE_OIL_GPR_DIFF"] = (
to_parquet_helper(
pd.DataFrame(
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
columns=["0"],
index=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
).transpose()
)
)

ensembles_response[
"http://127.0.0.1:5000/ensembles/1/records/OP1_DIVERGENCE_SCALE"
] = to_parquet_helper(
pd.DataFrame(
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
columns=["0"],
index=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
).transpose()
ensembles_response["http://127.0.0.1:5000/ensembles/1/records/OP1_DIVERGENCE_SCALE"] = (
to_parquet_helper(
pd.DataFrame(
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
columns=["0"],
index=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
).transpose()
)
)


ensembles_response[
"http://127.0.0.1:5000/ensembles/1/records/BPR_138_PERSISTENCE"
] = to_parquet_helper(
pd.DataFrame(
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
columns=["0"],
index=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
).transpose()
ensembles_response["http://127.0.0.1:5000/ensembles/1/records/BPR_138_PERSISTENCE"] = (
to_parquet_helper(
pd.DataFrame(
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
columns=["0"],
index=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
).transpose()
)
)

ensembles_response.update(
Expand Down

0 comments on commit 7cf2563

Please sign in to comment.