-
-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase log level when failing to fetch YAML #4107
Conversation
Increase verbosity of logs 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'"} ```
I didn't open an issue given it's a trivial change. I couldn't find in past PRs if it was an explicit decision to leave logs as "debug" instead of "error" either. |
I agree to @zc-devs and @fernandrone, you thumbed up the comment #4107 (comment), so I guess this can be closed? |
But I'm convinced in regards the first change.
Even message itself says, that it's error :) Edit 1 |
You're right, this case - the config is not found in the repo - is handled separately. These logs only trigger if something really went wrong |
I'll adjust the log level according to the comment so we can merge it.
Sorry for not getting back to this sooner but I've had a few hectic past
weeks. I'm away from my computer this weekend but should get this done next
week 👍🏻
…On Sun, Oct 6, 2024, 9:26 AM qwerty287 ***@***.***> wrote:
You're right, this case - the config is not found in the repo - is handled
separately. These logs only trigger if something really went wrong
—
Reply to this email directly, view it on GitHub
<#4107 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXO2TWRMGEI4M7FOSD55EDZ2EUADAVCNFSM6AAAAABOFPO6T2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGQZDCNBWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Updated the corresponding line, this should be ready now. @woodpecker-ci/maintainers please review |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4107 +/- ##
=======================================
Coverage 28.22% 28.22%
=======================================
Files 385 385
Lines 27847 27847
=======================================
Hits 7860 7860
Misses 19296 19296
Partials 691 691 ☔ View full report in Codecov by Sentry. |
Tearing down https://woodpecker-ci-woodpecker-pr-4107.surge.sh |
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.
And it will fail to create a pipeline, but no error logs will be displayed, only a debug log: