Skip to content

Cleanup only if something was actually deployed #1343

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

Merged
merged 3 commits into from
Nov 30, 2018

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Nov 30, 2018

Fix #812

@codecov-io
Copy link

codecov-io commented Nov 30, 2018

Codecov Report

Merging #1343 into master will decrease coverage by 0.02%.
The diff coverage is 30.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1343      +/-   ##
==========================================
- Coverage   44.78%   44.75%   -0.03%     
==========================================
  Files         114      114              
  Lines        4890     4902      +12     
==========================================
+ Hits         2190     2194       +4     
- Misses       2477     2485       +8     
  Partials      223      223
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/dev.go 0% <0%> (ø) ⬆️
pkg/skaffold/runner/runner.go 55.26% <46.66%> (+0.3%) ⬆️

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 f437bfc...1c7c212. Read the comment docs.

@@ -260,6 +266,13 @@ func (r *SkaffoldRunner) BuildAndTest(ctx context.Context, out io.Writer, artifa
return bRes, err
}

// Deploy deployes the given artifacts
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/deployes/deploys

// Deploy deployes the given artifacts
func (r *SkaffoldRunner) Deploy(ctx context.Context, out io.Writer, artifacts []build.Artifact) ([]deploy.Artifact, error) {
dRes, err := r.Deployer.Deploy(ctx, out, artifacts)
r.hasDeployed = true
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it's not different than what we had before, but if Deploy() errors out do we want to set this flag?

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 guess it could fail and have deployed a few things. We want to clean this up

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, not really a good way to know whether or not that's the case so let's just be safe.

@dgageot dgageot merged commit a314b3e into GoogleContainerTools:master Nov 30, 2018
@dgageot dgageot deleted the fix-812 branch December 28, 2018 07:13
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