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-0108: Mapping Workspaces #4887

Merged
merged 1 commit into from
May 26, 2022
Merged

TEP-0108: Mapping Workspaces #4887

merged 1 commit into from
May 26, 2022

Conversation

Aleromerog
Copy link
Contributor

@Aleromerog Aleromerog commented May 18, 2022

Changes

According to TEP-0108, auto-map Workspaces from Pipelines to PipelineTasks when the names of the Workspaces declared in the Pipeline and PipelineTask are the same to reduce verbosity and improve usability of Pipelines.

This PR makes sure to map workspace from PipelineTask if the name of the workspace match with the name of the workspace of the Pipeline.

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

Users can specify the Workspace to use for PipelineTask in the name label to reduce verbosity when the names of the Workspaces declared in the Pipeline and PipelineTask are the same. Users can continue to explicitly map Workspaces.

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 18, 2022
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 18, 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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 84.6% -1.6

@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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 84.6% -1.6

@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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 84.6% -1.6

@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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 84.6% -1.6

@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 19, 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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 86.1% -0.1

@Aleromerog
Copy link
Contributor Author

/retest

@dibyom
Copy link
Member

dibyom commented May 20, 2022

Hey @Aleromerog the code seems fine but I'll wait for @jerop to take a look as well. We should definitely document this feature though and add a release note about it.

@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 20, 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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 86.4% 0.2

@jerop jerop changed the title [TEP 108] Map PipelineTask workspace name TEP-0108: Mapping Workspaces May 24, 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.

Thank you @Aleromerog!

Please add documentation and example for this feature

pkg/apis/pipeline/v1beta1/pipeline_validation_test.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1beta1/pipeline_validation_test.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1beta1/pipeline_validation_test.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1beta1/pipeline_validation_test.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1beta1/workspace_types.go Show resolved Hide resolved
pkg/reconciler/pipelinerun/pipelinerun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/pipelinerun/pipelinerun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/pipelinerun/pipelinerun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/pipelinerun/pipelinerun_test.go Outdated Show resolved Hide resolved
@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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 86.4% 0.2

docs/pipelines.md Outdated Show resolved Hide resolved
pkg/reconciler/pipelinerun/pipelinerun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/pipelinerun/pipelinerun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/pipelinerun/pipelinerun_test.go Outdated Show resolved Hide resolved
@jerop
Copy link
Member

jerop commented May 24, 2022

/test pull-tekton-pipeline-build-tests

1 similar comment
@jerop
Copy link
Member

jerop commented May 24, 2022

/test pull-tekton-pipeline-build-tests

@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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 86.4% 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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 86.4% 0.2

@jerop jerop added the kind/feature Categorizes issue or PR as related to a new feature. label May 25, 2022
@Aleromerog
Copy link
Contributor Author

/retest

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.

Thanks @Aleromerog! 🎉

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop

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 May 25, 2022
@Aleromerog Aleromerog requested a review from dibyom May 25, 2022 18:54
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.

@Aleromerog one more request, please add an example that uses this feature - can be a modification of this example: https://github.com/tektoncd/pipeline/blob/main/examples/v1beta1/pipelineruns/workspaces.yaml

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.

LGTM, just a few nits and a +1 on Jerop's feedback

pkg/reconciler/pipelinerun/pipelinerun.go Show resolved Hide resolved
pkg/reconciler/pipelinerun/pipelinerun_test.go Outdated Show resolved Hide resolved
@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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 86.4% 0.2

@jerop
Copy link
Member

jerop commented May 26, 2022

/retest

According to TEP-0108:
auto-mapping Workspaces from Pipelines to PipelineTasks
when the names of the Workspaces declared in the Pipeline
and PipelineTask are the same to reduce verbosity and improve usability of Pipelines.
@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/pipeline_types.go 96.6% 96.6% 0.1
pkg/reconciler/pipelinerun/pipelinerun.go 86.2% 86.4% 0.2

@lbernick
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2022
@tekton-robot tekton-robot merged commit c040920 into tektoncd:main May 26, 2022
jerop added a commit to jerop/community that referenced this pull request May 26, 2022
Marking TEP-0107 as implemented, thank you @Aleromerog!

PR: tektoncd/pipeline#4887
jerop added a commit to jerop/community that referenced this pull request May 26, 2022
Marking TEP-0107 as implemented, thank you @Aleromerog!

PR: tektoncd/pipeline#4887
jerop added a commit to jerop/community that referenced this pull request May 26, 2022
Marking TEP-0108 as implemented, thank you @Aleromerog!

PR: tektoncd/pipeline#4887
tekton-robot pushed a commit to tektoncd/community that referenced this pull request May 26, 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. 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