Commit Graph

7 Commits

Author SHA1 Message Date
Natalie Arellano 89a1cfebef
Add history when adding buildpack or extension layers (#1099)
* Add history when adding buildpack or extension layers

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* REVERTME: point imgutil to feature branch

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Parse extension ID from history so that we can output a useful log message

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Avoid extra wrapping

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Bump imgutil

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix acceptance by overriding imgutil methods for "caching image"

We need to add to the launch cache when adding layers so that the next build will be faster

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add tests for layer factory

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add acceptance test for extender should update history

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Move history methods to imgutil

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix exporter acceptance by fixing imgutil

The digest for a remote image from imgutil
should match the digest for a remote image from ggcr
unless the user specifically requested modifications like overriding history

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add acceptance test; fix layer name when there is only one slice

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Bump imgutil

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix acceptance

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix acceptance

imgutil mutates the image (history) for newer platforms, so the SHA is different

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Point imgutil back to commit on main, also bump containerd

Signed-off-by: Natalie Arellano <narellano@vmware.com>

---------

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-05-30 14:35:39 -04:00
Natalie Arellano 8040b9cccb
Fix creator acceptance test flake (#990)
* Use launch cache when calling SaveAs on caching image

- Failure to use the launch cache will result in slower second builds,
  due to the time it takes to pull layers from the daemon
- Improve creator acceptance test

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Try to make test less flakey by forcing first build to be slower

Signed-off-by: Natalie Arellano <narellano@vmware.com>

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-01-26 10:08:25 -05:00
Natalie Arellano 86d84b37ee
Move logic out of cmd/lifecycle/analyzer.go (#805)
* Acceptance tests pass with creator commented out

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix creator

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add unit tests for analyze inputs

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add scaffold for analyzer builder unit tests

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add many unit tests, still have some TODOs

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Address most TODOs

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Acceptance tests pass

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* A few more TODOs

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Bring back go 1.16

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add unit test

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix acceptance tests

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix units

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Remove nolint

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Remove unneeded things

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Use operations pattern

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Refactor tests to take advantage of operations pattern

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add missing tests

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix lint

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Analyzer factory assigns "nop" services by default

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Try to fix registry handler test

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Move new package from cmd/lifecycle/platform to platform/inputs

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Updates per PR review

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Test the platform instead of the exiter

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Combine cmd/lifecycle/platform and platform

With some small changes to avoid an import cycle, we can make a meaningful platform package

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Clean up constructors

Eventually only the platform package should switch on platform api

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Remove ForAnalyzer struct

Having the analyzer factory take a list of args will ensure we don't forget
to update the creator when things change.

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Combine cmd/launcher/platform and platform

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Remove comment

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Remove spec alias

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Move cache metadata back to platform

The lifecycle shouldn't have to depend on the cache package, just the interface

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add comment and remove unused vars

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Add test for buildpack incompatibility error

Signed-off-by: Natalie Arellano <narellano@vmware.com>

* Fix typo

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-05-04 11:45:26 -04:00
Emily Casey 9789d5d13e make param name consistent
* params prefer 'diffID' to 'sha' for specificity
* errors messages prefer 'SHA' to 'diffID' for consistency
  * we should consider changing this convention this later

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-02-03 12:15:42 -05:00
Emily Casey 61d41a0eaa Only calculate layer shas once
* improves exporter performance
* removes unused testmocks

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-02-03 11:58:07 -05:00
Joe Kutner 239917126f
Rename Github org to github.com/buildpacks
Signed-off-by: Joe Kutner <jpkutner@gmail.com>
2019-12-12 10:20:55 -06:00
Emily Casey d5e1a38e07 Exports adds processes to to label
* Adds processes key to io.buildpacks.build.metadata label
* Moves build metadata to lifecycle package

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2019-11-04 09:15:31 -05:00