Skip to content

Simplify doDev()#2815

Merged
balopat merged 1 commit intoGoogleContainerTools:masterfrom
dgageot:simplify-dodev
Sep 6, 2019
Merged

Simplify doDev()#2815
balopat merged 1 commit intoGoogleContainerTools:masterfrom
dgageot:simplify-dodev

Conversation

@dgageot
Copy link
Copy Markdown
Contributor

@dgageot dgageot commented Sep 5, 2019

Signed-off-by: David Gageot david@gageot.net

@codecov
Copy link
Copy Markdown

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 <david@gageot.net>
Copy link
Copy Markdown
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

func (r *SkaffoldRunner) doDev(ctx context.Context, out io.Writer) error {
actionPerformed := false
if r.changeSet.needsReload {
return ErrorConfigurationChanged
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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