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

[TEP100] Remove Taskruns and Runs Fields for PipelineRunStatus #6099

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

JeromeJu
Copy link
Member

@JeromeJu JeromeJu commented Feb 2, 2023

Changes

This commit removes status.taskruns and status.runs for
PipelineRunStatus since they have been deprecated. The corresponding usage in
the test cases are replaced with childReferences.

Closes #4954
fixes #6090

Submitter Checklist

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

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

Release Notes

`pipelinerun.status.taskruns` and `pipelinerun.status.runs` are removed

@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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesnt merit a release note. labels Feb 2, 2023
@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 2, 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/config/feature_flags.go 89.5% 88.6% -0.9
pkg/apis/pipeline/v1/pipeline_types.go 97.2% 97.2% -0.0
pkg/apis/pipeline/v1beta1/pipeline_types.go 96.8% 96.7% -0.0
pkg/apis/pipeline/v1beta1/pipelinerun_conversion.go 94.6% 95.7% 1.1
pkg/apis/pipeline/v1beta1/pipelinerun_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/cancel.go 90.4% 89.0% -1.3
pkg/reconciler/pipelinerun/pipelinerun.go 86.6% 87.0% 0.5
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3
pkg/status/status.go 86.8% 86.3% -0.5

@tekton-robot tekton-robot added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Feb 2, 2023
@JeromeJu JeromeJu changed the title [TEP100] Remove taskruns runs Fields for PipelineRunStatus [TEP100] Remove Taskruns and Runs Fields for PipelineRunStatus Feb 2, 2023
@JeromeJu JeromeJu changed the title [TEP100] Remove Taskruns and Runs Fields for PipelineRunStatus [TEP100] Remove Taskruns and Runs Fields for PipelineRunStatus Feb 2, 2023
@jerop jerop added this to the Pipelines v0.45 milestone Feb 3, 2023
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 3, 2023
@JeromeJu JeromeJu marked this pull request as ready for review February 3, 2023 22:52
@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 Feb 3, 2023
@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 Feb 3, 2023
@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_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

@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/v1beta1/pipelinerun_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

@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_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

@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/v1beta1/pipelinerun_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

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.

@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 7, 2023
@JeromeJu JeromeJu requested review from jerop and removed request for pritidesai, imjasonh, wlynch and dibyom February 7, 2023 20:10
@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_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

@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/v1beta1/pipelinerun_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

@pritidesai
Copy link
Member

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/v1beta1/pipelinerun_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

Thank you @JeromeJu for all the hard work on this 🙏 Since this is one of the last PRs and mainly related to the feature which involves deleting existing code, I request to maintain the existing go coverage, thanks!

@pritidesai
Copy link
Member

The changes looks good to me, it will be great if you can improve the code coverage otherwise happy to merge, thanks!

This commit removes `status.taskruns` and `status.runs` for
PipelineRunStatus since they have been deprecated. The corresponding usage in
the test cases are replaced with `childReferences`.
@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_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

@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/v1beta1/pipelinerun_types.go 88.3% 87.9% -0.5
pkg/reconciler/pipelinerun/pipelinerun.go 87.2% 87.0% -0.2
pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go 94.9% 94.8% -0.1
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 96.4% 97.7% 1.3

@JeromeJu
Copy link
Member Author

JeromeJu commented Feb 10, 2023

I was wondering if there are any approaches suggested here or is this inevitable? Currently I have tried to add ChildReferences cases to pipelinerun reconciler unit tests as replacement for taskruns and runs status, but that doesn't seem to help with restoring the coverage as I think most of the pipelineRunStatus related codes are still covered.

From the coverage report, there are some other uncovered cases could be added but I don't think they would be suitable to fit in this PR since they are not relevant to PipelineRunStatus 🤔

The changes looks good to me, it will be great if you can improve the code coverage otherwise happy to merge, thanks!

@pritidesai
Copy link
Member

thank you @JeromeJu 👍

The test coverage is certainly not a blocker here. Happy to merge and you can follow up improving coverage in a separate PR.

Here are some pointers to add more coverage:

The coverage before and after of pkg/apis/pipeline/v1beta1/pipelinerun_types.go:

Screen Shot 2023-02-13 at 1 15 33 PM

The coverage before and after of pkg/reconciler/pipelinerun/pipelinerun.go:

Screen Shot 2023-02-13 at 1 22 42 PM

@pritidesai
Copy link
Member

pritidesai commented Feb 13, 2023

Please confirm the beta integration test failure is not a flake and I can merge this, thank you! 🙏

@pritidesai
Copy link
Member

/retest

@JeromeJu
Copy link
Member Author

thank you @JeromeJu 👍

The test coverage is certainly not a blocker here. Happy to merge and you can follow up improving coverage in a separate PR.

Here are some pointers to add more coverage:

The coverage before and after of pkg/apis/pipeline/v1beta1/pipelinerun_types.go:

Screen Shot 2023-02-13 at 1 15 33 PM

The coverage before and after of pkg/reconciler/pipelinerun/pipelinerun.go:

Screen Shot 2023-02-13 at 1 22 42 PM

Thanks @pritidesai for the pointers! I created #6159 and will follow up in a separate PR!

Also confirmed with @XinruZhang offline that the beta integration is an known flake where the network glitches for CI.
/retest

@pritidesai
Copy link
Member

thank you @JeromeJu 🙏

/lgtm

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/misc Categorizes issue or PR as a miscellaneuous one. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
5 participants