fix: cache key for local images with xp v2.2#111
fix: cache key for local images with xp v2.2#111christophrj wants to merge 6 commits intocrossplane-contrib:mainfrom
Conversation
On-behalf-of: @SAP christopher.junk@sap.com Signed-off-by: Christopher Junk <christopher.junk@sap.com>
On-behalf-of: @SAP christopher.junk@sap.com Signed-off-by: Christopher Junk <christopher.junk@sap.com>
On-behalf-of: @SAP christopher.junk@sap.com Signed-off-by: Christopher Junk <christopher.junk@sap.com>
|
I added a couple of tests to document the cache key behavior. |
schlingemann
left a comment
There was a problem hiding this comment.
Does not work for me currently, I'll do some debugging
On-behalf-of: @SAP christopher.junk@sap.com Signed-off-by: Christopher Junk <christopher.junk@sap.com>
my bad, got lost in my local changes 😄 please try again with the latest commit. |
|
Put back to draft because after another round of testing with @schlingemann we ran into problems with different docker desktop image store settings. I think we need to address this differently and instead of xp-testing trying to figure out whether or not an image has been built locally, a user could simply provide this as a flag into the setup. This should be more robust and support all kinds of local build setups. I just tested this with a 'default' podman desktop installation on macos and the resulting image also didn't have any repo digests, similar to the docker classic image store that has been replaced by the containerd image store default quite some time ago https://docs.docker.com/desktop/release-notes/#4340 |
On-behalf-of: @SAP christopher.junk@sap.com
fixes the cache key for local dev images by skipping the
parsePackageSourceFromReferencepart and instead providing the package name directly tofriendlyIDand adding the local digest in the provider definition to replicate https://github.com/crossplane/build/blob/main/makelib/local.xpkg.mk#L66.Added a couple of tests for documentation and easier debugging in the future. I suggest to add a complete local image build example in case we run into more problems with this.