-
Notifications
You must be signed in to change notification settings - Fork 420
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 sink crashloop when upgrading from 0.1 to 0.2 #369
Conversation
The following is the coverage report on pkg/.
|
573f906
to
4358750
Compare
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
I just tested your branch. I can verify that I no longer see the EventListener running into a CrashLoop when I upgrade from v0.1.0 to this branch 👍 |
When I updated my Triggers version, my EventListener's fields did not update ( I got this error in the reconciler:
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Ok, so the crashloop should be fixed though we still need to address @ncskier 's comment #369 (comment) |
The following is the coverage report on pkg/.
|
quick and dirty script I used to test this: https://gist.github.com/dibyom/93b8455ee18e496d408ec4ef51d2b476 |
The following is the coverage report on pkg/.
|
@googlebot I consent |
The crashloop is due to 2 reasons: 1. We deprecated and removed the `params` field from the EventListener. So, when the reconciler tries to unmarshal an old EventListener, it fails since it cannot parse the deleted `params` field. 2. The new event listener sink image expects `/etc/config-logging` to be mounted. However the reconciler code does not add the `volumeMount` for any existing sink deployments. So, the new pods go into a crashloop To fix this, this commit does the following: 1. Add back the `params` field. Also, update the mutating webhook to delete any set `params` field in existing eventlisteners. 2. Add volumeMount for existing deployments if not present. - Co-Authored-by: Brandon Walker Fixes tektoncd#366 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
The following is the coverage report on pkg/.
|
/test pull-tekton-triggers-build-tests |
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.
/lgtm
cmd/webhook/main.go
Outdated
ctxFunc := func(ctx context.Context) context.Context { | ||
return ctx | ||
return v1alpha1.WithUpgradeViaDefaulting(ctx) | ||
} |
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.
@dibyom I think golangci
is complaining about this. It should be
ctxFunc := v1alpha1.WithUpgradeViaDefaulting
This ensures that the automatic upgrades that we do in `SetDefaults` (e.g. `binding` to `bindings`) are actually persisted in etcd. Previously we only did these upgrades on each reconcile but did not persist them. Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
The following is the coverage report on pkg/.
|
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ncskier 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 |
Changes
Fixes #366
The crashloop is due to 2 reasons:
We deprecated and removed the
params
field from the EventListener. So, when the reconciler tries to unmarshal an old EventListener, it fails since it cannot parse the deletedparams
field.The new event listener sink image expects
/etc/config-logging
to be mounted. However the reconciler code does not add thevolumeMount
for any existing sink deployments. So, the new pods go into a crashloopTo fix this, this commit does the following:
params
field. Also, update the mutating webhook to delete any setparams
field in existing eventlisteners.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes