An open-source, faster Devin alternative
TypeScript
Remove completed Track E Worker ferry workflow (#1018)
Mohamed Habib6b91fce95bb5
diff --git a/.github/workflows/ferry-worker-secrets-to-infisical.yml b/.github/workflows/ferry-worker-secrets-to-infisical.ymldeleted file mode 100644index 85b5a8f0..00000000--- a/.github/workflows/ferry-worker-secrets-to-infisical.yml+++ /dev/null@@ -1,154 +0,0 @@-# Temporary Track E recovery workflow. Delete after every live Worker secret is-# verified in Infisical and the ferry versions have been removed.-name: Ferry Worker secrets to Infisical (temporary)--on:- workflow_dispatch:- inputs:- mode:- description: Compare only, or create missing values and verify- required: true- default: compare- type: choice- options:- - compare- - migrate--permissions:- contents: read- id-token: write--concurrency:- group: ferry-worker-secrets-to-infisical- cancel-in-progress: false--jobs:- ferry:- runs-on: ubuntu-latest- timeout-minutes: 10- env:- INFISICAL_IDENTITY_ID: ${{ vars.INFISICAL_IDENTITY_ID }}- INFISICAL_PROJECT_SLUG: ${{ vars.INFISICAL_PROJECT_SLUG }}- FERRY_TRIGGER: ${{ secrets.SECRET_FERRY_TRIGGER }}- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}- CF_ACCOUNT_ID: b8f23cb87a7a6c64040d3134643da448- API_EDGE_WORKER: opencomputer-edge-prod- API_EDGE_LIVE_VERSION: 9655a72f-976d-4bba-bdcd-3b32ad416ac1- API_EDGE_FERRY_VERSION: 49606e27-a68f-422e-a19a-e5ce8be553ec- LOG_TAIL_WORKER: opencomputer-log-tail-prod- LOG_TAIL_LIVE_VERSION: 19209174-414c-4dec-8acd-febaa1b00df3- LOG_TAIL_FERRY_VERSION: 240c3029-931f-4ae0-9d8c-2972b652ad97- DISPATCH_WORKER: track-e-secret-ferry-dispatch-20261109- DISPATCH_VERSION: 5ef82971-a6de-448d-aa46-ebbab7d7c5d3- API_EDGE_URL: https://track-e-secret-ferry-dispatch-20261109.mo-b8f.workers.dev/__ops/track-e/secret-ferry/api-edge- LOG_TAIL_URL: https://track-e-secret-ferry-dispatch-20261109.mo-b8f.workers.dev/__ops/track-e/secret-ferry/log-tail-- steps:- - name: Verify pinned Cloudflare versions- shell: bash- run: |- set -Eeuo pipefail- : "${CLOUDFLARE_API_TOKEN:?missing CLOUDFLARE_API_TOKEN}"- : "${FERRY_TRIGGER:?missing SECRET_FERRY_TRIGGER}"- : "${INFISICAL_IDENTITY_ID:?missing INFISICAL_IDENTITY_ID}"- : "${INFISICAL_PROJECT_SLUG:?missing INFISICAL_PROJECT_SLUG}"-- verify_split() {- local worker="$1"- local live="$2"- local ferry="$3"- local deployment- deployment="$(curl --proto '=https' --tlsv1.2 --fail --silent --show-error --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/$worker/deployments")"- jq --exit-status --arg live "$live" --arg ferry "$ferry" '- .success == true and (- (.result.deployments | max_by(.created_on) | .versions) as $versions |- ($versions | length) == 2 and- any($versions[]; .version_id == $live and .percentage == 100) and- any($versions[]; .version_id == $ferry and .percentage == 0)- )- ' <<<"$deployment" >/dev/null- }- verify_split "$API_EDGE_WORKER" "$API_EDGE_LIVE_VERSION" "$API_EDGE_FERRY_VERSION"- verify_split "$LOG_TAIL_WORKER" "$LOG_TAIL_LIVE_VERSION" "$LOG_TAIL_FERRY_VERSION"-- dispatcher="$(curl --proto '=https' --tlsv1.2 --fail --silent --show-error --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/$DISPATCH_WORKER/deployments")"- jq --exit-status --arg version "$DISPATCH_VERSION" '- .success == true and (- (.result.deployments | max_by(.created_on) | .versions) as $versions |- ($versions | length) == 1 and- $versions[0].version_id == $version and- $versions[0].percentage == 100- )- ' <<<"$dispatcher" >/dev/null-- - name: Compare, migrate, and verify exact values- shell: bash- env:- FERRY_MODE: ${{ inputs.mode }}- run: |- set -Eeuo pipefail- umask 077-- oidc_response="$(curl --proto '=https' --tlsv1.2 --fail --silent --show-error --header "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=https%3A%2F%2Fgithub.com%2Fdiggerhq")"- oidc_jwt="$(jq --exit-status --raw-output '.value | strings | select(length > 0)' <<<"$oidc_response")"- printf '::add-mask::%s\n' "$oidc_jwt"- unset oidc_response-- login_response="$(jq --null-input --arg identityId "$INFISICAL_IDENTITY_ID" --arg jwt "$oidc_jwt" '{identityId: $identityId, jwt: $jwt}' | curl --proto '=https' --tlsv1.2 --fail --silent --show-error --request POST --header 'Content-Type: application/json' --data-binary @- https://app.infisical.com/api/v1/auth/oidc-auth/login)"- unset oidc_jwt- infisical_token="$(jq --exit-status --raw-output '.accessToken | strings | select(length > 0)' <<<"$login_response")"- printf '::add-mask::%s\n' "$infisical_token"- unset login_response-- revoke_token() {- jq --null-input --arg accessToken "$infisical_token" '{accessToken: $accessToken}' |- curl --proto '=https' --tlsv1.2 --silent --show-error --request POST --header 'Content-Type: application/json' --data-binary @- --output /dev/null https://app.infisical.com/api/v1/auth/token/revoke || true- }- trap revoke_token EXIT-- probe_list() {- local label="$1"- shift- local status- status="$(curl --proto '=https' --tlsv1.2 --silent --show-error \- --output /dev/null --write-out '%{http_code}' \- --header "Authorization: Bearer $infisical_token" \- --get https://app.infisical.com/api/v4/secrets \- --data-urlencode 'projectId=ab6933b4-8e02-4cb8-ac6c-c178009d5bf5' \- --data-urlencode 'environment=prod' \- --data-urlencode 'secretPath=/api-edge' \- --data-urlencode 'viewSecretValue=true' \- --data-urlencode 'includeImports=false' \- --data-urlencode 'expandSecretReferences=false' \- "$@")"- printf 'Infisical list probe %s: HTTP %s\n' "$label" "$status"- }-- # The earlier successful copy omitted recursive. Compare the two- # request shapes without retaining or printing either response body.- probe_list without-recursive- probe_list recursive-false --data-urlencode 'recursive=false'-- invoke() {- local operation="$1"- local expected="$2"- local url="$3"- shift 3- local result- result="$(jq --null-input --arg accessToken "$infisical_token" --arg trigger "$FERRY_TRIGGER" --arg mode "$FERRY_MODE" '{accessToken: $accessToken, trigger: $trigger, mode: $mode}' | curl --proto '=https' --tlsv1.2 --silent --show-error --request POST --header 'Content-Type: application/json' "$@" --data-binary @- "$url")"- if ! jq --exit-status --arg operation "$operation" --arg mode "$FERRY_MODE" --argjson expected "$expected" '- .ok == true and- .operation == $operation and- .mode == $mode and- .expected == $expected- ' <<<"$result" >/dev/null; then- jq '{ok, operation, stage, upstreamStatus, expected, invalid, different, failed}' <<<"$result"- return 1- fi- jq '{operation, mode, expected, equal, missing, created, verified}' <<<"$result"- }-- failed=0- invoke track-e-opencomputer-api-edge-v1 24 "$API_EDGE_URL" || failed=1- invoke track-e-opencomputer-log-tail-v1 1 "$LOG_TAIL_URL" || failed=1- exit "$failed"