woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.31k stars 371 forks source link

Task stuck at waiting for dependencies #4125

Open lukashass opened 2 months ago

lukashass commented 2 months ago

Component

server

Describe the bug

Screenshot from 2024-09-18 16-29-16

Using 2 dependent workflows and the autoscaler with WOODPECKER_MIN_AGENTS=0 and WOODPECKER_AGENT_IDLE_TIMEOUT=0s it is possible to create the above queue state.

The task is waiting for dependencies, but all dependencies are already done.

The task is moved to pending when an agent is manually added. It should move to pending without an agent being present.

Because there is no task in pending the autoscaler also doesn't create a new agent, which creates a deadlock.

Steps to reproduce

  1. Create two dependent workflows.
  2. Use the autoscaler with WOODPECKER_MIN_AGENTS=0 and WOODPECKER_AGENT_IDLE_TIMEOUT=0s

Expected behavior

When a task has no dependencies left it should move from waiting for dependencies to pending.

System Info

next-4683968925

Additional context

No response

Validations

6543 commented 3 weeks ago

@lukashass might be solved by #4115

or https://github.com/woodpecker-ci/woodpecker/pull/4271 ?