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

10157 fix goroutine leak v2 #10202

Merged
merged 5 commits into from Jan 26, 2023
Merged

Conversation

AhmedGrati
Copy link
Contributor

What I did
Fixed the goroutine leak, by removing the infinite goroutine that will send colors to the channel, and then refactored the rainbowColor() function inside the colors.go, to replace the logic of the infinite goroutine.

Related issue

Fixes #10157.

Screenshots of testing
Screen Shot 2023-01-25 at 10 07 22 AM

Screen Shot 2023-01-25 at 10 08 51 AM

@laurazard laurazard requested review from a team, nicksieger, ndeloof, StefanScherer, ulyssessouza, glours, milas and laurazard and removed request for a team January 25, 2023 15:41
cmd/formatter/colors.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 25, 2023

Codecov Report

Base: 73.89% // Head: 73.89% // No change to project coverage 👍

Coverage data is based on head (d9d3bfc) compared to base (aa31387).
Patch has no changes to coverable lines.

❗ Current head d9d3bfc differs from pull request most recent head e6ef041. Consider uploading reports for the commit e6ef041 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##               v2   #10202   +/-   ##
=======================================
  Coverage   73.89%   73.89%           
=======================================
  Files           2        2           
  Lines         272      272           
=======================================
  Hits          201      201           
  Misses         60       60           
  Partials       11       11           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@ndeloof ndeloof requested review from a team, nicksieger, StefanScherer, ulyssessouza, glours, milas and laurazard and removed request for a team January 26, 2023 07:08
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.

LGTM

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
@glours glours force-pushed the 10157-fix-goroutine-leak-v2 branch from d9d3bfc to e6ef041 Compare January 26, 2023 10:00
@ndeloof ndeloof merged commit df70735 into docker:v2 Jan 26, 2023
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] goroutine leak in init() of v2/cmd/formatter ?
5 participants