Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/commercial-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ permissions:

jobs:
backup:
# Skip silently when production secrets are not yet configured (pre-GA repos).
if: ${{ secrets.ENGRAPHIS_CUSTOMER_URL != '' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate on every required production secret

When ENGRAPHIS_CUSTOMER_URL is configured but any of ENGRAPHIS_CUSTOMER_OPS_TOKEN, ENGRAPHIS_LICENSE_URL, or ENGRAPHIS_VENDOR_ADMIN_TOKEN is still absent, this condition allows the backup job to start and its Require production backup targets step fails. That leaves the scheduled workflow red during partial secret setup, contrary to this change's stated behavior of skipping when production secrets are unconfigured; the gate needs to cover all four inputs.

Useful? React with 👍 / 👎.

runs-on: ubuntu-latest
timeout-minutes: 15
env:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/production-synthetics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ jobs:
LICENSE_URL: ${{ secrets.ENGRAPHIS_LICENSE_URL }}
OPS_TOKEN: ${{ secrets.ENGRAPHIS_VENDOR_ADMIN_TOKEN }}
steps:
- name: Gate on secret availability
id: gate
run: |
if [ -z "$CUSTOMER_URL" ] || [ -z "$CUSTOMER_TOKEN" ] || [ -z "$LICENSE_URL" ] || [ -z "$OPS_TOKEN" ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "::warning::Production synthetics skipped — monitoring secrets not yet configured (pre-GA)."
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: Require monitored endpoints
if: steps.gate.outputs.skip != 'true'
run: |
test -n "$CUSTOMER_URL"
test -n "$CUSTOMER_TOKEN"
Expand All @@ -29,24 +39,29 @@ jobs:
case "$CUSTOMER_URL" in https://*) ;; *) echo "customer URL must use HTTPS"; exit 1;; esac
case "$LICENSE_URL" in https://*) ;; *) echo "license URL must use HTTPS"; exit 1;; esac
- name: Customer readiness
if: steps.gate.outputs.skip != 'true'
run: >-
curl --fail --silent --show-error --max-time 20 --proto '=https'
--url "${CUSTOMER_URL%/}/api/ready"
- name: Authenticated customer storage readiness
if: steps.gate.outputs.skip != 'true'
run: |
printf 'Authorization: Bearer %s\n' "$CUSTOMER_TOKEN" |
curl --fail --silent --show-error --max-time 20 --proto '=https' \
--header @- --url "${CUSTOMER_URL%/}/api/ops/ready"
- name: Control-plane readiness
if: steps.gate.outputs.skip != 'true'
run: >-
curl --fail --silent --show-error --max-time 20 --proto '=https'
--url "${LICENSE_URL%/}/api/ready"
- name: Authenticated dependency detail
if: steps.gate.outputs.skip != 'true'
run: |
printf 'Authorization: Bearer %s\n' "$OPS_TOKEN" |
curl --fail --silent --show-error --max-time 20 --proto '=https' \
--header @- --url "${LICENSE_URL%/}/ops/ready"
- name: Non-mutating trial dependency synthetic
if: steps.gate.outputs.skip != 'true'
run: |
printf 'Authorization: Bearer %s\n' "$OPS_TOKEN" |
curl --fail --silent --show-error --max-time 20 --proto '=https' \
Expand Down