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

TEP-119 - Add TaskRun Template in v1 PipelineRun #5491

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

JeromeJu
Copy link
Member

@JeromeJu JeromeJu commented Sep 13, 2022

Changes

This commit adds the TaskRunTemplate in v1 PipelineRun Spec. It moves
the serviceAccountName and podTemplate from PipelineRun Spec. The rest
of the TaskRunTemplate fields are to be implemented after releasing v1.

part of #5302
Implementing TEP-119
/kind feature

Submitter Checklist

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

  • [n/a] Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Add `pipelineRun.spec.pipelineTaskRunTemplate` with `serviceAccountName` and `podTemplate`.

@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. 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 Sep 13, 2022
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 13, 2022
@JeromeJu
Copy link
Member Author

JeromeJu commented Sep 13, 2022

Would like to confirm that since for this step we are just moving two fields into a new struct, keeping the existing test cases shall be sufficient with no new unit tests introduced?

/assign @lbernick
cc @yuzp1996

@JeromeJu JeromeJu changed the title Add taskRun template in v1 PipelineRun Add TaskRun Template in v1 PipelineRun Sep 13, 2022
@JeromeJu JeromeJu marked this pull request as draft September 13, 2022 17:10
@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 Sep 13, 2022
@tekton-robot tekton-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Sep 13, 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_conversion.go 95.4% 95.5% 0.0

@JeromeJu JeromeJu marked this pull request as ready for review September 13, 2022 17:49
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 13, 2022
@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/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 13, 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_conversion.go 95.4% 95.5% 0.0

@JeromeJu JeromeJu changed the title Add TaskRun Template in v1 PipelineRun TEP-119 - Add TaskRun Template in v1 PipelineRun Sep 13, 2022
Copy link
Member

@lbernick lbernick left a comment

Choose a reason for hiding this comment

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

can you please also update the v1beta1 -> v1 migration doc?

pkg/apis/pipeline/v1/pipelinerun_types.go Outdated Show resolved Hide resolved
@JeromeJu
Copy link
Member Author

JeromeJu commented Sep 13, 2022

can you please also update the v1beta1 -> v1 migration doc?

Thanks @lbernick. Was right about to ask if I can put those changes (including the compute resources renaming) in this #5466 PR?

@lbernick
Copy link
Member

can you please also update the v1beta1 -> v1 migration doc?

Thanks @lbernick. Was right about to ask if I can put those changes in this #5466 PR?

I'd rather not-- PRs should be self contained and have all the code + docs related to a single change. If you add those docs to your other PR but keep the code changes in this one, when that PR is merged the docs will not match the code.

@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_conversion.go 95.4% 95.5% 0.0

@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_conversion.go 95.4% 95.5% 0.0

docs/migrating-v1beta1-to-v1.md Outdated Show resolved Hide resolved
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lbernick

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 Sep 14, 2022
@vdemeester
Copy link
Member

The rest of the TaskRunTemplate fields are to be implemented after releasing v1.

I am not sure I understand why "after" ?

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 15, 2022
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 15, 2022
@JeromeJu
Copy link
Member Author

Thanks @vdemeester for the comment. My take is that PodTemplate and ServiceAccountName are moved before the release to avoid back compatible issues as we would not want to support them in v1 pipelinerun.spec. Could you help confirm my understanding here @lbernick ?

@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_conversion.go 95.4% 95.5% 0.0

@lbernick
Copy link
Member

Thanks @vdemeester for the comment. My take is that PodTemplate and ServiceAccountName are moved before the release to avoid back compatible issues as we would not want to support them in v1 pipelinerun.spec. Could you help confirm my understanding here @lbernick ?

Yes. The distinction here is that we don't have a great way to support the planned new fields taskRunTemplate.metadata, taskRunTemplate.computeResources, etc, until we swap the stored version of our CRDs to v1. However, this isn't something the user needs to know about, so I suggest removing the line from the docs about when those features will be added.

This commit adds the TaskRunTemplate in v1 PipelineRun Spec. It moves
the serviceAccountName and podTemplate from PipelineRun Spec. The rest
of the TaskRunTemplate fields are to be implemented after releasing v1.
@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_conversion.go 95.4% 95.5% 0.0

@abayer
Copy link
Contributor

abayer commented Sep 15, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 15, 2022
@tekton-robot tekton-robot merged commit d15e5c4 into tektoncd:main Sep 15, 2022
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants