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

Define v1alpha1 Run type and generated scaffolding #2871

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

imjasonh
Copy link
Member

@imjasonh imjasonh commented Jun 27, 2020

This defines the basic Run type, which will be used to specify
executions of Custom Tasks and report status of those executions.

This change doesn't wire the new type in to any controllers or
validating webhooks, so that this time nothing will happen when a Run is
created. It also doesn't wire in to PipelineRun execution to enable
Pipelines to specify Custom Tasks.

This is groundwork to enable TEP 0002 and enable further experimentation. This type may change in breaking ways as a result of that experimentation and further iteration on the design.

Next steps: moar samples!!, webhook-validate Runs, enforce initial update timeout in controller, create Runs from PipelineRuns, omgsomanytests

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • [y] Includes tests (if functionality changed/added)
  • [n/a] Includes docs (if user facing)
  • [y] Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Define a new Run type to describe executions of Custom Tasks

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 27, 2020
@tekton-robot tekton-robot requested review from afrittoli and a user June 27, 2020 04:06
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 27, 2020
@tekton-robot
Copy link
Collaborator

This PR cannot be merged: expecting exactly one kind/ label

Available kind/ labels are:

kind/question: Issues or PRs that are questions around the project or a particular feature
kind/bug: Categorizes issue or PR as related to a bug.
kind/flake: Categorizes issue or PR as related to a flakey test
kind/cleanup: Categorizes issue or PR as related to cleaning up code, process, or technical debt.
kind/design: Categorizes issue or PR as related to design.
kind/documentation: Categorizes issue or PR as related to documentation.
kind/feature: Categorizes issue or PR as related to a new feature.
kind/misc: Categorizes issue or PR as a miscellaneuous one.

2 similar comments
@tekton-robot
Copy link
Collaborator

This PR cannot be merged: expecting exactly one kind/ label

Available kind/ labels are:

kind/question: Issues or PRs that are questions around the project or a particular feature
kind/bug: Categorizes issue or PR as related to a bug.
kind/flake: Categorizes issue or PR as related to a flakey test
kind/cleanup: Categorizes issue or PR as related to cleaning up code, process, or technical debt.
kind/design: Categorizes issue or PR as related to design.
kind/documentation: Categorizes issue or PR as related to documentation.
kind/feature: Categorizes issue or PR as related to a new feature.
kind/misc: Categorizes issue or PR as a miscellaneuous one.

@tekton-robot
Copy link
Collaborator

This PR cannot be merged: expecting exactly one kind/ label

Available kind/ labels are:

kind/question: Issues or PRs that are questions around the project or a particular feature
kind/bug: Categorizes issue or PR as related to a bug.
kind/flake: Categorizes issue or PR as related to a flakey test
kind/cleanup: Categorizes issue or PR as related to cleaning up code, process, or technical debt.
kind/design: Categorizes issue or PR as related to design.
kind/documentation: Categorizes issue or PR as related to documentation.
kind/feature: Categorizes issue or PR as related to a new feature.
kind/misc: Categorizes issue or PR as a miscellaneuous one.

@imjasonh imjasonh added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 27, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 91.7%

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 91.7%

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 91.7%

@imjasonh imjasonh force-pushed the run-types branch 2 times, most recently from e7a2be7 to 8e9f758 Compare July 5, 2020 13:40
@imjasonh imjasonh changed the title [WIP] Define v1alpha1 Run type and generated scaffolding Define v1alpha1 Run type and generated scaffolding Jul 5, 2020
@tekton-robot tekton-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 5, 2020
@imjasonh imjasonh added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 5, 2020
@tekton-robot tekton-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 5, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 91.7%

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 91.7%

@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 5, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 30.8%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 91.7%

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 30.8%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 92.9%

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 30.8%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 92.9%

@imjasonh
Copy link
Member Author

imjasonh commented Jul 7, 2020

/retest

config/300-run.yaml Outdated Show resolved Hide resolved
pkg/controller/filter.go Outdated Show resolved Hide resolved
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 30.8%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 92.9%

@imjasonh imjasonh removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2020
@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 30.8%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 92.9%

@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2020
@imjasonh
Copy link
Member Author

imjasonh commented Jul 7, 2020

/retest

🙄

This defines the basic Run type, which will be used to specify
executions of Custom Tasks and report status of those executions.

This change doesn't wire the new type in to any controllers or
validating webhooks, so that this time nothing will happen when a Run is
created. It also doesn't wire in to PipelineRun execution to enable
Pipelines to specify Custom Tasks.
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/run_defaults.go Do not exist 0.0%
pkg/apis/pipeline/v1alpha1/run_types.go Do not exist 14.3%
pkg/apis/pipeline/v1alpha1/run_validation.go Do not exist 92.9%

@imjasonh imjasonh requested review from vdemeester and afrittoli and removed request for vdemeester July 8, 2020 10:27
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/lgtm

// - workspaces ?
}

// TODO(jasonhall): Move this to a Params type so other code can use it?
Copy link
Member

Choose a reason for hiding this comment

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

👍

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2020
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thanks!!

It might be good to have a doc / comment somewhere explaining that the new CRD is not yet plumbed to any controller, and it cannot be used for now. Not blocking this PR anyways.

/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2020
@tekton-robot tekton-robot merged commit df306ee into tektoncd:master Jul 8, 2020
@bobcatfish
Copy link
Collaborator

@afrittoli mentioned this in slack but before merging I would have liked to include docs explaining these new fields - with our goal to be always in a releasable state, we'd want to make sure that if for some reason we cut a release tomorrow, there'd be an adequate explanation for users of why these types were added and do nothing ( @pritidesai did a great job of this with #2650)

Also kinda related to the 2 reviewer conversation in slack, our policy for additive API changes is that they be approved by at least 2 OWNERS (https://github.com/tektoncd/pipeline/blob/master/api_compatibility_policy.md#additive-changes). Maybe jason + andrea counts, but I'd really like to get more eyes on API changes in general (selfishly: my own :D)

@bobcatfish
Copy link
Collaborator

Not blocking this PR anyways.

i think the docs should block the PR (in the spirit of being always releasable)

Copy link
Collaborator

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

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

Very excited to see this in! I would really like to see accompanying docs asap (just starting to provide a bare minimum overview of the feature in progress and the current status)

TaskRunControllerName = "TaskRun"

// TaskRunControllerName holds the name of the PipelineRun controller
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think the comment is a copy pasta error

TaskRunControllerName = "TaskRun"

// TaskRunControllerName holds the name of the PipelineRun controller
RunControllerName = "Run"
Copy link
Collaborator

Choose a reason for hiding this comment

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

what does run controller name mean here?

}
)

// RunSpec defines the desired state of Run
Copy link
Collaborator

Choose a reason for hiding this comment

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

can this docstring and the others in this file elaborate on what a Run is?

return nil
}

type RunStatus struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can has docstrings for all exported types plz

// separately and inlined so that other types can readily consume these fields
// via duck typing.
type RunStatusFields struct {
// StartTime is the time the build is actually started.
Copy link
Collaborator

Choose a reason for hiding this comment

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

some copy pasta in these i think (our old friend build)


var _ apis.Validatable = (*Run)(nil)

// Validate taskrun
Copy link
Collaborator

Choose a reason for hiding this comment

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

copy pasta?

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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants