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

Combine exporter and cacher phases #205

Merged
merged 4 commits into from
Nov 26, 2019

Conversation

lukasberger
Copy link
Contributor

@lukasberger lukasberger commented Oct 24, 2019

Combines the exporter and cacher phases to reuse layer tarballs.

  • Move logic from cacher.go to exporter.go.
  • Move tests from cacher_test.go to exporter_test.go.
  • Rename cache image flag from '-image' to '-cache-image'.
  • Rename cache directory flag from '-path' to '-cache-dir'.
  • Remove unused 'In' field of the Exporter struct.
  • Remove cacher implementation, tests, and command.
  • Upgrade Platform API version to 0.2 as this PR contains breaking changes.

Part of the implementation of buildpacks/rfcs#21.

Signed-off-by: Lukas Berger [email protected]

@jkutner
Copy link
Member

jkutner commented Oct 28, 2019

This will mean a breaking change for pack, which is probably fine, but we could consider avoiding it or allowing a grace period (maybe until we can combine it with other breaking changes). We could do the following methinks:

  • Leave the cacher in place
  • Allow -path on restorer but ignore it (or use it when -cache-dir isn't provided)
  • Because pack won't pass -cache-image to exporter it won't create the cache

I think we're probably still at an ok place to make breaking changes, but if this were to be the only breaking in change in a release I would want us to consider ^

Combines the exporter and cacher phases to reuse layer tarballs.

* Move logic from cacher.go to exporter.go.
* Move tests from cacher_test.go to exporter_test.go.
* Rename cache image flag from '-image' to '-cache-image'.
* Rename cache directory flag from '-path' to '-cache-dir'.
* Remove unused 'In' field of the Exporter struct.
* Remove cacher implementation, tests, and command.

Signed-off-by: Lukas Berger <[email protected]>
@lukasberger lukasberger force-pushed the combined-exporter-cacher branch from 21c50a4 to 7071c70 Compare November 13, 2019 00:25
Signed-off-by: Lukas Berger <[email protected]>
@ekcasey
Copy link
Member

ekcasey commented Nov 25, 2019

@lukasberger I approved this and #207. This one could use a tiny bit of cleanup once it can be rebased on #207 (see comments).

I think we need pack to work with platform API 0.2 before we can merge either of these to master or we will lose the ability to test master of lifecycle with pack. You mentioned you were working on those pack changes in parallel with these lifecycle changes. Do you plan to submit that PR or should we find somebody else to do it?

@lukasberger
Copy link
Contributor Author

@ekcasey The pack changes were merged in buildpacks/pack#384. Depending on how everyone else feels about the flag name cleanup that @jromero proposed being part of this PR, I can make the changes in pack as well. Regarding the cleanup, did you mean after #207 is merged, or do you want me to rebase this PR on top of the other branch?

@ekcasey
Copy link
Member

ekcasey commented Nov 26, 2019

@lukasberger Now that I realize the changes are already merge in pack I am inclined to merge both of these at once (merging just one of them will put us in a breaking state).

After they are merged you (or another contributor) can open a PR refactoring cmd/exporter/main.go to use cache.NewImageCacheFromName from the other PR.

@ekcasey ekcasey merged commit 7017682 into buildpacks:master Nov 26, 2019
@jromero jromero added this to the 0.6.0 milestone Jan 9, 2020
@jromero jromero modified the milestones: 0.6.0, lifecycle-0.6.0 Jan 15, 2020
@zmackie zmackie self-assigned this Jan 16, 2020
@ekcasey ekcasey mentioned this pull request Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Known to be non-backwards compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants