-
Notifications
You must be signed in to change notification settings - Fork 200
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
fix: avoid panic when upgrading pipeline in tektonconfig #2482
Conversation
Hi @l-qing. 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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
The following is the coverage report on the affected files.
|
@@ -82,7 +82,7 @@ func TestUpgradePipelineProperties(t *testing.T) { | |||
Spec: v1alpha1.TektonConfigSpec{ | |||
Pipeline: v1alpha1.Pipeline{ | |||
PipelineProperties: v1alpha1.PipelineProperties{ | |||
EnableStepActions: ptr.Bool(false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for changing this ? Shouldn't we instead add another test ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just didn't want to add another test case. 😆
But if the logic of SetDefaults
changes in the future, for example, changing the default value from false
to true
, it may cause the unit test to fail.
I will add another case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have resubmitted the code and made adjustments to the unit test.
Please help review it when you have time. Thank you!
2908a49
to
465da6b
Compare
The following is the coverage report on the affected files.
|
@l-qing I cant reproduce the issue, with main branch, do you know what creates the panic |
465da6b
to
f2d6add
Compare
The following is the coverage report on the affected files.
|
Reproduction steps # 1. apply v0.67.0
$ kubectl apply -f https://storage.googleapis.com/tekton-releases/operator/previous/v0.67.0/release.yaml
# 2. wait pipeline ready
# 3. apply v0.74.0
$ kubectl apply -f https://storage.googleapis.com/tekton-releases/operator/previous/v0.74.0/release.yaml
# 4. Waiting for reproduction. Although normally it should not upgrade directly from v0.67 to v0.74. |
@l-qing Thanks for sharing the reproduction steps and the error is happening due to this as |
+1, Would you update your PR to fix the nil pointer dereference please @l-qing |
I previously thought that calling However, if the behavior of |
f2d6add
to
d3bea0a
Compare
/retest |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jkhelil 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 |
fix #2476
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lint
before submitting a PRSee the contribution guide for more details.
Release Notes