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

Include buildpack RFC0013 in specification #68

Closed
wants to merge 7 commits into from

Conversation

iainsproat
Copy link

  • Add app source metadata format
  • RFC0013

[#170205764]

Signed-off-by: Shane Huston shuston@pivotal.io

Copy link
Member

@jromero jromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed at comment in the RFC:

The entry point of this data into the lifecycle. We expect the data to be provided by the platform, and for the lifecycle to write it verbatim into the manifest without need to alter or otherwise manipulate the provided data.

This interaction should be spec'd out in the Platform API IMO. Otherwise how this data is propagated could make platforms and lifecycle implementation incompatible.

buildpack.md Outdated Show resolved Hide resolved
buildpack.md Outdated Show resolved Hide resolved
@jkutner
Copy link
Member

jkutner commented Dec 12, 2019

Should we consider changing the key to io.buildpacks.project.source to align with our avoidance of the term "app"? I don't think that requires a new RFC (the spirit of this change is exactly the same)

@sclevine
Copy link
Member

@jkutner Maybe we should create a single io.buildpacks.project label that contains all of the project info, including info about the source?

@iainsproat This is an interface between the platform and the lifecycle (as the platform provides source info to the lifecycle), and therefore should go in platform.md.

@iainsproat
Copy link
Author

@jkutner If folks are happy to change from app to project without re-opening RFC0013 (or starting a whole new RFC!) that would be fine with us. We'll update this PR with that change.

@sclevine We had initially thought about making this PR to the platform / lifecycle interface spec but it didn't seem to be currently documenting anything around the export or output on the OCI image which is why we updated the buildpack spec instead. If we were to PR to the platform spec, would you propose that we need to add a new section with our relevant details?

platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
@iainsproat
Copy link
Author

@jkutner @hone could you please approve or comment on this PR if you have any concerns?
We would like to start implementing this as a PR to the lifecycle code soon.

Copy link
Member

@ekcasey ekcasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My major concern is, in some ways, a critique of the existing platform spec, rather than a critique of how this specific feature is specified. Several lifecycle phases and their flags were previously unspecified. Currently the exporter adds several labels to the generated image that are also unspecified. Adding just this one flag and one label to the specification seems misleading when others are omitted.

I think we should not add this change to the spec at all, until it can be added as part of a major overall of the platform spec. I am okay adding this feature to lifecycle w/o adding it to the spec b/c it is analogous to several similar unspecified lifecycle features.

platform.md Outdated Show resolved Hide resolved
@@ -89,6 +92,18 @@ Where:
- `-group` MUST specify input from a `group.toml` file path as defined in the [Data Format](#data-format) section.
- `-plan` MUST specify input from a Build Plan as defined in the [Buildpack Interface Specification](buildpack.md).

#### Export phase
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the Export phase and it's usage here without also adding the Analyze and Restore phases to the spec seems more confusing to me than omitting all three.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that a bit out of scope of their proposed change, though?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, (at least I think I'm understanding): you're suggesting we don't add it to the spec proper, but instead include the feature in the lifecycle, but leave the exporter out of the spec until we add all three missing phases and generally overhaul the lifecycle in the spec?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy to own updating the platform spec, it's long overdue. Afterward we can accept incremental changes.

Given that this is a specification rather than documentation adding Exporter with just this one flag is more confusing than not having it at all. By choosing to document a single flag we incorrectly imply something about its importance.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is CNB_PLATFORM_DIR part of the spec though if we're reserving that keyword?

platform.md Outdated Show resolved Hide resolved
platform.md Outdated Show resolved Hide resolved
Copy link
Author

@iainsproat iainsproat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekcasey - we agree it would be preferable to have complete documentation. However, in the absence of complete documentation, we'd prefer partial documentation which covers the intent of RFC0013.

For our immediate purposes, we'd be happy to have the implementation merged and then we can merge this PR at a later point once the rest of the specification documentation is complete.

iainsproat and others added 4 commits January 23, 2020 11:27
 - Add app source metadata format
 - [RFC0013](https://github.com/buildpack/rfcs/blob/master/text/0013-app-layer-metadata-source.md)

[#170205764]

Signed-off-by: Shane Huston <shuston@pivotal.io>
Signed-off-by: Velda Conaty <vconaty@pivotal.io>
* Changes will be moved to the platform specification document

This reverts commit 3dc1b44.

Signed-off-by: Velda Conaty <vconaty@pivotal.io>
* Moves the specification from Buildpack document to Platform document
* Adds a new optional `-platform` flag to the lifecycle builder
* Adds a new project.toml input file
* Includes source, source.version, and source.metadata properties to
project.toml
* Provides a new section to specify the Config labels to be added to the OCI
image
* Includes a data type for the "io.buildpacks.project" Config label.

[#170205764]

Signed-off-by: Velda Conaty <vconaty@pivotal.io>
[#170205764]

Signed-off-by: Velda Conaty <vconaty@pivotal.io>
* renamed flag to source-metadata
* created an Export Phase section
* removed redundant quotation marks from label key
* renamed TOML file to source-metadata.toml

[#170205764]

Signed-off-by: Velda Conaty <vconaty@pivotal.io>
* follows comments received on PR
** remove whitespace
** add section to Table of Contents
** Renames `source-metadata` to `project-metadata`

[#170205764]

Signed-off-by: Carlo Colombo <ccolombo@pivotal.io>
Signed-off-by: Velda Conaty <vconaty@pivotal.io>
- Renames OCI image to Exported image

[#170205764]

Signed-off-by: Velda Conaty <vconaty@pivotal.io>
@ekcasey
Copy link
Member

ekcasey commented Jan 23, 2020

@iainsproat l vote for merging after we specify the missing phases

## Exported Image
The Exported image containing the compiled application is generated by the Build Image during the [Export Phase](#export-phase).

If the `/cnb/lifecycle/exporter` is provided with a `project-metadata.toml` file in the Platform directory, the lifecycle MUST add a `io.buildpacks.project` image config label to the Exported image. This label value is encoded JSON format of the `project-metadata.toml` contents, as described in the [data-format](#data-format) section.
Copy link
Member

@sclevine sclevine Feb 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekcasey any thoughts about using io.buildpacks.project.metadata instead of io.buildpacks.project to match the other labels? I noticed this key was already added to the lifecycle.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sclevine that suggestion makes sense to me

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nebhale nebhale added this to the Platform 0.3 milestone May 6, 2020
ekcasey added a commit that referenced this pull request May 13, 2020
* Derived from PR #68
* Paths and label names have been changes to match the concensus arrived at during implementation
  - buildpacks/lifecycle#230
  - buildpacks/lifecycle#257

Signed-off-by: Emily Casey <ecasey@pivotal.io>
@ekcasey ekcasey mentioned this pull request May 13, 2020
@ekcasey
Copy link
Member

ekcasey commented May 13, 2020

Closing in favor of #81

@ekcasey ekcasey closed this May 13, 2020
ekcasey added a commit that referenced this pull request Jun 10, 2020
* Derived from PR #68
* Paths and label names have been changes to match the concensus arrived at during implementation
  - buildpacks/lifecycle#230
  - buildpacks/lifecycle#257

Signed-off-by: Emily Casey <ecasey@pivotal.io>
ekcasey added a commit that referenced this pull request Jun 10, 2020
* Derived from PR #68
* Paths and label names have been changes to match the concensus arrived at during implementation
  - buildpacks/lifecycle#230
  - buildpacks/lifecycle#257

Signed-off-by: Emily Casey <ecasey@pivotal.io>
@ekcasey ekcasey removed this from the Platform 0.3 milestone Jun 24, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants