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

Add Step and Sidecar Overrides to TaskRun API #4575

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

lbernick
Copy link
Member

@lbernick lbernick commented Feb 14, 2022

Changes

This commit adds TaskRunStepOverrides and TaskRunSidecarOverrides to TaskRun.Spec and
PipelineRun.Spec.PipelineTaskRunSpec, gated behind the "alpha" API flag.
This is part 1 of implementing TEP-0094: Configuring Resource Requirements at Runtime.
Part 1 of #4326.

/kind feature

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

[Feature] Adds API fields for Step and Sidecar Overrides to TaskRun. This feature is not yet implemented.

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/feature Categorizes issue or PR as related to a new feature. labels Feb 14, 2022
@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Feb 14, 2022
@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/v1beta1/pipelinerun_validation.go 98.6% 98.9% 0.2

@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/v1beta1/pipelinerun_validation.go 98.6% 98.9% 0.2

@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/v1beta1/pipelinerun_validation.go 98.6% 98.9% 0.2

@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/v1beta1/pipelinerun_validation.go 98.6% 98.9% 0.2

@ghost
Copy link

ghost commented Feb 15, 2022

/lgtm

@tekton-robot tekton-robot assigned ghost Feb 15, 2022
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2022
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2022
@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/v1beta1/pipelinerun_validation.go 98.6% 98.9% 0.2

@ghost
Copy link

ghost commented Feb 15, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2022
@afrittoli
Copy link
Member

It looks like this might not make it for v0.33.0 - is that ok for you @lbernick ?

@lbernick
Copy link
Member Author

It looks like this might not make it for v0.33.0 - is that ok for you @lbernick ?

that's fine!

This commit adds TaskRunStepOverrides and TaskRunSidecarOverrides to TaskRun.Spec and
PipelineRun.Spec.PipelineTaskRunSpec, gated behind the "alpha" API flag.
This is part 1 of implementing TEP-0094: Configuring Resource Requirements at Runtime.
https://github.com/tektoncd/community/blob/main/teps/0094-configuring-resources-at-runtime.md
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2022
@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/v1beta1/pipelinerun_validation.go 98.6% 98.9% 0.2

@ghost
Copy link

ghost commented Feb 16, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2022
@pritidesai
Copy link
Member

@lbernick please add release notes 📝 It will be easier for folks to understand the changes since its labeled as a feature 🙏

@afrittoli
Copy link
Member

@lbernick please add release notes 📝 It will be easier for folks to understand the changes since its labeled as a feature 🙏

In my understanding this change introduces the API change, documentation and validation, but no actual functionality.
Since the docs are in though, if we merged this we should say in the release notes that the feature is not actually available yet (as stated in the docs).

@afrittoli
Copy link
Member

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 17, 2022
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 @lbernick, it looks good!

If you could update the release notes before I run the release, or I can also add them to the PR description if you'd like.

/approve

Comment on lines +451 to +452
`StepOverrides` and `SidecarOverrides` must include the `name` field and may include `resources`.
No other fields can be overridden.
Copy link
Member

Choose a reason for hiding this comment

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

NIT: maybe worth mentioning that it is not possible to override resources for steps that don't have a name

Comment on lines +517 to +518
StepOverrides []TaskRunStepOverride `json:"stepOverrides,omitempty"`
SidecarOverrides []TaskRunSidecarOverride `json:"sidecarOverrides,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

NIT: I assume that if a PipelineRun that specifies any of these was fetched via the v1alpha1 API, it would lose them, which I think it probably fine, but I wonder if we should document somewhere clearly what are the fields in v1beta which are not in v1alpha and that would be lost when fetching/updating via v1alpha1. /cc @sbwsg @vdemeester

Not something we need to fix as part of this PR, it just came to mind seeing the new fields 🙏

errs = errs.Also(apis.ErrMultipleOneOf("name").ViaKey(p.Name))
names = append(names, p.Name)
}
return validateNoDuplicateNames(names, false)
Copy link
Member

Choose a reason for hiding this comment

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

Nice :)

@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 Feb 17, 2022
@afrittoli
Copy link
Member

I added a "hold" because of the release notes, but in fact those can be modified also after the merge, as long as it's done before the release notes are generated.

@afrittoli
Copy link
Member

/hold cancel

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesnt merit a release note. labels Feb 17, 2022
@lbernick
Copy link
Member Author

@lbernick please add release notes 📝 It will be easier for folks to understand the changes since its labeled as a feature 🙏

In my understanding this change introduces the API change, documentation and validation, but no actual functionality. Since the docs are in though, if we merged this we should say in the release notes that the feature is not actually available yet (as stated in the docs).

Done!

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.

4 participants