-
Notifications
You must be signed in to change notification settings - Fork 95
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
pkg/controller/status/status: Set reasons for conditions #114
Conversation
We've been light on reasons for expected conditions like Progressing=False since 80ab923 (Initial support operator commit, 2019-04-02). But if we feel like we have a message we want to set to help humans understand the condition, we should be setting a reason string for machines too. AsExpected follows the library-go precedent [1]. The "Degraded" reason I'm adding here isn't a great fit for a progressing reason, but does match the current logic used to set Progressing=True. The insights operator doesn't actually supply any in-cluster APIs beyond ClusterOperator as far as I can tell, so it's not clear to me what sort of progressing it would do except its internal intialization (which I give a new "Initializing" reason). But adding an odd reason seemed easy enough, and we can always circle back later and remove this Progressing=True case if we decide we don't need it. [1]: https://github.com/openshift/library-go/blob/94c59dec54be25c8527e51e8c0a885712aeb01b5/pkg/operator/status/condition.go#L67
/retest |
@wking, could you please add BZ Bug prefix, which would allow us to merge it historically. Is it ok to merge all the way to 4.2 ? |
Is this serious enough to backport? 4.2 at least is maintenance mode, and I'm pretty sure this does not meet that bar. I was expecting it to land next week once 4.5 forks off master and never be backported at all. |
Ok, I agree this is a minor change. The reasoning behind this was to allow future collaborators effortless automatic merge as much as possible. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: martinkunc, wking 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 |
@wking Actually, I could backport this for you if you dont mind. I am sure being proactive will save future mergers some, even minimal effort. There are many people committing to repo nowadays. |
/retest Please review the full test history for this PR and help us cut down flakes. |
15 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
We've been light on reasons for expected conditions like
Progressing=False
since 80ab923. But if we feel like we have a message we want to set to help humans understand the condition, we should be setting a reason string for machines too.AsExpected
follows the library-go precedent.The
Degraded
reason I'm adding here isn't a great fit for a progressing reason, but does match the current logic used to setProgressing=True
. The insights operator doesn't actually supply any in-cluster APIs beyond ClusterOperator as far as I can tell, so it's not clear to me what sort of progressing it would do except its internal intialization (which I give a newInitializing
reason). But adding an odd reason seemed easy enough, and we can always circle back later and remove thisProgressing=True
case if we decide we don't need it.