woodpecker-ci / autoscaler

Scale your woodpecker agents automatically to the moon and back based on the current load.
Apache License 2.0
30 stars 6 forks source link

Agents are removed even though they have tasks assigned #50

Closed qwerty287 closed 8 months ago

qwerty287 commented 11 months ago

This happens pretty often on ci.woodpecker-ci.org. Agents are removed, even though there are tasks assigned to them (you can see this in the queue admin tab). The tasks have not started yet though.

Example (until it's canceled or restarted): https://ci.woodpecker-ci.org/repos/3780/pipeline/9626 (docker and securityscan)

xoxys commented 11 months ago

Yes, have seen this too on my setups. IMO, this is a server issue. The problem is, for the autoscaler the waiting on dependencies status is excluded from the calculation, but the server won't move an item from waiting on dependencies to e.g. pending without an available agent for whatever reason.

xoxys commented 11 months ago

Might be (partially) related to https://github.com/woodpecker-ci/woodpecker/issues/2685

runephilosof-karnovgroup commented 10 months ago

The draining is not working agent option "stop agent from taking new tasks" not working So a task might be given to an agent just before it shuts down.