fix: self-hosted checker and workflow routing#2083
Conversation
…table. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Deploying openstatus-docs with
|
| Latest commit: |
f003e30
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c0b020f7.openstatus-1sy.pages.dev |
| Branch Preview URL: | https://fix-self-hosted-checker-work.openstatus-1sy.pages.dev |
Adds it back as commented-out with a note that it's not needed for self-host. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Gate fly-prefer-region header on !isSelfHost() in triggerChecker - Use isSelfHost() utility in monitor.ts instead of raw env check - Fix followRedirects || true bug (always true) → ?? true Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Matches the TS-side pattern: isSelfHost() || !hasCloudTaskConfig(). Prevents accidental Cloud Tasks usage when GCP creds are present alongside SELF_HOST=true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Claude finished @mxkaske's task in 2m 10s —— View job Code Review
Overall this is a well-structured PR that picks up #1976 cleanly and applies the stated improvements. The architecture is sound — Bugs / Medium Severity1.
The // packages/api/src/router/checker.ts ~L459
const allResult = [];
for (const region of input.regions) {
const res = fetch(generateUrl({ row: input }), {
...
body: JSON.stringify(payload), // payload can be null here2. Go Cloud Tasks client created on every call
// Called per monitor result, creates a new authenticated client each time
client, err := cloudtasks.NewClient(ctx, option.WithAuthCredentials(creds))Low Severity / Nits3.
if os.Getenv("SELF_HOST") == "true" || !hasGCPConfig() {The PR description says the Go side was updated to use 4. Duplicated maintenance subquery between direct and cloud paths
Both 5.
image: hiett/serverless-redis-http:latest
6. Missing Redis env vars in workflows
7. Single-region limitation in self-host direct dispatch is implicit
In SummaryThe core routing logic and N+1 fix are solid. The two actionable items above are: (1) the null-payload silent mis-dispatch in |
Summary
Picks up the work from #1976 (by @aiokaizen) and applies review feedback from @thibaultleouay.
serverless-redis-http) for self-hosted Redis compatibilityFixes applied on top of #1976:
isSelfHost,getCheckerBaseUrl,getCheckerRegion) into@openstatus/utils— removed copies from 3 filessendCheckerTasksDirect— batch-fetch all monitor statuses in one query instead of per-monitorAbortSignal.timeout) to direct checker dispatchhttp.DefaultClientwith bounded clientbuildCheckerPayload()shared by both direct and Cloud Tasks paths (-70 lines)SELF_HOST/OPENSTATUS_WORKFLOWS_URLbranching withhasGCPConfig()check, matching the TS-side patternTest plan
docker compose upstarts all services with.env.docker.examplevalues🤖 Generated with Claude Code