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

Embed labelling into Deployers #1463

Merged

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Jan 14, 2019

This makes it easier to implement <> labelling strategies.

@codecov-io
Copy link

codecov-io commented Jan 14, 2019

Codecov Report

Merging #1463 into master will increase coverage by 0.31%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1463      +/-   ##
==========================================
+ Coverage    44.8%   45.11%   +0.31%     
==========================================
  Files         112      112              
  Lines        4638     4637       -1     
==========================================
+ Hits         2078     2092      +14     
+ Misses       2350     2334      -16     
- Partials      210      211       +1
Impacted Files Coverage Δ
pkg/skaffold/deploy/labels.go 9.75% <ø> (+9.75%) ⬆️
pkg/skaffold/runner/notification.go 0% <0%> (ø) ⬆️
pkg/skaffold/deploy/kustomize.go 32.89% <0%> (-1.36%) ⬇️
pkg/skaffold/runner/dev.go 56.52% <0%> (ø) ⬆️
pkg/skaffold/runner/timings.go 15.38% <0%> (+0.38%) ⬆️
pkg/skaffold/deploy/helm.go 64.67% <100%> (+0.32%) ⬆️
pkg/skaffold/runner/runner.go 61.48% <100%> (+0.26%) ⬆️
pkg/skaffold/deploy/kubectl.go 52.12% <72.72%> (+1.57%) ⬆️

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 69776b1...dee1450. Read the comment docs.

@@ -38,7 +37,7 @@ type Deployer interface {

// Deploy should ensure that the build results are deployed to the Kubernetes
// cluster.
Deploy(context.Context, io.Writer, []build.Artifact) ([]Artifact, error)
Deploy(context.Context, io.Writer, []build.Artifact, []Labeller) error
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of passing the labellers as a parameter to the Deploy() call, could we just embed the labellers themselves into the deployer object when we instantiate the deployer in the runner? imo the simpler the method signature the better, especially for something that might be exposed externally (for plugins) in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to go that way first but I felt like labelling is really part of the Deployer's contract so should be visible here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

mmm ok I see your reasoning. sgtm

@dgageot dgageot force-pushed the embed-labelling-deployers branch from baa6cfc to f1683e6 Compare January 15, 2019 10:52
This makes it easier to implement <> labelling
strategies.
@dgageot dgageot force-pushed the embed-labelling-deployers branch from f1683e6 to dee1450 Compare January 17, 2019 13:21
@nkubala nkubala merged commit 753d516 into GoogleContainerTools:master Jan 17, 2019
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.

3 participants