Skip to content
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

assume we receive logs by lines and don't ignore those without EOL #10660

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Jun 6, 2023

What I did
as we attach to containers we receive output as a low-level Write([]byte) that we split into lines to prepend container prefix
if container log doesn't include an EOL character we won't dump it to logs
This PR assumes we don't get container output per character but as full lines (which is the case AFAICT) so that we dump logs as we receive them

Related issue
fixes #10658

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@ndeloof ndeloof force-pushed the container_log_no_eol branch from 5954508 to a027778 Compare June 6, 2023 15:04
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ndeloof ndeloof force-pushed the container_log_no_eol branch from a027778 to f7012e1 Compare June 6, 2023 15:09
@ndeloof ndeloof requested review from a team, nicksieger, StefanScherer, ulyssessouza, milas and laurazard and removed request for a team June 6, 2023 15:19
@ndeloof ndeloof force-pushed the container_log_no_eol branch from f7012e1 to a71a3a6 Compare June 6, 2023 15:22
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02 ⚠️

Comparison is base (e21a8d6) 59.79% compared to head (1d15914) 59.77%.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2   #10660      +/-   ##
==========================================
- Coverage   59.79%   59.77%   -0.02%     
==========================================
  Files         107      107              
  Lines        9481     9487       +6     
==========================================
+ Hits         5669     5671       +2     
- Misses       3232     3234       +2     
- Partials      580      582       +2     
Impacted Files Coverage Δ
pkg/utils/writer.go 67.74% <100.00%> (+7.74%) ⬆️

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ndeloof ndeloof force-pushed the container_log_no_eol branch from a71a3a6 to 38bb111 Compare June 6, 2023 16:11
Copy link
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Also 😂 I thought this sounded familiar: #8605 (comment)

@ndeloof ndeloof enabled auto-merge (rebase) June 6, 2023 20:52
@ndeloof ndeloof force-pushed the container_log_no_eol branch from 38bb111 to 26a6109 Compare June 7, 2023 07:33
@ndeloof ndeloof force-pushed the container_log_no_eol branch from 26a6109 to 1d15914 Compare June 7, 2023 08:27
@ndeloof ndeloof merged commit 4bf2fe9 into docker:v2 Jun 7, 2023
@ndeloof ndeloof deleted the container_log_no_eol branch June 7, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] drops last line of container log on exit
4 participants