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 caching #2452

Merged
merged 1 commit into from
Jul 12, 2019
Merged

Conversation

priyawadhwa
Copy link
Contributor

This PR simplifies caching to the following rules, described in my
second design doc for artifact caching:

If remote cluster or push:true :

  1. Check if image exists remotely. If it does, return.
  2. Check if image exists locally. If it does, push.
  3. If not, check if same digest exists locally. If it does, retag and push.
  4. If not, rebuild (via standard build step).

If local cluster, and push:false:

  1. Check if image exists locally. If it does, return.
  2. If not, check if same digest exists locally. If it does, retag.
  3. If not, rebuild (via standard build step).

This PR simplifies caching to the following rules, described in my
second design doc for artifact caching:

If remote cluster or push:true :
 1. Check if image exists remotely.
 2. If not, check if same digest exists locally. If it does, retag and repush.
 3. If not, rebuild and repush.

If local cluster, and push:false:
 1. Check if image exists locally
 2. If not, check if same digest exists locally. If it does, retag.
 3. If not, rebuild
@codecov
Copy link

codecov bot commented Jul 12, 2019

Codecov Report

Merging #2452 into master will decrease coverage by 0.19%.
The diff coverage is 82.08%.

Impacted Files Coverage Δ
pkg/skaffold/build/cache/retrieve.go 77.11% <82.08%> (-9.71%) ⬇️
pkg/skaffold/docker/remote.go 31.25% <0%> (-4.17%) ⬇️

@dgageot dgageot self-assigned this Jul 12, 2019
@dgageot dgageot merged commit b3e079d into GoogleContainerTools:master Jul 12, 2019
@priyawadhwa priyawadhwa deleted the simpler-cache branch July 12, 2019 16:48
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.

3 participants