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
Bug 1891758: deployment: update event spam #365
Conversation
When authentication.operator observedGeneration and readyReplicas get set before the observed deployment's generation, the last element would have never gotten set and the ApplyDeployment function would have kept reporting deployment update event endlessly.
@stlaz: An error was encountered adding this pull request to the external tracker bugs for bug 1891758 on the Bugzilla server at https://bugzilla.redhat.com:
In response to this:
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. |
operatorStatusOutdated := operatorConfig.Status.ObservedGeneration != operatorConfig.Generation || operatorConfig.Status.ReadyReplicas != deployment.Status.UpdatedReplicas | ||
operatorStatusOutdated := operatorConfig.Status.ObservedGeneration != operatorConfig.Generation || | ||
operatorConfig.Status.ReadyReplicas != deployment.Status.UpdatedReplicas || | ||
resourcemerge.ExpectedDeploymentGeneration(deployment, operatorConfig.Status.Generations) != deployment.Generation |
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.
this increases spam, doesn't it?
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.
or maybe I don't get what the new line shoul dbe doing
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.
why would it? It compares the previous generation for the deployment with its current, and if they don't match, it sets them to be equal, therefore
cluster-authentication-operator/pkg/controllers/deployment/deployment_controller.go
Lines 164 to 165 in 82e8f18
deployment, _, err := resourceapply.ApplyDeployment(c.deployments, syncContext.Recorder(), expectedDeployment, | |
resourcemerge.ExpectedDeploymentGeneration(expectedDeployment, operatorConfig.Status.Generations)) |
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.
got it
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: stlaz, sttts 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 |
/cherry-pick release-4.6 |
@stlaz: once the present PR merges, I will cherry-pick it on top of release-4.6 in a new PR and assign it to you. In response to this:
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. |
@stlaz: All pull requests linked via external trackers have merged: Bugzilla bug 1891758 has been moved to the MODIFIED state. In response to this:
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. |
@stlaz: new pull request created: #367 In response to this:
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. |
When authentication.operator observedGeneration and readyReplicas
get set before the observed deployment's generation, the last element
would have never gotten set and the ApplyDeployment function would have
kept reporting deployment update event endlessly.