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

feat: add support for manifest.yaml at repo/language/template levels #558

Merged
merged 57 commits into from
Oct 27, 2021

Conversation

lance
Copy link
Member

@lance lance commented Sep 24, 2021

Changes

This PR adds the concepts of a manifest.yaml file at the top level of a template repository, again at each language/runtime level, and finally each template. Each of these manifest.yaml files override the configuration applied in a parent. Prior to this, repository metadata was primarily restricted to information that could be gleaned from the file system, such as the directory name used as the Name. This is still possible. For simple language packs, manifest.yaml is optional.

A manifest.yaml file contains a Name, Version, and a list of supported runtimes; and if all of the runtimes expose the same health endpoints, these can be configured in the root manifest.yaml.

Fixes: #452

/kind enhancement
/hold

@knative-prow-robot
Copy link

@lance: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

In response to this:

BREAKING CHANGE
This commit adds the concepts of a manifest.yaml file at the top level
of a template repository, and a runtime.yaml file for each language/runtime
within the repository. Prior to this, repository metadata was primarily
restricted to information that could be gleaned from the file system, such
as the directory name used as the Name.

A manifest.yaml file contains a Name, URL, Version, and a list of supported
runtimes; and if all of the runtimes expose the same health endpoints, these
can be set here.

Within a runtime directory, there may exist a runtime.yaml file which allows
language pack providers to set the health endpoints, overriding the values
set in manifest.yaml, as well as Builders and Buildpacks.

This change removes support for a builders.yaml file in a runtime/template
directory, as this was guaranteed to be redundant with the builders.yaml
file in a sibling template directory. The choice was to move these up a
level to runtime/runtime.yaml.

This is a work in progress - there are still a few tests not working.

Signed-off-by: Lance Ball lball@redhat.com

Changes

/kind

Fixes #

Release Note


Docs


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 24, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 24, 2021
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 24, 2021
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 24, 2021
BREAKING CHANGE
This commit adds the concepts of a manifest.yaml file at the top level
of a template repository, and a runtime.yaml file for each language/runtime
within the repository. Prior to this, repository metadata was primarily
restricted to information that could be gleaned from the file system, such
as the directory name used as the Name.

A manifest.yaml file contains a Name, URL, Version, and a list of supported
runtimes; and if all of the runtimes expose the same health endpoints, these
can be set here.

Within a runtime directory, there may exist a runtime.yaml file which allows
language pack providers to set the health endpoints, overriding the values
set in manifest.yaml, as well as Builders and Buildpacks.

This change removes support for a builders.yaml file in a runtime/template
directory, as this was guaranteed to be redundant with the builders.yaml
file in a sibling template directory. The choice was to move these up a
level to runtime/runtime.yaml.

Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
See: https://golang.org/doc/go1.16

Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 27, 2021
@lance
Copy link
Member Author

lance commented Sep 27, 2021

Note: this PR also makes unit tests explicitly use go 1.16

Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
client_int_test.go Outdated Show resolved Hide resolved
Signed-off-by: Lance Ball <lball@redhat.com>
Adds more detail around how language packs can be provided by third
parties, and the expected structure and metadata required.

Fixes: knative#452

Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow-robot knative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 30, 2021
Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 25, 2021
lance and others added 3 commits October 25, 2021 10:54
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
@google-cla
Copy link

google-cla bot commented Oct 25, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no Indicates the PR's author has not signed the CLA. and removed cla: yes Indicates the PR's author has signed the CLA. labels Oct 25, 2021
Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 25, 2021
@google-cla
Copy link

google-cla bot commented Oct 25, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

Signed-off-by: Lance Ball <lball@redhat.com>
@google-cla
Copy link

google-cla bot commented Oct 25, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@lance
Copy link
Member Author

lance commented Oct 25, 2021

@Shashankft9 I merged your rust/paketo commit into this ridiculously large PR, and now googlebot needs your consent in order to be satisfied. Would you mind? Thanks.

@Shashankft9
Copy link
Member

@googlebot I consent.

@google-cla google-cla bot added cla: yes Indicates the PR's author has signed the CLA. and removed cla: no Indicates the PR's author has not signed the CLA. labels Oct 25, 2021
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Comment on lines +1 to +2
testdata/repository-a.git/objects/*/* ignore-lint=true
testdata/repository.git/objects/*/* ignore-lint=true
Copy link
Member

Choose a reason for hiding this comment

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

Ah hah! 👍🏻

@lkingland
Copy link
Member

If pkged.go is merged in from main, could it be that we are good to go here? 🤞🏻

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2021
Signed-off-by: Lance Ball <lball@redhat.com>
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2021
@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2021
@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance, lkingland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit e319ea3 into knative:main Oct 27, 2021
@lance lance deleted the lance/manifest-yaml branch October 27, 2021 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determine and document expected directory structure for language pack extensions
5 participants