woodpecker icon indicating copy to clipboard operation
woodpecker copied to clipboard

Increase log level when failing to create pipeline

Open fernandrone opened this issue 5 months ago • 5 comments

Increase log level when failing to create pipelines. There are situations when woodpecker server may fail to create a pipeline and will only log the error under "debug", making it hard to debug the issue unless the user has explicitly activated debug logs.

To reproduce this, set the server environment variable WOODPECKER_CONFIG_SERVICE_ENDPOINT to an invalid service, i.e.

WOODPECKER_CONFIG_SERVICE_ENDPOINT: "http://invalid/config"

And it will fail to create a pipeline, but no error logs will be displayed, only a debug log:

{"level":"debug","repo":"<redacted>","error":"failed to fetch config via http (0) Post \"http://ci-template-plugin/config\": dial tcp: lookup invalid on 198.18.0.1:53: no such host","time":"2024-09-13T14:06:02Z","caller":"/go/src/github.com/woodpecker-ci/woodpecker/server/pipeline/create.go:90","message":"error while fetching config '' in 'refs/heads/fernandrone-patch-1' with user: 'fernandrone'"}

fernandrone avatar Sep 13 '24 14:09 fernandrone