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 event logger type and function to set event context for writer #5937

Merged
merged 2 commits into from
Jun 4, 2021

Conversation

MarlonGamez
Copy link
Contributor

@MarlonGamez MarlonGamez commented Jun 3, 2021

Related: #5368

Description
Adds event logger type which will turn things passed to it's write function into SkaffoldLogEvents to be sent through the event API v2.

No functional changes here, just adding the functions that will be tied to execution later. Also removes pkg/skaffold/event/v2's reliance on pkg/skaffold/event's Config interface, instead having it's own. This removes an import cycle that was occuring

Follow-up Work (remove if N/A)
Hook these up to an endpoint and set proper event contexts throughout skaffold execution

@MarlonGamez MarlonGamez requested a review from a team as a code owner June 3, 2021 22:33
@MarlonGamez MarlonGamez requested a review from nkubala June 3, 2021 22:33
@google-cla google-cla bot added the cla: yes label Jun 3, 2021
@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #5937 (203acac) into master (aa9b115) will decrease coverage by 0.02%.
The diff coverage is 60.86%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5937      +/-   ##
==========================================
- Coverage   70.66%   70.63%   -0.03%     
==========================================
  Files         454      455       +1     
  Lines       17399    17425      +26     
==========================================
+ Hits        12295    12309      +14     
- Misses       4196     4206      +10     
- Partials      908      910       +2     
Impacted Files Coverage Δ
pkg/skaffold/event/v2/event.go 74.03% <0.00%> (ø)
pkg/skaffold/event/v2/logger.go 52.94% <52.94%> (ø)
pkg/skaffold/output/output.go 80.64% <100.00%> (+3.72%) ⬆️
pkg/skaffold/util/tar.go 50.66% <0.00%> (-5.34%) ⬇️
...ffold/kubernetes/portforward/resource_forwarder.go 78.87% <0.00%> (-1.73%) ⬇️
pkg/skaffold/docker/parse.go 87.14% <0.00%> (+0.95%) ⬆️

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 aa9b115...203acac. Read the comment docs.

@tejal29
Copy link
Contributor

tejal29 commented Jun 4, 2021

Can you add some notes on how to test this out? Shd we see the log message on skaffoldLog endpoint?

@MarlonGamez
Copy link
Contributor Author

@tejal29 this currently isn't hooked up to anything yet, I just wanted to add the functions and types for review to split things up a bit. A follow up to this will actually hook things up and setup certain things like the skaffoldLogs endpoint

@tejal29 tejal29 merged commit f30fcc0 into GoogleContainerTools:master Jun 4, 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.

2 participants