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

feat: add wait group in docker and k8s job logger to avoid race condition #8695

Merged

Conversation

renzodavid9
Copy link
Contributor

Fixes: #8672

Description
This PR adds a wait group in the k8s and docker logger to avoid a race condition when:

  1. We have the loggers running, and
  2. The execution of the containers/jobs finish, and
  3. We trigger the loggers stop to start draining their content

Before, we were draining the logs in the stop step without waiting for the logs triggered during execution to finish.

@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Merging #8695 (90cd6e1) into main (290280e) will decrease coverage by 6.00%.
The diff coverage is 54.27%.

@@            Coverage Diff             @@
##             main    #8695      +/-   ##
==========================================
- Coverage   70.48%   64.48%   -6.00%     
==========================================
  Files         515      615     +100     
  Lines       23150    30991    +7841     
==========================================
+ Hits        16317    19985    +3668     
- Misses       5776     9504    +3728     
- Partials     1057     1502     +445     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 39 more

... and 405 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@renzodavid9 renzodavid9 marked this pull request as ready for review April 20, 2023 20:05
Copy link
Contributor

@aaron-prindle aaron-prindle left a comment

Choose a reason for hiding this comment

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

LGTM!

@aaron-prindle aaron-prindle merged commit aa0ef65 into GoogleContainerTools:main Apr 25, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

skaffold verify when using executionMode: kubernetesCluster {} can have duplicate log output
2 participants