From 38a90648c1a1400227ff94d5d5dcc320e06e8521 Mon Sep 17 00:00:00 2001 From: mr-mosi Date: Mon, 25 Mar 2024 16:30:20 +0330 Subject: [PATCH] binproto file updater script and docker compose file are added --- .../community/ray/app/docker-compose.yml | 6 + .../scripts/updater/community/ray/update.sh | 97 +++ .../updater/community/ray/versions.txt | 46 ++ .../web/data/community/ray.binproto | 562 ++++++++++++++++++ 4 files changed, 711 insertions(+) create mode 100644 google/fingerprinters/web/scripts/updater/community/ray/app/docker-compose.yml create mode 100755 google/fingerprinters/web/scripts/updater/community/ray/update.sh create mode 100644 google/fingerprinters/web/scripts/updater/community/ray/versions.txt create mode 100644 google/fingerprinters/web/src/main/resources/fingerprinters/web/data/community/ray.binproto diff --git a/google/fingerprinters/web/scripts/updater/community/ray/app/docker-compose.yml b/google/fingerprinters/web/scripts/updater/community/ray/app/docker-compose.yml new file mode 100644 index 000000000..1bdad50b5 --- /dev/null +++ b/google/fingerprinters/web/scripts/updater/community/ray/app/docker-compose.yml @@ -0,0 +1,6 @@ +services: + ray: + image: rayproject/ray:${RAY_VERSION} + ports: + - "8265:8265" + command: sh -c "ray start --head --dashboard-host=0.0.0.0 && tail -f /dev/null" \ No newline at end of file diff --git a/google/fingerprinters/web/scripts/updater/community/ray/update.sh b/google/fingerprinters/web/scripts/updater/community/ray/update.sh new file mode 100755 index 000000000..a82d16fe5 --- /dev/null +++ b/google/fingerprinters/web/scripts/updater/community/ray/update.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + +source ../../common.sh + +SCRIPT_PATH="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)" +# Root path to the web fingerprinter plugin. +PROJECT_ROOT="$(cd -- "${SCRIPT_PATH}/../../../.." >/dev/null 2>&1 ; pwd -P)" +# Path to the configurations for starting a live instance of Ray. +RAY_APP_PATH="${SCRIPT_PATH}/app" +# Path to the temporary data holder. +TMP_DATA="/tmp/RAY_fingerprints" +# Path to the local git repository for Ray codebase. +GIT_REPO="${TMP_DATA}/repo" +# Path to the directory of all the updated fingerprints data. +FINGERPRINTS_PATH="${TMP_DATA}/fingerprints" +# Json data of the final result. +JSON_DATA="${FINGERPRINTS_PATH}/fingerprint.json" +# Binary proto data of the final result. +BIN_DATA="${FINGERPRINTS_PATH}/fingerprint.binproto" +# Read all the versions to be fingerprinted. +readarray -t ALL_VERSIONS < "${SCRIPT_PATH}/versions.txt" +mkdir -p "${FINGERPRINTS_PATH}" + +startRay() { + local version="$1" + pushd "${RAY_APP_PATH}" >/dev/null + RAY_VERSION="${version}" docker compose up -d + popd >/dev/null +} + +stopRay() { + local version="$1" + pushd "${RAY_APP_PATH}" >/dev/null + RAY_VERSION="${version}" docker compose down --volumes --remove-orphans + popd >/dev/null +} + +createFingerprintForDashboard() { + local ray_version="$1" + + echo "Fingerprinting Ray version ${ray_version} ..." + # Start a live instance of Ray. + startRay "${ray_version}" + # Arbitrarily chosen so that Ray is up and running. + echo "Waiting for Ray ${ray_version} to be ready ..." + sleep 30 + + # Checkout the repository to the correct tag. + checkOutRepo "${GIT_REPO}" "ray-${ray_version}" + + updateFingerprint \ + "ray" \ + "${ray_version}" \ + "${FINGERPRINTS_PATH}" \ + "${GIT_REPO}/dashboard" \ + "http://localhost:8265" + + # Stop the live instance of Ray. + stopRay "${ray_version}" +} + + +# Convert the existing data file to a human-readable json file. +convertFingerprint \ + "${PROJECT_ROOT}/src/main/resources/fingerprinters/web/data/community/ray.binproto" \ + "${JSON_DATA}" + +# Fetch Ray codebase. +if [[ ! -d "${GIT_REPO}" ]] ; then + git clone https://github.com/ray-project/ray.git "${GIT_REPO}" +fi + +# Update for all the versions listed in versions.txt file. +for ray_version in "${ALL_VERSIONS[@]}"; do + createFingerprintForDashboard "${ray_version}" +done + +convertFingerprint "${JSON_DATA}" "${BIN_DATA}" + +echo "Fingerprint updated for Ray. Please commit the following file:" +echo " ${BIN_DATA}" diff --git a/google/fingerprinters/web/scripts/updater/community/ray/versions.txt b/google/fingerprinters/web/scripts/updater/community/ray/versions.txt new file mode 100644 index 000000000..0bcdb4b68 --- /dev/null +++ b/google/fingerprinters/web/scripts/updater/community/ray/versions.txt @@ -0,0 +1,46 @@ +0.8.7 +1.0.0 +1.0.1 +1.1.0 +1.2.0 +1.3.0 +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.0 +1.7.0 +1.7.1 +1.8.0 +1.9.0 +1.9.1 +1.9.2 +1.10.0 +1.11.0 +1.11.1 +1.12.0 +1.12.1 +1.13.0 +1.13.1 +2.0.0 +2.0.1 +2.1.0 +2.2.0 +2.3.0 +2.3.1 +2.4.0 +2.5.0 +2.5.1 +2.6.0 +2.6.1 +2.6.2 +2.7.0 +2.7.1 +2.8.0 +2.8.1 +2.9.0 +2.9.1 +2.9.2 +2.9.3 +2.10.0 \ No newline at end of file diff --git a/google/fingerprinters/web/src/main/resources/fingerprinters/web/data/community/ray.binproto b/google/fingerprinters/web/src/main/resources/fingerprinters/web/data/community/ray.binproto new file mode 100644 index 000000000..3c2abb3d8 --- /dev/null +++ b/google/fingerprinters/web/src/main/resources/fingerprinters/web/data/community/ray.binproto @@ -0,0 +1,562 @@ + + +rayC +static/js/2.a5682c7a.chunk.js" + d28a0e14191dfdc62bd98d88c4e49f67F + static/js/main.e42e8231.chunk.js" + 45e6e75ace2bad126a4fee2a68d2242cE +static/css/3.65aa3b33.chunk.css" + 09c2ef992f38929fd605fd6ddce56ec5E +static/css/2.43a1c8b7.chunk.css" + e83f66081f830384222f986d6b007f56E +static/css/2.65aa3b33.chunk.css" + e0cca52d5a8221926e0cf5ed39927572@ +static/js/main.4ff4f4db.js" + 6a9f40e11fcee58a8f21d339d27a961dF + static/js/main.e00916c3.chunk.js" + aa5c26573ae9ecec6f63cb2081b0ea54F + static/js/main.bcaf7740.chunk.js" + 1be1f560a9ce402fa39dfb06c270ab831 + favicon.ico" + 5a4391b3d8ceadc536e6180e79fbb30aC +static/js/2.00747730.chunk.js" + 0a1a6766a3a078d2a114b8b75e5a2e5cF + static/js/main.518a6fb3.chunk.js" + cd3241e7df0d8382642963c56704e2e2E +static/css/6.43a1c8b7.chunk.css" + af770f9017bb84e21c4e57c78fb58ddcC +static/js/6.ba74445f.chunk.js" + a69acf09c252a11caf1dad180e648f6a@ +static/js/main.6e73a04a.js" + cffba61cc134155e5fafd63cffc06d27C +static/js/2.3f5a3866.chunk.js" + 05679525473a886d8cb01359286b3849F + static/js/main.8fe93ca5.chunk.js" + 6115e6c120379fe8224e42bcbfb830c1C +static/js/2.175eea70.chunk.js" + dc0795258b3b3ad7f377e2fa2de472aeF + static/js/main.20b4b076.chunk.js" + 2ddfac558dae265580e9add4a26eb7ee@ +static/js/main.f7757344.js" + f442da85759c08064992a27896e7ca72B +static/css/main.388a904b.css" + 34677307ee64e497878e2af66349ea14H +"static/css/main.d41b9198.chunk.css" + 44dbf61bc622d00207f3924fb30d9f65C +static/js/3.717c3504.chunk.js" + abfeb6d53d453c536ac48fff4a49c7da@ +static/js/main.cc1be436.js" + 0bcde98e6374b20d2f3b09699e088b12@ +static/js/main.27eece88.js" + f4738edee9c349b9a614e444df3f93baF + static/js/main.9dcef677.chunk.js" + deeaeb85939e6a98441e58c4715b4886@ +static/js/main.c1ceb39c.js" + 6b2a909ab5926544f0a837addba8ad95F + static/js/main.74f85e03.chunk.js" + e27bbbafbb310980dc2d8f59113394a6@ +static/js/main.5568d697.js" + d89d7ba7311292e736f3bf7b24aa7c5aH +"static/css/main.209b3f5e.chunk.css" + b8f2831f88f21151b8f34484cf11c740@ +static/js/main.a25f0a80.js" + 90869e062e22e9af9e57234f8a86346cF + static/js/main.4434d995.chunk.js" + 7244527194ae6c98f2ffd8fe4d3315e1@ +static/js/main.f57297a9.js" + ada85a0ffcf01d16aa58f3282cdadd99C +static/js/2.d743aa52.chunk.js" + f9f8332b6912c113fd04511eb39b4459C +static/js/2.a844c442.chunk.js" + 3bffc21d9067ad0961c17bfb8b111435C +static/js/2.c61ca79f.chunk.js" + d4358f1eeef495af2b5bfad5c6809457C +static/js/2.c7ecb373.chunk.js" + e2efe26f2697a614dc5d547fe4c62e54F + static/js/main.9962c005.chunk.js" + 82afc57373da68142a98268190d3e405F + static/js/main.19c0a982.chunk.js" + 3c023655e42aae84e6df41870c015a2f@ +static/js/main.d0f49d93.js" + 744120767bd5d91b31f1d8023ea4e441F + static/js/main.6e5108b7.chunk.js" + 47a43a5c01f5cd030257de22b531b7f0E +static/css/2.47271137.chunk.css" + c236ff5e65bb1259aa25fc1154905f92F + static/js/main.b1101dec.chunk.js" + d945c30d65fad77334caf24bb213396cC +static/js/3.2ce4cb6f.chunk.js" + 617954552c1db5effe5a0ba33ab83d4cF + static/js/main.96d021bc.chunk.js" + 58c578a1b7c75b3a36bf8da2e4ed9599@ +static/js/main.1f147255.js" + af6baa6f124bf22a7b7fb49339f3b122J +" + 3bffc21d9067ad0961c17bfb8b111435 +1.9.1 +1.9.2 +1.10.0 +1.12.1- +" + aa5c26573ae9ecec6f63cb2081b0ea54 +0.8.7. +" + 7244527194ae6c98f2ffd8fe4d3315e1 +1.12.1? +" + e83f66081f830384222f986d6b007f56 +1.7.0 +1.7.1 +1.8.0? +" + 09c2ef992f38929fd605fd6ddce56ec5 +2.0.0 +2.0.1 +2.1.06 +" + 0a1a6766a3a078d2a114b8b75e5a2e5c +1.0.0 +1.0.16 +" + 6b2a909ab5926544f0a837addba8ad95 +2.5.0 +2.5.1H +" + ada85a0ffcf01d16aa58f3282cdadd99 +2.9.0 +2.9.1 +2.9.2 +2.9.3- +" + af6baa6f124bf22a7b7fb49339f3b122 +2.7.0c +" + a69acf09c252a11caf1dad180e648f6a +1.3.0 +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.0¬ +" + 5a4391b3d8ceadc536e6180e79fbb30a +2.8.0 +0.8.7 +1.0.0 +1.0.1 +1.1.0 +1.2.0 +1.3.0 +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.0 +1.7.0 +1.7.1 +1.8.0 +1.9.0 +1.9.1 +1.9.2 +1.10.0 +1.12.1 +1.13.0 +1.13.1 +2.0.0 +2.0.1 +2.1.0 +2.2.0 +2.3.0 +2.3.1 +2.4.0 +2.5.0 +2.5.1 +2.6.0 +2.6.1 +2.6.2 +2.7.0 +2.7.1 +2.8.1 +2.9.0 +2.9.1 +2.9.2 +2.9.3 +2.10.06 +" + 2ddfac558dae265580e9add4a26eb7ee +1.7.0 +1.7.1- +" + deeaeb85939e6a98441e58c4715b4886 +1.8.0I +" + 45e6e75ace2bad126a4fee2a68d2242c +1.9.0 +1.9.1 +1.9.2 +1.10.0- +" + 3c023655e42aae84e6df41870c015a2f +1.1.0- +" + 0bcde98e6374b20d2f3b09699e088b12 +2.2.0. +" + f442da85759c08064992a27896e7ca72 +2.10.0- +" + d945c30d65fad77334caf24bb213396c +1.3.08 +" + 58c578a1b7c75b3a36bf8da2e4ed9599 +1.13.0 +1.13.1- +" + 744120767bd5d91b31f1d8023ea4e441 +2.4.0- +" + cffba61cc134155e5fafd63cffc06d27 +2.8.0- +" + cd3241e7df0d8382642963c56704e2e2 +1.2.0? +" + 6a9f40e11fcee58a8f21d339d27a961d +2.6.0 +2.6.1 +2.6.26 +" + 617954552c1db5effe5a0ba33ab83d4c +2.0.0 +2.0.18 +" + e2efe26f2697a614dc5d547fe4c62e54 +1.13.0 +1.13.1g +" + e0cca52d5a8221926e0cf5ed39927572 +1.9.0 +1.9.1 +1.9.2 +1.10.0 +1.12.1 +1.13.0 +1.13.16 +" + d28a0e14191dfdc62bd98d88c4e49f67 +1.7.0 +1.7.1- +" + 6115e6c120379fe8224e42bcbfb830c1 +1.0.0‚ +" + b8f2831f88f21151b8f34484cf11c740 +1.9.0 +1.9.1 +1.9.2 +1.10.0 +1.12.1 +1.13.0 +1.13.1 +2.0.0 +2.0.1 +2.1.0Q +" + c236ff5e65bb1259aa25fc1154905f92 +0.8.7 +1.0.0 +1.0.1 +1.1.0 +1.2.0- +" + d4358f1eeef495af2b5bfad5c6809457 +1.8.0- +" + 90869e062e22e9af9e57234f8a86346c +2.7.1? +" + 44dbf61bc622d00207f3924fb30d9f65 +1.7.0 +1.7.1 +1.8.0- +" + 05679525473a886d8cb01359286b3849 +1.9.0c +" + af770f9017bb84e21c4e57c78fb58ddc +1.3.0 +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.06 +" + f4738edee9c349b9a614e444df3f93ba +2.3.0 +2.3.1- +" + 47a43a5c01f5cd030257de22b531b7f0 +1.0.1- +" + abfeb6d53d453c536ac48fff4a49c7da +2.1.0Ç +" + 34677307ee64e497878e2af66349ea14 +2.8.0 +2.2.0 +2.3.0 +2.3.1 +2.4.0 +2.5.0 +2.5.1 +2.6.0 +2.6.1 +2.6.2 +2.7.0 +2.7.1 +2.8.1 +2.9.0 +2.9.1 +2.9.2 +2.9.3 +2.10.06 +" + dc0795258b3b3ad7f377e2fa2de472ae +1.1.0 +1.2.0- +" + d89d7ba7311292e736f3bf7b24aa7c5a +2.8.1- +" + f9f8332b6912c113fd04511eb39b4459 +0.8.76 +" + 1be1f560a9ce402fa39dfb06c270ab83 +2.0.0 +2.0.1Z +" + e27bbbafbb310980dc2d8f59113394a6 +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.0- +" + 82afc57373da68142a98268190d3e405 +2.1.0"1 +static/js/2.a5682c7a.chunk.js +1.7.0 +1.7.1"G + static/js/main.e42e8231.chunk.js +1.9.0 +1.9.1 +1.9.2 +1.10.0"< +static/css/3.65aa3b33.chunk.css +2.0.0 +2.0.1 +2.1.0"< +static/css/2.43a1c8b7.chunk.css +1.7.0 +1.7.1 +1.8.0"d +static/css/2.65aa3b33.chunk.css +1.9.0 +1.9.1 +1.9.2 +1.10.0 +1.12.1 +1.13.0 +1.13.1"7 +static/js/main.4ff4f4db.js +2.6.0 +2.6.1 +2.6.2"+ + static/js/main.e00916c3.chunk.js +0.8.7"4 + static/js/main.bcaf7740.chunk.js +2.0.0 +2.0.1"• + favicon.ico +2.8.0 +0.8.7 +1.0.0 +1.0.1 +1.1.0 +1.2.0 +1.3.0 +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.0 +1.7.0 +1.7.1 +1.8.0 +1.9.0 +1.9.1 +1.9.2 +1.10.0 +1.12.1 +1.13.0 +1.13.1 +2.0.0 +2.0.1 +2.1.0 +2.2.0 +2.3.0 +2.3.1 +2.4.0 +2.5.0 +2.5.1 +2.6.0 +2.6.1 +2.6.2 +2.7.0 +2.7.1 +2.8.1 +2.9.0 +2.9.1 +2.9.2 +2.9.3 +2.10.0"1 +static/js/2.00747730.chunk.js +1.0.0 +1.0.1"+ + static/js/main.518a6fb3.chunk.js +1.2.0"` +static/css/6.43a1c8b7.chunk.css +1.3.0 +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.0"^ +static/js/6.ba74445f.chunk.js +1.3.0 +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.0"% +static/js/main.6e73a04a.js +2.8.0"( +static/js/2.3f5a3866.chunk.js +1.9.0"+ + static/js/main.8fe93ca5.chunk.js +1.0.0"1 +static/js/2.175eea70.chunk.js +1.1.0 +1.2.0"4 + static/js/main.20b4b076.chunk.js +1.7.0 +1.7.1"& +static/js/main.f7757344.js +2.10.0"Á +static/css/main.388a904b.css +2.8.0 +2.2.0 +2.3.0 +2.3.1 +2.4.0 +2.5.0 +2.5.1 +2.6.0 +2.6.1 +2.6.2 +2.7.0 +2.7.1 +2.8.1 +2.9.0 +2.9.1 +2.9.2 +2.9.3 +2.10.0"? +"static/css/main.d41b9198.chunk.css +1.7.0 +1.7.1 +1.8.0"( +static/js/3.717c3504.chunk.js +2.1.0"% +static/js/main.cc1be436.js +2.2.0". +static/js/main.27eece88.js +2.3.0 +2.3.1"+ + static/js/main.9dcef677.chunk.js +1.8.0". +static/js/main.c1ceb39c.js +2.5.0 +2.5.1"X + static/js/main.74f85e03.chunk.js +1.4.0 +1.4.1 +1.5.0 +1.5.1 +1.5.2 +1.6.0"% +static/js/main.5568d697.js +2.8.1"‚ +"static/css/main.209b3f5e.chunk.css +1.9.0 +1.9.1 +1.9.2 +1.10.0 +1.12.1 +1.13.0 +1.13.1 +2.0.0 +2.0.1 +2.1.0"% +static/js/main.a25f0a80.js +2.7.1", + static/js/main.4434d995.chunk.js +1.12.1"@ +static/js/main.f57297a9.js +2.9.0 +2.9.1 +2.9.2 +2.9.3"( +static/js/2.d743aa52.chunk.js +0.8.7"E +static/js/2.a844c442.chunk.js +1.9.1 +1.9.2 +1.10.0 +1.12.1"( +static/js/2.c61ca79f.chunk.js +1.8.0"3 +static/js/2.c7ecb373.chunk.js +1.13.0 +1.13.1"+ + static/js/main.9962c005.chunk.js +2.1.0"+ + static/js/main.19c0a982.chunk.js +1.1.0"% +static/js/main.d0f49d93.js +2.4.0"+ + static/js/main.6e5108b7.chunk.js +1.0.1"N +static/css/2.47271137.chunk.css +0.8.7 +1.0.0 +1.0.1 +1.1.0 +1.2.0"+ + static/js/main.b1101dec.chunk.js +1.3.0"1 +static/js/3.2ce4cb6f.chunk.js +2.0.0 +2.0.1"6 + static/js/main.96d021bc.chunk.js +1.13.0 +1.13.1"% +static/js/main.1f147255.js +2.7.0 \ No newline at end of file