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

Add state to event handler to track logrus output events #6272

Merged
merged 2 commits into from
Jul 27, 2021

Conversation

MarlonGamez
Copy link
Contributor

Related: #5368

Description
This PR adds a task field to the eventHandler type to track what the current phase of skaffold is. This is used to populate the SkaffoldLogEvents that come from logrus output.

@MarlonGamez MarlonGamez requested a review from a team as a code owner July 22, 2021 17:47
@MarlonGamez MarlonGamez requested a review from nkubala July 22, 2021 17:47
@google-cla google-cla bot added the cla: yes label Jul 22, 2021
@codecov
Copy link

codecov bot commented Jul 22, 2021

Codecov Report

Merging #6272 (dde1497) into main (533016e) will increase coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6272   +/-   ##
=======================================
  Coverage   70.86%   70.86%           
=======================================
  Files         490      490           
  Lines       22162    22168    +6     
=======================================
+ Hits        15704    15710    +6     
- Misses       5441     5442    +1     
+ Partials     1017     1016    -1     
Impacted Files Coverage Δ
pkg/skaffold/event/v2/logger.go 84.90% <0.00%> (-3.33%) ⬇️
pkg/skaffold/event/v2/event.go 80.27% <100.00%> (+0.27%) ⬆️
pkg/skaffold/docker/parse.go 87.39% <0.00%> (-0.85%) ⬇️
pkg/skaffold/util/tar.go 57.47% <0.00%> (+4.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 533016e...dde1497. Read the comment docs.

@MarlonGamez MarlonGamez changed the title Add state to event handler to track logrus output tasks Add state to event handler to track logrus output events Jul 26, 2021
@nkubala nkubala merged commit 1c5e0a8 into GoogleContainerTools:main Jul 27, 2021
@@ -319,6 +321,7 @@ func TaskInProgress(task constants.Phase, description string) {
handler.skaffoldLogs = []proto.Event{}
}

handler.task = task
Copy link
Contributor

Choose a reason for hiding this comment

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

these assignments will run into race condition

MarlonGamez added a commit that referenced this pull request Jul 27, 2021
MarlonGamez added a commit that referenced this pull request Jul 27, 2021
halvards pushed a commit to halvards/skaffold that referenced this pull request Jul 28, 2021
…tainerTools#6272)

* add state to event handler to track logrus output tasks

* linters
halvards pushed a commit to halvards/skaffold that referenced this pull request Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants