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

Set meter.Command before an error could occur with createNewRunner #5168

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

IsaacPD
Copy link
Contributor

@IsaacPD IsaacPD commented Dec 17, 2020

Merge after: #5157

Description

This change is necessary so we can correctly report the frequency of errors that occur before creating the runner and associate a command with them.

  • Add contains function to util.StringSet and use that instead of map[string]bool to check if a command builds/deploys/should collect metrics.
  • Set meter.Command in cobra PersistentPreFuncE instead of createNewRunner as the command should be available before any errors occur when creating the runner

@IsaacPD IsaacPD requested a review from a team as a code owner December 17, 2020 22:23
@IsaacPD IsaacPD requested a review from tejal29 December 17, 2020 22:23
@google-cla google-cla bot added the cla: yes label Dec 17, 2020
@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

Merging #5168 (63f0d83) into master (30e7eab) will increase coverage by 0.01%.
The diff coverage is 58.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5168      +/-   ##
==========================================
+ Coverage   71.85%   71.86%   +0.01%     
==========================================
  Files         384      384              
  Lines       13729    13734       +5     
==========================================
+ Hits         9865     9870       +5     
+ Misses       3138     3137       -1     
- Partials      726      727       +1     
Impacted Files Coverage Δ
pkg/skaffold/instrumentation/meter.go 24.11% <37.50%> (+1.09%) ⬆️
cmd/skaffold/app/cmd/cmd.go 66.41% <100.00%> (+0.25%) ⬆️
cmd/skaffold/app/cmd/runner.go 68.29% <100.00%> (ø)
pkg/skaffold/util/stringset.go 100.00% <100.00%> (ø)

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 30e7eab...63f0d83. Read the comment docs.

@tejal29
Copy link
Contributor

tejal29 commented Dec 17, 2020

Please rebase. Thanks!

@tejal29 tejal29 merged commit 531adb6 into GoogleContainerTools:master Dec 22, 2020
@tejal29 tejal29 added the area/metrics Metrics tracking work for skaffold label Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics Metrics tracking work for skaffold cla: yes size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants