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

Losing When Expressions converting from v1beta1 to v1alpha1 #3815

Closed
ghost opened this issue Mar 8, 2021 · 6 comments
Closed

Losing When Expressions converting from v1beta1 to v1alpha1 #3815

ghost opened this issue Mar 8, 2021 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@ghost
Copy link

ghost commented Mar 8, 2021

Expected Behavior

All of the fields in a v1beta1 document are "round-trippable" through older versions like v1alpha1 without losing any data.

Actual Behavior

We lose certain fields that had no representation in the older v1alpha1 version when converting down from v1beta1. If a stored v1beta1 document has WhenExpressions, for example, then fetching the doc as v1alpha1 will drop those WhenExpressions from the returned data. Applying that returned document back to the cluster would result in the original stored v1beta1 resource being overwritten with a version that does not have WhenExpressions.

Steps to Reproduce the Problem

  1. k get pipeline.v1alpha1.tekton.dev -o yaml <name of pipeline with when expressions> > test.yaml
  2. Edit test.yaml to remove UID and any other server-generated fields
  3. k apply -f ./test.yaml
  4. k get pipeline.v1beta1.tekton.dev -o yaml <name of pipeline with when when expressions> | less
  5. Notice that the when expressions have been lost from the pipeline.

Additional Info

  • Kubernetes version:
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:28:09Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.1", GitCommit:"206bcadf021e76c27513500ca24182692aabd17e", GitTreeState:"clean", BuildDate:"2020-09-14T07:30:52Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:

v0.21.0

@ghost ghost added the kind/bug Categorizes issue or PR as related to a bug. label Mar 8, 2021
@ghost ghost added this to the Pipelines 0.23 milestone Mar 8, 2021
@ghost ghost self-assigned this Mar 23, 2021
@ghost
Copy link
Author

ghost commented Mar 23, 2021

Could we avoid storing the status if possible?

@ghost
Copy link
Author

ghost commented Mar 25, 2021

Could we avoid storing the status if possible?

I'm not sure we can - if we returned a PipelineRun's YAML without the status and the user re-applied that against a cluster they would have lost information I think.

@ghost
Copy link
Author

ghost commented Apr 5, 2021

Moving this to 0.24 because it's not clear to me yet that #3854 is the way to go.

@ghost ghost modified the milestones: Pipelines 0.23, Pipelines 0.24 Apr 5, 2021
@bobcatfish bobcatfish removed this from the Pipelines 0.24 milestone Apr 20, 2021
@ghost ghost removed their assignment Jun 21, 2021
@tekton-robot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 15, 2021
@bobcatfish
Copy link
Collaborator

@sbwsg would it be fair to consider this fixed? i think you've specifically fixed this for when expressions at least. I think there might still be the issue of how to fix this broadly for all new fields we add - due to the lack of activity I'm wondering how important that is 🤔

@ghost
Copy link
Author

ghost commented Oct 26, 2021

Hey @bobcatfish we fixed this for Finally in #3779 and #3816 but didn't implement any workarounds for other fields like when expressions. I'll close given the lack of activity.

@ghost ghost closed this as completed Oct 26, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants