Skip to content

fix(pool): ignore scale-set job events - #904

Open
rm-you wants to merge 1 commit into
cloudbase:mainfrom
rm-you:fix/pool-ignore-scaleset-jobs
Open

rm-you wants to merge 1 commit into
cloudbase:mainfrom
rm-you:fix/pool-ignore-scaleset-jobs

Conversation

@rm-you

@rm-you rm-you commented Sep 30, 2026

Copy link
Copy Markdown

Summary

Scale-set jobs reach the pool manager through database watcher events, even without webhooks. The startup query already filters on workflow_job_id > 0, but the watcher caches every non-completed job belonging to the entity. As a result, queued scale-set jobs are incorrectly considered for pool allocation.

For scale-set workflows using runs-on: group: without labels, each pool reconciliation logs error finding pools matching labels: missing tags. Scale-set jobs with labels also enter the pool-matching path, despite belonging to the scale-set worker.

Apply the same positive workflow-job-ID check to incoming watcher events. This leaves normal webhook handling unchanged and does not mask empty-label errors for webhook jobs. No database changes or dependencies on other PRs.

Tests

  • Table-driven coverage of create/update events for labeled and unlabeled scale-set and webhook jobs, plus missing/invalid workflow IDs.
  • SQLite-backed regression showing that the startup query and live watcher both queue only the webhook job when both job types are stored.
  • Confirmed the new regressions fail on unmodified upstream and pass with the fix.
  • GOWORK=off go test -race -mod=vendor -tags testing -timeout=15m -parallel=4 -count=1 ./...
  • Pinned golangci-lint v2.13.2 with --build-tags=testing,integration; formatting and git diff --check.

Match the startup query's positive workflow job ID filter in the
watcher. Scale-set jobs otherwise enter the pool queue and repeatedly
fail label matching when their request labels are empty.

Signed-off-by: Adam Harwell <flux.adam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant