Skip to content
Closed
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
22 changes: 22 additions & 0 deletions .github/workflows/monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Production smoke check

# The October 2026 catalogue outage was worker code deployed without its D1
# migration: every public list read returned 500 DATABASE_ERROR. Deploys run
# through Workers Builds, so no repo-side step can gate them — this hits the
# exact read path hourly so a recurrence is caught quickly either way.
on:
schedule:
- cron: "17 * * * *"
workflow_dispatch:

permissions:
contents: read

jobs:
catalogue:
runs-on: ubuntu-latest
steps:
- name: Public extension list returns rows
run: |
body=$(curl -sS --fail-with-body "https://api.fossbilling.net/extensions/v2/extensions?limit=1" -H "Accept: application/json")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: The smoke check has no time bounds: curl runs without --max-time/--connect-timeout and the job has no timeout-minutes. A hung or stalled connection keeps the job running up to GitHub's 360-minute default and hourly runs overlap, so a recurrence can go undetected exactly when the check is most needed. Add --max-time 30 --connect-timeout 10 to curl and timeout-minutes: 10 to the job.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/monitor.yml, line 21:

<comment>The smoke check has no time bounds: curl runs without `--max-time`/`--connect-timeout` and the job has no `timeout-minutes`. A hung or stalled connection keeps the job running up to GitHub's 360-minute default and hourly runs overlap, so a recurrence can go undetected exactly when the check is most needed. Add `--max-time 30 --connect-timeout 10` to curl and `timeout-minutes: 10` to the job.</comment>

<file context>
@@ -0,0 +1,22 @@
+    steps:
+      - name: Public extension list returns rows
+        run: |
+          body=$(curl -sS --fail-with-body "https://api.fossbilling.net/extensions/v2/extensions?limit=1" -H "Accept: application/json")
+          echo "$body" | jq -e '.result | type == "array"' > /dev/null
</file context>
Suggested change
body=$(curl -sS --fail-with-body "https://api.fossbilling.net/extensions/v2/extensions?limit=1" -H "Accept: application/json")
body=$(curl -sS --fail-with-body --max-time 30 --connect-timeout 10 "https://api.fossbilling.net/extensions/v2/extensions?limit=1" -H "Accept: application/json")

echo "$body" | jq -e '.result | type == "array"' > /dev/null
Loading