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

Bug 1891758: deployment: update event spam #365

Merged
merged 1 commit into from Oct 27, 2020

Conversation

stlaz
Copy link
Member

@stlaz stlaz commented Oct 27, 2020

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.

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.
@openshift-ci-robot
Copy link
Contributor

@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:

JSONRPC error 1004: The combination of ext_type_* fields matched more than one External Tracker.
Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1891758: deployment: update event spam

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.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 27, 2020
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
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Member Author

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

deployment, _, err := resourceapply.ApplyDeployment(c.deployments, syncContext.Recorder(), expectedDeployment,
resourcemerge.ExpectedDeploymentGeneration(expectedDeployment, operatorConfig.Status.Generations))
no longer spams an update event in every loop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it

@sttts
Copy link
Contributor

sttts commented Oct 27, 2020

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2020
@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@stlaz
Copy link
Member Author

stlaz commented Oct 27, 2020

/cherry-pick release-4.6

@openshift-cherrypick-robot

@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:

/cherry-pick release-4.6

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.

@openshift-merge-robot openshift-merge-robot merged commit cc9d50e into openshift:master Oct 27, 2020
@openshift-ci-robot
Copy link
Contributor

@stlaz: All pull requests linked via external trackers have merged:

Bugzilla bug 1891758 has been moved to the MODIFIED state.

In response to this:

Bug 1891758: deployment: update event spam

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.

@openshift-cherrypick-robot

@stlaz: new pull request created: #367

In response to this:

/cherry-pick release-4.6

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.

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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants