-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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-0090: Refactor ResolvePipelineRunTask #4938
TEP-0090: Refactor ResolvePipelineRunTask #4938
Conversation
c83104c
to
52ddcc1
Compare
52ddcc1
to
9402be9
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
[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 |
Prior to this commit, the logic for resolving a `Task` needed for a given `PipelineTask` was included within the `ResolvePipelineRunTask` function. In this change, we separate that logic into its own function for reuse and readability. No functional changes made in this commit.
9402be9
to
cc480b0
Compare
The following is the coverage report on the affected files.
|
/lgtm Nice! |
@@ -553,6 +526,41 @@ func ResolvePipelineRunTask( | |||
return &rprt, nil | |||
} | |||
|
|||
func resolveTask(ctx context.Context, taskRun *v1beta1.TaskRun, getTask resources.GetTask, task v1beta1.PipelineTask) (v1beta1.TaskSpec, string, v1beta1.TaskKind, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @jerop for refactoring 🙏
not a blocker (its merged already 🤣) or the intent is not to demotivate but its always great to have a unit test for any new function introduced. We are carrying a lot of such functions without any unit tests since long time back.
Changes
Prior to this commit, the logic for resolving a
Task
needed for a givenPipelineTask
was included within theResolvePipelineRunTask
function.In this change, we separate that logic into its own function for reuse and readability.
No functional changes made in this commit.
/kind cleanup
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
Release Notes