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

Add PipelineRunStatus Conversion #5797

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

JeromeJu
Copy link
Member

@JeromeJu JeromeJu commented Nov 24, 2022

Changes

This commit adds the conversion for PipelineRunStatus. For the deprecated fields PipelineRunStatus.Status.TaskRuns and PipelineRunStatus.Status.Runs, they are converted into ChildStatusReference when converting from v1beta1 to v1. The taskRuns and runs are serialized into annotations and would be populated by deserializations from v1 PipelineRunStatus to v1beta1 with Full or Both embeddedStatus.

/kind bug

Submitter Checklist

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

  • [n/a] Has Docs included if any changes are user facing
  • 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
  • [n/a] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • [n/a] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

None

@tekton-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. labels Nov 24, 2022
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 24, 2022
@JeromeJu JeromeJu changed the title WIP Fix conversion for PipelineRun Status Fix conversion for PipelineRun Status Nov 24, 2022
@JeromeJu JeromeJu mentioned this pull request Nov 24, 2022
6 tasks
@JeromeJu JeromeJu changed the title Fix conversion for PipelineRun Status Fix PipelineRunStatus conversion Nov 24, 2022
@JeromeJu JeromeJu changed the title Fix PipelineRunStatus conversion Fix PipelineRunStatus Conversion Nov 25, 2022
@JeromeJu JeromeJu changed the title Fix PipelineRunStatus Conversion Add PipelineRunStatus Conversion Nov 25, 2022
@JeromeJu JeromeJu marked this pull request as ready for review November 25, 2022 03:55
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 25, 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/pipelinerun_conversion.go 95.5% 93.1% -2.3
pkg/apis/pipeline/v1beta1/provenance_conversion.go Do not exist 100.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/v1beta1/pipelinerun_conversion.go 95.5% 93.1% -2.3
pkg/apis/pipeline/v1beta1/provenance_conversion.go Do not exist 100.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/v1beta1/pipelinerun_conversion.go 95.5% 95.7% 0.3
pkg/apis/pipeline/v1beta1/provenance_conversion.go Do not exist 100.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/v1beta1/pipelinerun_conversion.go 95.5% 95.7% 0.3
pkg/apis/pipeline/v1beta1/provenance_conversion.go Do not exist 100.0%

@JeromeJu JeromeJu force-pushed the fix-pr-status-conversion branch 2 times, most recently from ab4e004 to ccec3e1 Compare November 25, 2022 20:21
@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/pipelinerun_conversion.go 95.5% 96.2% 0.7
pkg/apis/pipeline/v1beta1/provenance_conversion.go Do not exist 100.0%

@JeromeJu
Copy link
Member Author

JeromeJu commented Dec 5, 2022

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 5, 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/pipelinerun_conversion.go 95.5% 94.6% -0.9

@JeromeJu
Copy link
Member Author

JeromeJu commented Dec 5, 2022

/retest
Flake: TestReconcile_InvalidPipelineRuns/invalid-pipeline-run-resources-not-bound-shd-stop-reconciling

@dibyom
Copy link
Member

dibyom commented Dec 5, 2022

@JeromeJu PR description needs an update since we are converting vs returning an error now?

@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/pipelinerun_conversion.go 95.5% 94.6% -0.9

@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/pipelinerun_conversion.go 95.5% 94.6% -0.9

@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/pipelinerun_conversion.go 95.5% 94.6% -0.9

@JeromeJu JeromeJu force-pushed the fix-pr-status-conversion branch 2 times, most recently from 48cc583 to dde91e2 Compare December 5, 2022 20:02
This commit adds the conversion for PipelineRunStatus. For the deprecated fields TaskRuns and Runs,
they are serialized into ObjectMeta.Annotations when converting from v1beta1 to v1 since there exists
no `status.taskRuns` and `status.runs` in v1. And therefore when the `embedded-status` is set to `Full`
or `Both`, the respective `status.taskRuns` and `statuss.runs` could be populated with the deserializations
from the annotations.
@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/pipelinerun_conversion.go 95.5% 94.6% -0.9

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Dec 5, 2022
@JeromeJu JeromeJu requested review from dibyom and removed request for afrittoli December 5, 2022 21:41
Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

Thanks @JeromeJu - Looks good to me now!
@afrittoli @vdemeester @abayer any other comments to resolve or can we merge this now?

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

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

@JeromeJu JeromeJu requested review from abayer and afrittoli and removed request for abayer December 6, 2022 17:24
@abayer
Copy link
Contributor

abayer commented Dec 6, 2022

/lgtm

Let's do it!

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 6, 2022
@tekton-robot tekton-robot merged commit 04b2226 into tektoncd:main Dec 6, 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/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. 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