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

Pre-pull cache-from images #1495

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Jan 20, 2019

Fixes #936

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

@codecov-io
Copy link

codecov-io commented Jan 20, 2019

Codecov Report

Merging #1495 into master will increase coverage by 0.05%.
The diff coverage is 56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1495      +/-   ##
==========================================
+ Coverage   44.87%   44.93%   +0.05%     
==========================================
  Files         115      115              
  Lines        4771     4796      +25     
==========================================
+ Hits         2141     2155      +14     
- Misses       2409     2420      +11     
  Partials      221      221
Impacted Files Coverage Δ
pkg/skaffold/docker/image.go 52.55% <0%> (-4.59%) ⬇️
pkg/skaffold/build/local/docker.go 54.83% <100%> (+37.19%) ⬆️

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 51bcca6...88f1247. Read the comment docs.

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

tjerkw commented Jan 21, 2019

Really nice! We build our own cacheFrom pulling code around skaffold in our ci-pipeline to ensure its fast. This fixes it. Will it also pull new versions even if it has a local image of the specified tag?

@dgageot
Copy link
Contributor Author

dgageot commented Jan 21, 2019

Will it also pull new versions even if it has a local image of the specified tag?

Do you think it should? It currently doesn't but both behaviour would make sense to me. I guess always pulling is more predictable.

@tjerkw
Copy link

tjerkw commented Jan 22, 2019

Will it also pull new versions even if it has a local image of the specified tag?

Do you think it should? It currently doesn't but both behaviour would make sense to me. I guess always pulling is more predictable.

It depends on the context, for us, in our CI environment, we always need to pull, because that local images might be stale.

However for local development, you don't want to pull everytime.

So maybe it could be a flag?
Or, if we need to choose: Dont pull if its locally available, then we can still pre-pull before calling skaffold (thats what we currently doing).

If you always pull, you have to make sure you dont pull the same cacheFrom image twice.
What we do in our scripts, is to gather all cacheFrom images in a Set, so we dont have dups, and then pull them.

@dgageot
Copy link
Contributor Author

dgageot commented Jan 22, 2019

@tjerkw let's merge it as it is and I'll create a ticket to configure 'pull always'

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.

4 participants