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

Keeps Deprecated Fields in Step and StepTemplate When Switching Versions #6623

Merged
merged 1 commit into from
May 18, 2023

Conversation

XinruZhang
Copy link
Member

@XinruZhang XinruZhang commented May 4, 2023

Changes

Prior to this PR, we have information loss when converting the
step and steptemplate from v1beta1 to v1. This PR preserves
those information by serializing steps and stepTemplate, saving
them in object annoations when converting from v1beta1 to v1, then
deserializing when converting back.

/kind bug

fix #6575
closes #4546

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

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels May 4, 2023
@tekton-robot tekton-robot requested review from jerop and wlynch May 4, 2023 23:07
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 4, 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/task_conversion.go 97.4% 90.8% -6.6
pkg/pod/script.go 100.0% 99.0% -1.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/v1beta1/task_conversion.go 97.4% 90.8% -6.6
pkg/pod/script.go 100.0% 99.0% -1.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/task_conversion.go 97.4% 90.8% -6.6
pkg/pod/script.go 100.0% 99.0% -1.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/v1beta1/task_conversion.go 97.4% 90.8% -6.6
pkg/pod/script.go 100.0% 99.0% -1.0

@XinruZhang XinruZhang marked this pull request as draft May 5, 2023 00:06
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 5, 2023
@XinruZhang XinruZhang changed the title Keeps Deprecated Fields in Step and StepTemplate When Switching Versions [WIP] Keeps Deprecated Fields in Step and StepTemplate When Switching Versions May 5, 2023
@lbernick
Copy link
Member

lbernick commented May 5, 2023

Closes #4546

@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/task_conversion.go 97.4% 82.4% -15.0
pkg/pod/script.go 100.0% 99.0% -1.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/v1beta1/task_conversion.go 97.4% 82.4% -15.0
pkg/pod/script.go 100.0% 99.0% -1.0

@XinruZhang XinruZhang force-pushed the 6575-02 branch 2 times, most recently from 06d47bf to e311fb6 Compare May 5, 2023 19:07
@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/task_conversion.go 97.4% 86.1% -11.3
pkg/pod/script.go 100.0% 99.0% -1.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/v1beta1/task_conversion.go 97.4% 86.1% -11.3
pkg/pod/script.go 100.0% 99.0% -1.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/task_conversion.go 97.4% 92.5% -5.0
pkg/pod/script.go 100.0% 99.0% -1.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/v1beta1/task_conversion.go 97.4% 92.5% -5.0
pkg/pod/script.go 100.0% 99.0% -1.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/v1beta1/task_conversion.go 97.4% 92.5% -5.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/task_conversion.go 97.4% 92.5% -5.0

@XinruZhang XinruZhang marked this pull request as ready for review May 5, 2023 21:15
@XinruZhang XinruZhang changed the title [WIP] Keeps Deprecated Fields in Step and StepTemplate When Switching Versions Keeps Deprecated Fields in Step and StepTemplate When Switching Versions May 5, 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/task_conversion.go 97.4% 92.5% -5.0
pkg/apis/pipeline/v1beta1/task_types.go 0.0% 57.1% 57.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/v1beta1/task_conversion.go 97.4% 92.5% -5.0
pkg/apis/pipeline/v1beta1/task_types.go 0.0% 57.1% 57.1

@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/task_conversion.go 97.4% 92.5% -5.0
pkg/apis/pipeline/v1beta1/task_types.go 0.0% 57.1% 57.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/v1beta1/task_conversion.go 97.4% 92.5% -5.0
pkg/apis/pipeline/v1beta1/task_types.go 0.0% 57.1% 57.1

@JeromeJu
Copy link
Member

JeromeJu commented May 16, 2023

Thanks for the fix @XinruZhang

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 16, 2023
pkg/apis/pipeline/v1beta1/swagger.json Outdated Show resolved Hide resolved
test/conversion_test.go Outdated Show resolved Hide resolved
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 17, 2023
@lbernick
Copy link
Member

/hold
(just so it doesn't get merged before xinru can address the comments I made)

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 17, 2023
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label May 17, 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/task_conversion.go 97.4% 92.5% -5.0
pkg/apis/pipeline/v1beta1/task_types.go 0.0% 57.1% 57.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/v1beta1/task_conversion.go 97.4% 92.5% -5.0
pkg/apis/pipeline/v1beta1/task_types.go 0.0% 57.1% 57.1

@lbernick
Copy link
Member

/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 May 17, 2023
Prior to this commit, we have information loss when converting the
step and steptemplate from v1beta1 to v1. This commit preserves
those information by serializing steps and steptemplate, saving
them in object annoations when converting from v1beta1 to v1, then
deserializing when converting back.
@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/task_conversion.go 97.4% 92.5% -5.0
pkg/apis/pipeline/v1beta1/task_types.go 0.0% 57.1% 57.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/v1beta1/task_conversion.go 97.4% 92.5% -5.0
pkg/apis/pipeline/v1beta1/task_types.go 0.0% 57.1% 57.1

@XinruZhang
Copy link
Member Author

/retest

1 similar comment
@Yongxuanzhang
Copy link
Member

/retest

@Yongxuanzhang
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 18, 2023
@tekton-robot tekton-robot merged commit d09b922 into tektoncd:main May 18, 2023
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
5 participants