An open-source, faster Devin alternative
TypeScript
fix: report safe ferry failure status (#1013)
Mohamed Habibd54c7944459d
diff --git a/.github/workflows/ferry-worker-secrets-to-infisical.yml b/.github/workflows/ferry-worker-secrets-to-infisical.ymlindex 57a5ab91..4d7e14ea 100644--- a/.github/workflows/ferry-worker-secrets-to-infisical.yml+++ b/.github/workflows/ferry-worker-secrets-to-infisical.yml@@ -112,13 +112,16 @@ jobs:local url="$3"shift 3local 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 --fail-with-body --silent --show-error --request POST --header 'Content-Type: application/json' "$@" --data-binary @- "$url")"- jq --exit-status --arg operation "$operation" --arg mode "$FERRY_MODE" --argjson expected "$expected" '+ 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+ ' <<<"$result" >/dev/null; then+ jq '{ok, operation, stage, upstreamStatus, expected, invalid, different, failed}' <<<"$result"+ return 1+ fijq '{operation, mode, expected, equal, missing, created, verified}' <<<"$result"}