Skip to content

Refactor caching #1779

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

Merged
merged 7 commits into from
Mar 12, 2019
Merged

Conversation

priyawadhwa
Copy link
Contributor

I refactored caching and moved it into pkg/skaffold/build/cache, as described in #1765

I split up the giant cache.go file into four smaller ones:

  1. cache.go which initializes the Cache type
  2. hash.go which contains all functions related to getting workspace hashes for artifacts
  3. retrieve.go which is responsible for retrieving an artifact from the cache and deciding if it needs to be rebuilt/retagged/repushed and executing those actions
  4. save.go which saves artifacts to the cache

Priya Wadhwa added 5 commits March 8, 2019 11:25
This should organize the cache code while moving it into
pkg/skaffold/build/cache for better organization as well.
functions

also update unit tests to match this change, and move local cluster into
cache struct since it's commonly needed for all artifacts.
@dgageot
Copy link
Contributor

dgageot commented Mar 12, 2019

@priyawadhwa Looks like there's still a few Gofmt errors

@priyawadhwa
Copy link
Contributor Author

priyawadhwa commented Mar 12, 2019

@dgageot the gofmt errors are happening for Go 1.10 but not Go 1.11 (they both require different formats for the same code so it's not possible to comply with both), I think waiting for #1775 to merge could fix this?

@dgageot
Copy link
Contributor

dgageot commented Mar 12, 2019

That's weird...

@dgageot
Copy link
Contributor

dgageot commented Mar 12, 2019

@priyawadhwa Could you rebase?

@codecov-io
Copy link

Codecov Report

Merging #1779 into master will increase coverage by 0.3%.
The diff coverage is 62.21%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1779     +/-   ##
=========================================
+ Coverage    46.4%   46.71%   +0.3%     
=========================================
  Files         132      135      +3     
  Lines        6322     6347     +25     
=========================================
+ Hits         2934     2965     +31     
+ Misses       3087     3083      -4     
+ Partials      301      299      -2
Impacted Files Coverage Δ
pkg/skaffold/build/kaniko/run.go 0% <0%> (ø) ⬆️
pkg/skaffold/plugin/environments/gcb/desc.go 55.1% <0%> (ø) ⬆️
pkg/skaffold/build/cache/save.go 0% <0%> (ø)
pkg/skaffold/runner/runner.go 60.84% <100%> (ø) ⬆️
pkg/skaffold/build/cache/cache.go 65.95% <65.95%> (ø)
pkg/skaffold/build/cache/hash.go 66.66% <66.66%> (ø)
pkg/skaffold/build/cache/retrieve.go 88.09% <88.09%> (ø)
... and 1 more

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 9e0d4b7...26fddaa. Read the comment docs.

@dgageot dgageot merged commit eec4192 into GoogleContainerTools:master Mar 12, 2019
@priyawadhwa priyawadhwa deleted the refactor-caching branch March 12, 2019 19:35
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