Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[TEP-0056]: Initial set of API refactors pertinent to Pipelines in Pipelines #7055

Conversation

bhujangr
Copy link
Contributor

@bhujangr bhujangr commented Aug 18, 2023

Changes

This is the first of many pull requests to begin implementing TEP-0056

  1. Added PipelineRef and PipelineSpec to PipelineTask
  2. Updated and added pipeline validation tests to reflect the above additions
  3. Updated and added pipeline type tests to reflect the above additions
  4. Added a initial set of docs and examples using the existing proposal

The changes in this PR does not change existing behavior and merely introduces fields to existing types

Note: Pipelines in Pipelines is not yet implemented

Co-authored-by: pritidesai pdesai@us.ibm.com

Submitter Checklist

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

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • 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). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Added PipelineRef and PipelineSpec fields to PipelineTask, in lieu of TEP-0056

@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Aug 18, 2023
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 18, 2023
@tekton-robot
Copy link
Collaborator

Hi @bhujangr. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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 so much @bhujangr for picking up this work, and welcome to Tekton! 🙏🏾
cc @pritidesai @abayer

/assign
/meow

@tekton-robot
Copy link
Collaborator

@jerop: cat image

In response to this:

Thank you so much @bhujangr for picking up this work, and welcome to Tekton! 🙏🏾
cc @pritidesai @abayer

/assign
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pritidesai
Copy link
Member

/ok-to-test
/kind feature

@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 18, 2023
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 0.0

@pritidesai
Copy link
Member

thanks @bhujangr, please update the release notes section in the PR description. Thanks!

@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/v1/pipeline_validation.go 99.1% 99.1% 0.0

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesnt merit a release note. labels Aug 18, 2023
@bhujangr
Copy link
Contributor Author

bhujangr commented Aug 18, 2023

@pritidesai added release notes, not quite sure if it is in the right format and in line with what is expected

@bhujangr bhujangr force-pushed the pipelines-in-pipelines-fields-tests-docs branch from 86404ce to 41d994b Compare August 18, 2023 15:47
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 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/v1/pipeline_validation.go 99.1% 99.1% 0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 0.0

@bhujangr bhujangr force-pushed the pipelines-in-pipelines-fields-tests-docs branch from e1ef312 to 9f518dc Compare August 18, 2023 16:30
@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/v1/pipeline_validation.go 99.1% 99.1% 0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 0.0

@tekton-robot tekton-robot removed the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 20, 2023
docs/pipelines.md Outdated Show resolved Hide resolved
docs/pipelines.md Outdated Show resolved Hide resolved
cfg := config.FromContextOrDefaults(ctx)
// if alpha API's are enabled, we
if cfg.FeatureFlags.EnableAPIFields == config.AlphaAPIFields {
errs = errs.Also(apis.ErrMissingOneOf("taskRef", "taskSpec", "pipelineRef", "pipelineSpec"))
Copy link
Member

Choose a reason for hiding this comment

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

Nit: declaring a constants for "taskRef", "taskSpec", "pipelineRef", and "pipelineSpec" and reusing them everywhere instead of hardcoding the string.

@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/v1/pipeline_validation.go 99.1% 99.1% 0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 0.0

@pritidesai pritidesai force-pushed the pipelines-in-pipelines-fields-tests-docs branch from f722895 to 8173077 Compare August 25, 2023 17:45
@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/v1/pipeline_validation.go 99.1% 99.1% 0.0

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 0.0

@pritidesai
Copy link
Member

Looks like a flake:

task-beta/cmd/controller
        2023/08/25 17:59:08 Building github.com/tektoncd/pipeline/test/wait-task-beta/cmd/controller for linux/amd64
        2023/08/25 17:59:08 Building github.com/tektoncd/pipeline/test/wait-task-beta/cmd/controller for linux/ppc64le
        2023/08/25 17:59:17 Unexpected error running "go build": signal: killed
        2023/08/25 17:59:17 Unexpected error running "go build": signal: killed
        error: no objects passed to apply
        Error: error processing import paths in "./config/controller.yaml": error resolving image references: GET https://distroless.dev/v2/static/manifests/sha256:5ca443a329d0c2fd7bd28a58d67fd19c7fee14e644e1492ffe9dd4741b6ff9de: unexpected status code 500 Internal Server Error: 
        <html><head>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <title>500 Server Error</title>
        </head>
        <body text=#000000 bgcolor=#ffffff>
        <h1>Error: Server Error</h1>
        <h2>The server encountered an error and could not complete your request.<p>Please try again in 30 seconds.</h2>
        <h2></h2>
        </body></html>
        
        2023/08/25 17:59:17 error during command execution:error processing import paths in "./config/controller.yaml": error resolving image references: GET https://distroless.dev/v2/static/manifests/sha256:5ca443a329d0c2fd7bd28a58d67fd19c7fee14e644e1492ffe9dd4741b6ff9de: unexpected status code 500 Internal Server Error: 
        <html><head>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <title>500 Server Error</title>
        </head>
        <body text=#000000 bgcolor=#ffffff>
        <h1>Error: Server Error</h1>
        <h2>The server encountered an error and could not complete your request.<p>Please try again in 30 seconds.</h2>
        <h2></h2>
        </body></html>

@pritidesai pritidesai force-pushed the pipelines-in-pipelines-fields-tests-docs branch from 8173077 to e0d7d0c Compare August 25, 2023 20:51
@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/v1/pipeline_validation.go 99.1% 99.1% 0.0
pkg/apis/pipeline/v1beta1/pipeline_validation.go 98.7% 98.8% 0.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 0.0
pkg/apis/pipeline/v1beta1/pipeline_validation.go 98.7% 98.8% 0.1

@pritidesai pritidesai added this to the Pipelines v0.52 milestone Sep 2, 2023
@JeromeJu
Copy link
Member

JeromeJu commented Sep 5, 2023

/assign

docs/pipelines-in-pipelines.md Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1/pipeline_types_test.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1/pipeline_validation.go Outdated Show resolved Hide resolved
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2023
…pelines

This is the first of many commits to begin implementing TEP-0056

- Added PipelineRef and PipelineSpec to PipelineTask
- Updated and added pipeline validation tests to reflect the above additions
- Updated and added pipeline type tests to reflect the above additions
- Added a initial set of docs and examples using the existing proposal
- The changes in this PR does not change existing behavior and merely introduces fields to existing types

Note: Pipelines in Pipelines is not yet implemented
Signed-off-by: Priti Desai <pdesai@us.ibm.com>
@pritidesai pritidesai force-pushed the pipelines-in-pipelines-fields-tests-docs branch from e0d7d0c to bf2597e Compare September 5, 2023 18:41
@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/v1/pipeline_validation.go 99.1% 99.1% 0.0
pkg/apis/pipeline/v1beta1/pipeline_validation.go 98.7% 98.8% 0.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage-df to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipeline_validation.go 99.1% 99.1% 0.0
pkg/apis/pipeline/v1beta1/pipeline_validation.go 98.7% 98.8% 0.1

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.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 5, 2023
@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

@tekton-robot tekton-robot merged commit 6150191 into tektoncd:main Sep 5, 2023
2 checks passed
@jerop jerop mentioned this pull request Sep 29, 2023
1 task
# for free to join this conversation on GitHub. Already have an account? # 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants