Skip to content

Add new Auto sync option#3382

Merged
loosebazooka merged 10 commits intomasterfrom
auto-sync-setup
Mar 12, 2020
Merged

Add new Auto sync option#3382
loosebazooka merged 10 commits intomasterfrom
auto-sync-setup

Conversation

@loosebazooka
Copy link
Copy Markdown
Member

This is the base code for #3369 and #2901, the minimum required changes to how dev works to make it with the proposed implementation of automatic sync'ing of jib projects

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 13, 2019

Codecov Report

Merging #3382 into master will decrease coverage by 0.01%.
The diff coverage is 69.23%.

Impacted Files Coverage Δ
pkg/skaffold/schema/latest/config.go 100% <ø> (ø) ⬆️
pkg/skaffold/schema/defaults/defaults.go 91.66% <100%> (+0.22%) ⬆️
pkg/skaffold/runner/dev.go 65.48% <33.33%> (-1.18%) ⬇️
pkg/skaffold/build/jib/sync.go 50.98% <33.33%> (ø) ⬆️
pkg/skaffold/sync/sync.go 72% <69.23%> (-0.58%) ⬇️

Copy link
Copy Markdown
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

It LGTM, but I'd rather have this as the last PR from the smaller PRs.
We recommend doing the "user visible" step the last one when all the other functionality is already in place. This way there is no "unimplemented" error on certain features.

@loosebazooka
Copy link
Copy Markdown
Member Author

Requires schema update: #3635

@loosebazooka
Copy link
Copy Markdown
Member Author

So I think I have to initiate a new version thing or whatever, but otherwise this PR should be ready to go.

Perhaps I can move the changes made in: https://github.com/GoogleContainerTools/skaffold/pull/3382/files#diff-565d1f8c97f6be5448e4aa8873b0156dR41-R277

into a new PR though.

@loosebazooka
Copy link
Copy Markdown
Member Author

needs update to config, will be done after next release

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.

this looks really good, I tested it out on the example in integration/testdata and it worked perfectly. should we update one of the jib examples we ship to show this off?

artifacts:
- image: test-file-sync
jib:
type: must-use-profile
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.

:)

@loosebazooka
Copy link
Copy Markdown
Member Author

loosebazooka commented Mar 10, 2020

@nkubala I guess I can move the testdata stuff to examples in a followup PR. But also I need to figure out why this integration test is failing. done

@loosebazooka
Copy link
Copy Markdown
Member Author

loosebazooka commented Mar 11, 2020

Detect server start using output.: done

Co-Authored-By: Balint Pato <balopat@users.noreply.github.com>
return &Item{Image: tag, Copy: toCopy, Delete: toDelete}, nil

default:
// TODO: this error does appear a little late in the build, perhaps it could surface at first run, rather than first sync?
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.

agreed, this could be validated upfront - for now this should be fine, that extra couple of seconds is not really worth pulling this thing only to the validation, also we should validate the config consistently then - which we don't do currently.

Copy link
Copy Markdown
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

LGTM

@corneliusweig
Copy link
Copy Markdown
Contributor

This is great stuff! So nice to see this land.

@briandealwis briandealwis deleted the auto-sync-setup branch April 14, 2020 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants