paketo-buildpacks / libpak

An opinionated extension to the libcnb Cloud Native Buildpack Library
Apache License 2.0
15 stars 17 forks source link

create-package with dependency doesn't work #288

Closed showpune closed 11 months ago

showpune commented 11 months ago

Expected Behavior

When to use the create-package by

go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package@v1.66.2

The targe folder looks image

Current Behavior

When to use the create-package by

go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package@latest

image

Possible Solution

Steps to Reproduce

1.

Motivations

dmikusa commented 11 months ago

This change is expected based on #273. The URLs under certain conditions could result in file names that are too long or would fail for other reasons.

Is this causing your create-package run to fail? Or are you just curious why the file name has changed? Thanks

showpune commented 11 months ago

Using the offline BP created by latest create-package, there are errors thrown the cache files not found when to build an image. The offline BP use the libpak with version 1.67

dmikusa commented 11 months ago

Oh, I think I see what you mean. Yes, if you have buildpacks built with older libpak's, then you're going to need to continue packaging with older create-package. That wasn't something that we anticipated, I apologize for that. I'll add a note on the release page.

We'll make sure to bump all the buildpacks this week & get them released in our Friday release cycle. That should take care of this and everything should start working with the latest create-package again.

showpune commented 11 months ago

Thanks a lot. Which version do we need to upgrade the libpak to if we use the latest create-package cmd?

dmikusa commented 11 months ago

Which version do we need to upgrade the libpak verison to if we use the latest create-package cmd?

If you have your own buildpacks, please update them to use libpak 1.67.0+ (1.67.0 is latest at the time of writing). Then you can use create-package from 1.67.0+.

If you do not control your buildpacks, like you are having this issue with Paketo buildpacks, you can either wait till Friday when we'll have the buildpacks updated, or you can downgrade create-package to use 1.66.2 or older.

c0d1ngm0nk3y commented 11 months ago

@dmikusa Wouldn't it be better to remove a breaking release again, so that no new users run into that problem? Adding this fix to v2 would have been fine. That's what semver is for, isn't it?

dmikusa commented 11 months ago

If we had no other option, we could have pulled the release, but there are a couple of reasons we didn't.

  1. You'll only hit this if you're building offline buildpacks. Not to trivialize their involvement in the community, but we know this to be a smaller subset of the community.
  2. It only happens if you mix versions of libpak. This happens if you're installing create-package with @latest because it will pull in the new version of libpak. While that's convenient, it's also playing with fire and things like this can come up.
  3. We have buildpack releases going out today that will fix this problem, so it should not be a problem going forward. The releases all upgrade to latest libpak, so tools & buildpacks are in alignment.
dmikusa commented 11 months ago

@showpune Can you update to today's buildpacks and confirm that this resolves this issue? Releases should be out shortly. thanks

showpune commented 11 months ago

@dmikusa thanks and I verified it in my system and the cache works now