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 builder implementation to 0.1 Builder Spec #945

Open
2 tasks
jromero opened this issue Nov 10, 2020 · 8 comments
Open
2 tasks

Update builder implementation to 0.1 Builder Spec #945

jromero opened this issue Nov 10, 2020 · 8 comments
Assignees
Labels
status/blocked Issue or PR that is blocked. See comments. type/enhancement Issue that requests a new feature or improvement.

Comments

@jromero
Copy link
Member

jromero commented Nov 10, 2020

Description

The builder has recently been spec'd via RFC (official spec upcoming).

Proposed solution

@jromero jromero added type/enhancement Issue that requests a new feature or improvement. status/triage Issue or PR that requires contributor attention. labels Nov 10, 2020
@dfreilich dfreilich added this to the 0.18.0 milestone Jan 25, 2021
@dfreilich dfreilich self-assigned this Feb 9, 2021
@dfreilich
Copy link
Member

In order to be compliant with the specification, we need to make the following changes:

Env

  • The image config's Env field has the environment variable CNB_APP_DIR set to the application directory of the build environment
  • The image config's Env field has the environment variable CNB_LAYERS_DIR set to a directory in the builder
  • The image config's Env field has the environment variable CNB_PLATFORM_DIR set to a directory in the builder
  • The image config's Env field has the environment variable CNB_PLATFORM_DIR set to a directory in the builder
  • The image config's Env field has the environment variable SERVICE_BINDING_ROOT set to a directory in the builder, if any services are bound

New Labels

  • The image config's Labels field has the label io.buildpacks.builder.api, set to 0.1
  • The image config's Labels field has the label io.buildpacks.lifecycle.version, set to the lifecycle version (greater than 0.9.0)
  • The image config's Labels field has the label io.buildpacks.lifecycle.apis, set to a JSON object representing the lifecycle apis (taken from what we currently set within the io.buildpacks.builder.metadata)

The io.buildpacks.lifecycle.apis data should look like:

{
  "buildpack": {
    "deprecated": ["<list of versions>"],
    "supported": ["<list of versions>"]
  },
  "platform": {
    "deprecated": ["<list of versions>"],
    "supported": ["<list of versions>"]
  }
}

Changes to Existing Labels

  • We should change our current io.buildpacks.builder.metadata labels to match the RFC metadata field, by removing the lifecycle top-level key (and all sub information)

Additional Requirements

We should follow all of the spec recommendations for what a build image should look like, which would require us also setting:

  • The image config's Labels field has the label io.buildpacks.stack.maintainer set to the name of the stack maintainer.
  • The image config's Labels field has the label io.buildpacks.stack.homepage set to the homepage of the stack.
  • The image config's Labels field has the label io.buildpacks.stack.distro.name set to the name of the stack's OS distro.
  • The image config's Labels field has the label io.buildpacks.stack.distro.version set to the version of the stack's OS distro.
  • The image config's Labels field has the label io.buildpacks.stack.released set to the release date of the stack.
  • The image config's Labels field has the label io.buildpacks.stack.description set to the description of the stack.
  • The image config's Labels field has the label io.buildpacks.stack.metadata set to additional metadata related to the stack.

@jromero jromero added status/ready Issue ready to be worked on. and removed status/triage Issue or PR that requires contributor attention. labels Mar 3, 2021
@jromero jromero added status/blocked Issue or PR that is blocked. See comments. and removed status/ready Issue ready to be worked on. labels Mar 10, 2021
@jromero
Copy link
Member Author

jromero commented Mar 10, 2021

Waiting for spec PR buildpacks/spec#193 to be approved.

@jromero jromero modified the milestones: 0.18.0, 0.19.0 Mar 10, 2021
@dfreilich dfreilich modified the milestones: 0.19.0, 0.20.0 Jun 15, 2021
@jromero jromero modified the milestones: 0.20.0, 0.21.0 Jul 14, 2021
@jimil749
Copy link
Contributor

Hello @jromero! I am relatively new to buildpacks project, but would love to get involved and potentially contribute. Any pointers to get started?

@jromero
Copy link
Member Author

jromero commented Aug 13, 2021

Here are a few resources I think would help (in some reasonable order):

Places to get help:

  • Slack - #spec is a good channel for this issue, #general works better for general questions
  • Office Hours (we may also discuss ongoing efforts in Working Group meetings)

@jimil749
Copy link
Contributor

Thanks for the elaborated response @jromero! Excited to get started! :)

@jromero
Copy link
Member Author

jromero commented Aug 17, 2021

Update from ongoing conversation:

During our discussion today @ecasey and I came to the realization that maybe we’ve been thinking about the builder spec wrong.

We’d like to propose that the builder is just one of the components that may be produced and distributed as part of the distribution spec.

Envision the distribution spec not only detailing how buildpacks are distributed but also how other components are distributed. ie. “If you want to distribute an image of the run image, it must be done as such.” Same for build image, buildpacks (already in place), lifecycle, etc. Last but not least, distributing a builder would simply refer to the other components it must include plus any additional considerations.

@jromero jromero removed this from the 0.21.0 milestone Aug 25, 2021
@jjbustamante
Copy link
Member

After a bunch of discussion, we ended up creating a PR to add the builder spec to the distribution spec. Once that's done, we can come back to this issue and check what else is required next

@jjbustamante
Copy link
Member

Block by spec PR 363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked Issue or PR that is blocked. See comments. type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

No branches or pull requests

4 participants