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

Set a different buildpack id, if necessary #403

Merged
merged 1 commit into from
Oct 7, 2021
Merged

Set a different buildpack id, if necessary #403

merged 1 commit into from
Oct 7, 2021

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Oct 7, 2021

Summary

Most buildpacks have a buildpack id that can be extracted from the package id. For example gcr.io/paketo-buildpacks/bellsoft-liberica has a buildpack id of paketo-buildpacks/bellsoft-liberica. This doesn't have to be the case though.

It is possible for the package id to be something like gcr.io/my-buildpacks/bellsoft-liberica but the buildpack id is still paketo-buildpacks/bellsoft-liberica, like if you are making your own custom packages of a buildpack. In this case, to find the correct buildpack id the code will take the laste part of the package id, i.e. bellsoft-liberica and the indicated version, look through buildpack.toml and see if there is a match where some buildpack id ends with last part of the package id and has a matching version. If it locates a fuzzy match, the well use that id. If not, it fails.

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Most buildpacks have a buildpack id that can be extracted from the package id. For example `gcr.io/paketo-buildpacks/bellsoft-liberica` has a buildpack id of `paketo-buildpacks/bellsoft-liberica`. This doesn't have to be the case though.

It is possible for the package id to be something like `gcr.io/my-buildpacks/bellsoft-liberica` but the buildpack id is still `paketo-buildpacks/bellsoft-liberica`, like if you are making your own custom packages of a buildpack. In this case, to find the correct buildpack id the code will take the laste part of the package id, i.e. `bellsoft-liberica` and the indicated version, look through buildpack.toml and see if there is a match where some buildpack id ends with last part of the package id and has a matching version. If it locates a fuzzy match, the well use that id. If not, it fails.

Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa dmikusa added type:bug A general bug semver:patch A change requiring a patch version bump labels Oct 7, 2021
@dmikusa dmikusa requested a review from a team October 7, 2021 20:21
@dmikusa dmikusa merged commit b5fb4d4 into main Oct 7, 2021
@dmikusa dmikusa deleted the dependency-ids branch October 7, 2021 20:24
This was referenced Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant