Skip to content

Simplify caching#2452

Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
priyawadhwa:simpler-cache
Jul 12, 2019
Merged

Simplify caching#2452
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
priyawadhwa:simpler-cache

Conversation

@priyawadhwa
Copy link
Copy Markdown
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
Copy Markdown

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