woodpecker-ci/woodpecker

Infinite loading on manual run on branch without pipelines

Opened this issue · 0 comments

Component

server, web-ui

Describe the bug

Trying to run a pipeline manually on a branch, which doesn't have any pipelines, I get infinite loading and no errors.

Steps to reproduce

  1. Woodpecker + Gitea
  2. Create empty repository
  3. Enable it in Woodpecker
  4. Go to repo, hit "Run pipeline"
  5. Select whatever branch you want, which does not contain Woodepecker's configs (main in my case)
  6. Hit "Run pipeline"
  7. See infinite loading and no errors
    Screenshot 2024-11-21 141347
  8. See errors in the server logs

{"level":"trace","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/router/router.go:43","message":"[POST] /api/repos/2/pipelines"}
{"level":"debug","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/router/middleware/session/repo.go:157","message":"user1 granted &{UserID:1 RepoID:2 Repo:<nil> Pull:true Push:true Admin:true Synced:1732187329 Created:1721072630 Updated:1732187329} permission to wp/test"}
{"level":"trace","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:98","message":"configFetcher[wp/test]: user did not define own config, following default procedure"}
{"level":"trace","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:145","message":"fetching .woodpecker/ from forge"}
{"level":"trace","error":"configFetcher: fallback did not find config: configs not found: .woodpecker/, .woodpecker.yaml, .woodpecker.yml","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:62","message":"Fetching config files: Attempt #1 failed"}
{"level":"trace","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:98","message":"configFetcher[wp/test]: user did not define own config, following default procedure"}
{"level":"trace","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:145","message":"fetching .woodpecker/ from forge"}
{"level":"trace","error":"configFetcher: fallback did not find config: configs not found: .woodpecker/, .woodpecker.yaml, .woodpecker.yml","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:62","message":"Fetching config files: Attempt #2 failed"}
{"level":"trace","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:98","message":"configFetcher[wp/test]: user did not define own config, following default procedure"}
{"level":"trace","time":"2024-11-21T11:13:03Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:145","message":"fetching .woodpecker/ from forge"}
{"level":"trace","error":"configFetcher: fallback did not find config: configs not found: .woodpecker/, .woodpecker.yaml, .woodpecker.yml","time":"2024-11-21T11:13:04Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/services/config/forge.go:62","message":"Fetching config files: Attempt #3 failed"}
{"level":"debug","repo":"wp/test","error":"configFetcher: fallback did not find config: configs not found: .woodpecker/, .woodpecker.yaml, .woodpecker.yml","time":"2024-11-21T11:13:04Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/pipeline/create.go:83","message":"cannot find config '' in 'main' with user: 'user1'"}
{"level":"debug","ip":"1.2.3.4","latency":415.194708,"method":"POST","path":"/api/repos/2/pipelines","status":204,"time":"2024-11-21T11:13:04Z","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0","time":"2024-11-21T11:13:04Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/router/middleware/logger.go:59"}

Expected behavior

  1. No infinite loading
  2. Some error shows up
  3. No retries on the server-side

Alternatives

  1. "Run pipeline" button is disabled when branch without config is selected.
  2. There is no branches in the list, which do not contain WP configs.

System Info

WP next-350082cd19, Gitea 1.22.3, Postgres 16, Kubernetes v1.30.6+k3s1

Additional context

#4405 for 2.7.3

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]