-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Improve step logging #3722
Improve step logging #3722
Conversation
Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-3722.surge.sh |
@zc-devs @fernandrone @eliasscosta @praveen-livspace @davidhazell-tst (Hope all of you are actually interested in this topic, sorry if not) I did some refactoring and hopefully achieved some improvements regarding the log streaming. Using the below workflow for testing I haven't received any more errors now. Could you verify that the skip_clone: true
steps:
- name: hello
image: alpine
commands:
- echo "hello world"
- date +%s%N
- apk add openssl
- openssl rand 10000000 | base64 -w 0
- date +%s%N
- echo done |
It does not always work for me.
1, 2 probably are not related here, cause it is UI-Server interaction. 3 is mentioned in the PR, but I don't know if you actually want to fix it in this PR though.
Seems, it works. Previously it was over 400 lines. Currently it is near 20:
|
Thanks a lot for the testing and detailed reporting.
Strange. I haven't noticed such mismatches in the UI (like showing logs and the The bug that previous logs are not in the list when reloading with f5 is still a thing I have to fix (maybe in another PR).
Will check that one again. |
Changing grpc log messages to use |
Yeeaa, it works now! Thank you! |
2 is partially my fault. I open the test repo in WP and then manually run the pipeline. To gather clean logs, I often restart the Server and Agent pods before run the pipeline. Then download the logs from OpenLens. So, I ran the pipeline a couple of times. All went well, there were no errors in console. Then I restarted the Server and got them. Then I manually ran the pipeline and got However, look at four failed 1 reproduces sometimes with 10M log. |
I think that is basically how SSE works. I will probably have a look at the migration to a websocket at some point.
That should be fixed now.
Might have fixed that one now. |
@anbraten I tried upgrading my agents to :pull_3722 and am seeing a GRPC version mismatch error:
Do I need to also update my server version to I am currently running server version |
@davidhazell-tst Yes I later on updated some grpc related code and you therefore need to update the server as well. (It only has a tiny change, so there wont be any data migration and you can simply switch back if wanted) |
still reproduces
As well as 1 Besides, I've got |
@anbraten We applied the new builds to both the server and agent and our issue appears to be resolved. |
I still had no success replicating the mentioned issues with streams being not stopped, re-connected, etc. Might that even be related to some reverse-proxy setup 🤔 However as the general feedback seems that the changes are already quite an improvement I would move further improvements to new PRs to merge this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, untested from my side. I'm still not gappy with splitting long lines, but I understand that it's hard to change that
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3722 +/- ##
==========================================
+ Coverage 25.81% 25.84% +0.03%
==========================================
Files 362 365 +3
Lines 26725 26913 +188
==========================================
+ Hits 6899 6956 +57
- Misses 19293 19417 +124
- Partials 533 540 +7 ☔ View full report in Codecov by Sentry. |
Some testing similar to #2072
closes #2064
closes #3468
closes #2253
closes #3716
related #2072
Enhancements
writer.Write
is called once per line)Some inspiration from