Skip to content

Add 'volume' cache format support for --cache flag #1490

Merged
jromero merged 2 commits intobuildpacks:mainfrom
imnitishng:cache-flag/build-volume-cache
Jul 27, 2022
Merged

Add 'volume' cache format support for --cache flag #1490
jromero merged 2 commits intobuildpacks:mainfrom
imnitishng:cache-flag/build-volume-cache

Conversation

@imnitishng
Copy link
Copy Markdown
Contributor

@imnitishng imnitishng commented Jul 23, 2022

Summary

  • Add support for --cache flag using format=volume
  • If a volume name is specified as input then the named volume is created for the respective cache type
  • If no volume name is specified as input then random string with cache type suffix is used (old behavior).
  • If no flags are provided then cache format defaults to pack build --cache='type=build;format=volume;name=<random_name>;type=launch;format=volume;name=<random_name>;' as per the RFC

Output

Before

After

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

Related

Resolves #1472
Resolves #1471

@imnitishng imnitishng requested a review from a team as a code owner July 23, 2022 06:12
@github-actions github-actions Bot added this to the 0.28.0 milestone Jul 23, 2022
@github-actions github-actions Bot added the type/enhancement Issue that requests a new feature or improvement. label Jul 23, 2022
- Extend support for `--cache` flag to volume cache format for both
  build and launch cache types

Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
@imnitishng imnitishng force-pushed the cache-flag/build-volume-cache branch 2 times, most recently from 1a298d6 to e106b28 Compare July 24, 2022 07:03
@imnitishng imnitishng changed the title Cache flag/build volume cache Add 'volume' cache format support for --cache flag Jul 24, 2022
@imnitishng imnitishng force-pushed the cache-flag/build-volume-cache branch from e106b28 to 6207008 Compare July 24, 2022 07:09
Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
@imnitishng imnitishng force-pushed the cache-flag/build-volume-cache branch from 6207008 to 1eb52c0 Compare July 24, 2022 07:11
@github-actions github-actions Bot added the type/chore Issue that requests non-user facing changes. label Jul 24, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 24, 2022

Codecov Report

Merging #1490 (1eb52c0) into main (30de289) will decrease coverage by 1.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1490      +/-   ##
==========================================
- Coverage   81.37%   80.35%   -1.02%     
==========================================
  Files         152      152              
  Lines        9864     9864              
==========================================
- Hits         8026     7925     -101     
- Misses       1361     1462     +101     
  Partials      477      477              
Flag Coverage Δ
os_linux 80.14% <100.00%> (+0.02%) ⬆️
os_macos 77.52% <80.00%> (-0.03%) ⬇️
os_windows 80.22% <100.00%> (-1.02%) ⬇️
unit 80.35% <100.00%> (-1.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@imnitishng imnitishng requested a review from dfreilich July 25, 2022 18:36
@jromero
Copy link
Copy Markdown
Member

jromero commented Jul 27, 2022

✅ Approved

✅ Existing functionality / defaults

Screen Shot 2022-07-27 at 10 03 07 AM

Screen Shot 2022-07-27 at 10 02 29 AM

✅ Specifying build volume via flag

Screen Shot 2022-07-27 at 10 04 40 AM

✅ Specifying build volume via flag (defaults)

Screen Shot 2022-07-27 at 10 07 49 AM

✅ Custom volume name (build)

Screen Shot 2022-07-27 at 10 09 45 AM

Screen Shot 2022-07-27 at 10 11 24 AM

✅ Custom volume names (build and launch)

Screen Shot 2022-07-27 at 10 12 41 AM

Screen Shot 2022-07-27 at 10 21 48 AM

@jromero jromero merged commit 7ff6918 into buildpacks:main Jul 27, 2022
@jromero jromero removed the type/chore Issue that requests non-user facing changes. label Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement Issue that requests a new feature or improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cache-flag] Support launch volume cache [cache-flag] Support build volume cache

2 participants