-
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
Clean up pipelinerun resolution code #6628
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Comments
lbernick
added
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
labels
May 5, 2023
7 tasks
/assign |
3 tasks
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 11, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 11, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 11, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 11, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
7 tasks
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 11, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 11, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 12, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 15, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 15, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 15, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 16, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 16, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 16, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 16, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 16, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 17, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 17, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 17, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 18, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 18, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 19, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
EmmaMunley
added a commit
to EmmaMunley/pipeline
that referenced
this issue
May 22, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue tektoncd#6628.
tekton-robot
pushed a commit
that referenced
this issue
May 22, 2023
Currently, PipelineRun resolution code can be difficult to understand. This commit removes some of the redundant fields in ResolvedPipelineTask including the singular version of: TaskRun, TaskRunName, ObjectRun, ObjectRunName so that only the list of TaskRuns, TaskRunNames, ObjectRuns, ObjectRunNames can be used regardless if the PipelineTask is matrixed or not. This also streamlines the codebase by removing the switch statements used throughout. This partially addresses Issue #6628.
This was referenced May 23, 2023
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Pipelinerun resolution code (e.g. https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go) is getting super hard to understand, making it challenging to evaluate code that modifies it (e.g. #6603 (comment)).
Some specific changes that would go a long way for readability:
Another aspect of ResolvedPipelineTask that's confusing is that it's hard to know at what point in the code you can expect referenced TaskRuns and CustomRuns to be non-nil. For example, if ResolvedPipelineTask.TaskRun is nil, does that mean there is no taskrun associated with the pipeline task yet, or just that we haven't yet fetched it from the cluster? (Or that it's a matrixed pipeline task, and uses TaskRuns instead?)
cc @EmmaMunley
The text was updated successfully, but these errors were encountered: