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

Update to support 0.10 of the Buildpack API #1730

Open
jwhitcraft opened this issue Oct 13, 2024 · 2 comments
Open

Update to support 0.10 of the Buildpack API #1730

jwhitcraft opened this issue Oct 13, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@jwhitcraft
Copy link

jwhitcraft commented Oct 13, 2024

Hello,

I recently ran into a problem when trying to use the heroku based buildpacks where one of their buildpacks didn't define a stacks section in the buildpack.toml file. Kpack says that it's not supported,

message: "validating buildpack heroku [email protected]: stack heroku-24 is not supported"

In talking with that team, it seems that kpack neesd to be updated to support 0.10 where stacks are optional/deprecated.

This came out of this discussion here: heroku/buildpacks-procfile#243

For reference here is when the pack cli fixed it: buildpacks/pack#2047

Yaml
apiVersion: kpack.io/v1alpha2
kind: ClusterBuilder
metadata:
  name: heroku-242
spec:
  order:
    - group:
        - id: heroku/nodejs
        - id: heroku/procfile
  serviceAccountRef:
    name: kpack
    namespace: kpack
  stack:
    kind: ClusterStack
    name: heroku-24
  store:
    kind: ClusterStore
    name: heroku-24
  tag: 1231232132.dkr.ecr.us-east-2.amazonaws.com/heroku-24-builder
  additionalLabels:
    io.buildpacks.base.distro.name: "ubuntu"
    io.buildpacks.base.distro.version: "24.04"

---

apiVersion: kpack.io/v1alpha2
kind: ClusterStack
metadata:
  name: heroku-24
spec:
  buildImage:
    image: public.ecr.aws/heroku/builder:24
  id: heroku-24
  runImage:
    image: public.ecr.aws/heroku/heroku:24

---

apiVersion: kpack.io/v1alpha2
kind: ClusterStore
metadata:
  name: heroku-24
spec:
  sources:
    - image: heroku/buildpack-nodejs:3.2.15
    - image: heroku/buildpack-procfile:3.1.2
@chenbh
Copy link
Contributor

chenbh commented Oct 17, 2024

This is something we've been meaning to do for a while now and a lot of the work is already in a PR at #1332. But I'm not sure if I (or even @natalieparellano) have the capacity to pick it up again right now.

@natalieparellano
Copy link
Contributor

From what I can tell, the change would need to be made here:

err := bpLayerInfo.supports(buildpackApis, bb.stackId, bb.mixins, relaxedMixinContract(platformApis))

And test updated here (and perhaps in other places):

when("validating buildpacks", func() {

As @chenbh mentioned, the team has been stretched a bit thin, so it may take some time for someone to get to this. However this does seem to be a relatively "good first issue" if anyone would like to take it on, I am sure a maintainer would be happy to support.

@natalieparellano natalieparellano added the good first issue Good for newcomers label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants