Repository navigation
chore(fork): merge upstream main 54581e24aeb9 onto the bucket engine (RIG-9206) - #24
Conversation
…ci#773) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
…odpecker-ci#581) Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Robert Kaussow <xoxys@rknet.org>
An hourly billed agent can remain drained when a running job carries it past its billing boundary. The machine is retained for the newly paid hour, but stays unschedulable until demand triggers reactivation. Restore scheduling during drained-agent cleanup, after demand-driven scaling. Reactivation requires a known creation time, at least one elapsed hour, and a match against current provider capabilities and configured agent labels. Agents retired for configuration drift stay drained. Failed API updates preserve the local drained state. Extend existing billing tests and port missing regression cases covering zero, one and two pending workflows, running jobs across rollover, removal in the next teardown window, invalid creation times, and update failures. Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#781) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…dpecker-ci#782) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…4.1.3 (woodpecker-ci#788) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Harsh Singh <unpredictablemr434@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
cbfa74a to
fa73f0f
Compare
|
Review round 1 (cbfa74a) is fixed and squashed into the merge at fa73f0f. rjc accepts only a single merge commit for upstream syncs, so the interdiff is lost; this comment records it.
On the VM, |
fa73f0f to
2b05827
Compare
|
Review all-clear for head 2b05827.
|
|
Handoff from deps to go-migration (lane fold, 2026-11-13). Head 2b05827, review all-clear posted for that head, ready. Next: Matt merges into rigel-release; then close RIG-9400. |
|
CI note: the red |
Summary
Merges upstream woodpecker-ci/autoscaler
54581e24(bucket/plan engine,DeployAgent(ctx, agent, Capability)/Capabilities()) into the fork. The four fork features are ported onto the new engine. Refs RIG-9400, RIG-9206.engine/cleanup.go): a provider-only instance is removed only after it has been absent pastAgentInactivityTimeout. Upstream e2e drift tests (TestProviderServerDriftIsReconciled,TestFailedDriftCleanupCanBeRetried/provider_only,TestVanishedBootRegistrationNoLongerCoversDemand) now assert the grace pass first.engine/agents.go,OutdatedAgentLister): outdated agents are drained, never reactivated, and removed once task-free. They are not counted as reusable, andcreateAgentscaps fresh creates atMaxAgents, so a rollout never surges past the ceiling.engine/netting.go): pending tasks that free non-pool slots can run are netted out beforecomputeBucketStates.engine/netting.go): withWOODPECKER_POOL_PLATFORMset, only tasks the modeled pool filter accepts count as demand. With it unset, the step is skipped and upstream bucket routing decides.DeployAgentplus the fork launch-template / CreateFleet path, with tests ported.Capabilities()reports{Backend: kubernetes}with the platform unknown. The agent pod's self-reported platform can differ from the step platform: the prod arm64 pool runs its agent on amd64. Buckets route onPoolPlatforminstead.Verification
On the Azure VM (go1.27.3),
gofmt -lis empty, andgo vet ./...,go build ./...andgo test ./...all pass.Risks
WOODPECKER_POOL_PLATFORMunset, a kubernetes pool advertises no platform label, so platform-keyed tasks never scale it. Startup warns about this. Every prod scaler sets it.transliteratedFromVersionpin was bumped to v3.19.0 after reading v3.19.0server/scheduler/filter.go. The logic is identical.Refs RIG-9206
Co-authored-by: Matt Wilkinson matt@rigel.build