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

Simplify doDev() #2815

Merged
merged 1 commit into from
Sep 6, 2019
Merged

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Sep 5, 2019

Signed-off-by: David Gageot [email protected]

@codecov
Copy link

codecov bot commented Sep 5, 2019

Codecov Report

Merging #2815 into master will decrease coverage by 0.01%.
The diff coverage is 66.66%.

Impacted Files Coverage Δ
pkg/skaffold/runner/dev.go 66.66% <66.66%> (-1.48%) ⬇️

Signed-off-by: David Gageot <[email protected]>
Copy link
Contributor

@nkubala nkubala left a comment

Choose a reason for hiding this comment

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

yeah this actually looks really good, just one comment around the case where skaffold.yaml has changed

@@ -34,30 +34,30 @@ import (
var ErrorConfigurationChanged = errors.New("configuration changed")

func (r *SkaffoldRunner) doDev(ctx context.Context, out io.Writer) error {
actionPerformed := false
if r.changeSet.needsReload {
return ErrorConfigurationChanged
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want the logs muted during this time right? otherwise we'll have deployment logs interleaved with the build/deploy logs from the new skaffold runner.

also, r.changeSet.resetReload()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In fact, the logs will be stopped when this function returns: here.
Also, a new runner, with a new changeset will be created.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should write tests expressing these expectations.
It seems that there was no log muting in the current version - but I think I agree that interleaving might happen - are you suggesting adding log muting?

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh very nice, thanks for clarifying. this is much cleaner! 👍

Copy link
Contributor

@nkubala nkubala left a comment

Choose a reason for hiding this comment

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

good stuff!

@balopat balopat merged commit a977c83 into GoogleContainerTools:master Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants