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

Remove deprecated PipelineRun.Spec.ServiceAccountNames field. #4988

Merged

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Jun 15, 2022

Changes

Finishing up #2614

We had multiple ways to specify the serviceAccountName for PipelineTasks - the original PipelineRun.Spec.ServiceAccountNames, and the more general PipelineRun.Spec.TaskRunSpecs, which also allows specifying a pod template, metadata, and container overrides for individual steps and sidecars. Therefore, we deprecated ServiceAccountNames, and are now removing it.

This has been scheduled for removal since May 2021.

/kind cleanup

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
    (if there are no user facing changes, use release note "NONE")

Release Notes

Removes deprecated `PipelineRun.Spec.ServiceAccountNames` field; use `PipelineRun.Spec.TaskRunSpecs` instead.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jun 15, 2022
@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 15, 2022
@abayer
Copy link
Contributor Author

abayer commented Jun 15, 2022

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

/retest

@abayer
Copy link
Contributor Author

abayer commented Jun 15, 2022

/retest

@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/pipelinerun_conversion.go 86.8% 86.3% -0.5
pkg/apis/pipeline/v1alpha1/pipelinerun_types.go 90.6% 89.3% -1.3
pkg/apis/pipeline/v1beta1/pipelinerun_types.go 86.5% 85.9% -0.6
pkg/reconciler/pipelinerun/pipelinerun.go 86.1% 86.4% 0.3
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.4% 94.3% -0.2

}
}
return serviceAccountName
func (pr *PipelineRun) GetServiceAccountName() string {
Copy link
Member

Choose a reason for hiding this comment

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

This function can probably just be removed

@@ -645,7 +643,7 @@ Consult the documentation of the custom task that you are using to determine whe

### Mapping `ServiceAccount` credentials to `Tasks`

If you require more granularity in specifying execution credentials, use the `serviceAccountNames` field to
If you require more granularity in specifying execution credentials, use the `taskRunSpecs[].taskServiceAccountName` field to
Copy link
Member

Choose a reason for hiding this comment

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

not relevant to this PR but maybe in v1 we can change this to taskRunSpecs[].serviceAccountName

}
}
return serviceAccountName
func (pr *PipelineRun) GetServiceAccountName() string {
Copy link
Member

Choose a reason for hiding this comment

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

same as above, this can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, my old "don't change anything you don't have to" instinct going overboard... =) On it.

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 16, 2022
Finishing up tektoncd#2614

We had multiple ways to specify the `serviceAccountName` for `PipelineTask`s - the original `PipelineRun.Spec.ServiceAccountNames`, and the more general `PipelineRun.Spec.TaskRunSpecs`, which also allows specifying a pod template, metadata, and container overrides for individual steps and sidecars. Therefore, we deprecated `ServiceAccountNames`, and are now removing it.

This has been scheduled for removal since May 2021.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@abayer abayer force-pushed the remove-pipelinerun-spec-serviceaccountnames branch from 2a0ce9a to ce74709 Compare June 16, 2022 15:10
Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

similar to the other removal of deprecated fields, this may also need an email to users and contributors - thank you @abayer!

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop, 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

@abayer
Copy link
Contributor Author

abayer commented Jun 16, 2022

/retest

@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/pipelinerun_conversion.go 86.8% 86.3% -0.5
pkg/apis/pipeline/v1alpha1/pipelinerun_types.go 90.6% 88.9% -1.7
pkg/apis/pipeline/v1beta1/pipelinerun_types.go 86.5% 85.7% -0.8
pkg/reconciler/pipelinerun/pipelinerun.go 86.1% 86.4% 0.3
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.5% 94.3% -0.2

@abayer
Copy link
Contributor Author

abayer commented Jun 16, 2022

/retest

@jerop
Copy link
Member

jerop commented Jun 16, 2022

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit a47eb50 into tektoncd:main Jun 16, 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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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.

8 participants