-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conditions for non-Fatal conditions #2394
Comments
looks good to me It might be nice to add something like log level to the condition?
default role or no role == main line happy or fatal condition. |
@n3wscott My bias is to not, since these are a straight copy from the K8s API Principles. |
Can we call them "terminal" and "non-terminal"? I nominate that (conventionally) terminal conditions end in |
@sixolet I think this is difficult until we have API versioning (cc @jonjohnsonjr ) |
Oh, as in we already have conditions we want to be terminal named random other things you mean? Yeah, maybe "going forward we do this"? What other ways might we have of seeing at a glance which conditions are terminal? We can't add a field (the condition schema comes from k8s) I don't think I want to write code to depend on the names of conditions, I just want my brain to be able to sort them pleasantly. |
Exactly.
I'm curious if/how the influence of the subcondition on the Ready condition is useful/relevant for the client to know? I think that in the most interesting cases for warnings, a condition turns I am curious what patterns you are thinking about that might not fit this naive mold? |
The proposal given was suppose to be how conditions worked but I think it just has a bug. |
@n3wscott I have a fix :) |
This adjusts the condition that the activator keys off of to determine whether it can start forwarding requests to the Revision. In the current world, this change is just splitting hairs because these conditions end up being largely the same; however, this is relevant cleanup if we want to shift to a world where `Active=False` does not trigger `Ready=False` because requests to the activator would incorrectly see an `IsReady()` Revision and incorrectly forward traffic. Peripherally related to: knative#2394
This adjusts the condition that the activator keys off of to determine whether it can start forwarding requests to the Revision. In the current world, this change is just splitting hairs because these conditions end up being largely the same; however, this is relevant cleanup if we want to shift to a world where `Active=False` does not trigger `Ready=False` because requests to the activator would incorrectly see an `IsReady()` Revision and incorrectly forward traffic. Peripherally related to: knative#2394
The subconditions of Ready are most interesting in showing the user their progress as the components of being Ready get ticked off one-by-one. For that, we wouldn't show warning conditions, we'd just show the warning after we've resolved whatever else has happened. For example, when deploying you might see:
And then later
Representing the ConfigurationsReady and RoutesReady status conditions of Service, respectively. (or the CLI might dig deeper into the status conditions of Revision, and display a mix of status conditions for the two as stages) Either way, non-terminal conditions aren't things we check off exactly, so we wouldn't include them. |
This adjusts the condition that the activator keys off of to determine whether it can start forwarding requests to the Revision. In the current world, this change is just splitting hairs because these conditions end up being largely the same; however, this is relevant cleanup if we want to shift to a world where `Active=False` does not trigger `Ready=False` because requests to the activator would incorrectly see an `IsReady()` Revision and incorrectly forward traffic. Peripherally related to: knative#2394
That does beg the question of how we show them :) |
This adjusts the condition that the activator keys off of to determine whether it can start forwarding requests to the Revision. In the current world, this change is just splitting hairs because these conditions end up being largely the same; however, this is relevant cleanup if we want to shift to a world where `Active=False` does not trigger `Ready=False` because requests to the activator would incorrectly see an `IsReady()` Revision and incorrectly forward traffic. Peripherally related to: #2394
Do non-terminal statuses need to be Conditions? What if status:
conditions:
- lastTransitionTime: 2018-11-02T17:11:37Z
status: "True"
type: BuildSucceeded
- lastTransitionTime: 2018-11-02T17:11:42Z
status: "True"
type: ContainerHealthy
- lastTransitionTime: 2018-11-02T17:11:42Z
status: "True"
type: Ready
- lastTransitionTime: 2018-11-02T17:11:42Z
status: "True"
type: ResourcesAvailable
active:
lastTransitionTime: 2018-11-02T17:32:57Z
status: "False" Alternatively, we could have a generic Conditions-like-thing called "States" that provided some sort of lifecycle tracking if desired. |
I'd like to see non-terminal statuses be Condition-like, though I don't need them to be in Conditions. That way vendors can add warnings about arbitrary vendor-specific things as needed. |
This change updates the `ConditionSet` datatype to treat the set of conditions that it is initially supplied with as the set of "terminal" conditions, where as before: 1. If all `True`, results in `Ready=True` 2. If any `False`, results in `Ready=False` 3. Otherwise, `Ready=Unknown` However, in additional to this initial "terminal" set, other conditions may be set that are "non-terminal" and have no influence over the "happy" condition (e.g. `Ready`). Related to: knative/serving#2394
Is |
I could see some users wanting a warning indication that hitting their service would incur additional latency due to cold starts. (shrug) |
Related to: knative#2394
Related to: knative#2394
Related to: knative#2394
We decided to move ahead with this in the API Working Group today. In addition to the initial proposal, we want to add a sort of "log level" to indicate the severity of subconditions. @evankanderson added from slack:
I think this field name is clear, as are the values. I think the one thing I'd quibble about is the "default" aspect. I think we instead want:
|
I like the severity field; I don't understand how Info is any more breaking than Warning though. |
This adds a Severity field to our common Condition type, as outlined [here](knative/serving#2394 (comment)). The only way Severity is populated in this change is: * Terminal conditions (passed at initial construction) always result in `severity: Error`, * non-Terminal conditions (added outside initial set) always result in `severity: Info`. We should think about how we want to update the `Condition{Set,Manager}` interfaces to surface more control (e.g. `severity: Warning`).
Related to: knative#2394
Related to: knative#2394
Related to: knative#2394
Related to: knative#2394
* Update the ConditionSet to support non-terminal conditions. This change updates the `ConditionSet` datatype to treat the set of conditions that it is initially supplied with as the set of "terminal" conditions, where as before: 1. If all `True`, results in `Ready=True` 2. If any `False`, results in `Ready=False` 3. Otherwise, `Ready=Unknown` However, in additional to this initial "terminal" set, other conditions may be set that are "non-terminal" and have no influence over the "happy" condition (e.g. `Ready`). Related to: knative/serving#2394 * Add severity handling to ConditionSet. This adds a Severity field to our common Condition type, as outlined [here](knative/serving#2394 (comment)). The only way Severity is populated in this change is: * Terminal conditions (passed at initial construction) always result in `severity: Error`, * non-Terminal conditions (added outside initial set) always result in `severity: Info`. We should think about how we want to update the `Condition{Set,Manager}` interfaces to surface more control (e.g. `severity: Warning`).
Related to: knative#2394
Related to: knative#2394
Related to: knative#2394
We've picked up changes from knative/pkg that do this, and Active is about to become non-terminal in #2397 |
cc @n3wscott @sixolet @evankanderson @steren @cooperneil
tl;dr This issue proposes the introduction of new non-Fatal sub-conditions, which would NOT result in a change to the "happy condition" on changes. These would be suitable for non-Fatal warnings about the state of the resource.
Feedback welcome.
Background
Today, all subconditions contribute towards overall readiness, per
errors.md
:To manage these conditions, we use a shared library (thanks @n3wscott ) that defines the following for managing the "happy" (e.g.
Ready
) condition based on the collective state of the rest:This inherently makes all of our sub-conditions what I'll call "Fatal".
Problems of Today
One of the places this bites us today is the
Active
condition, where we need to surface inactivity (so the Route can hook in the activator pre-stop until #1997 happens). The unfortunate side-effect of this is that the overall Revision reportsReady=False
, which propagates toConfiguration
andService
:One can imagine other scenarios where surfacing a warning is preferable to an outright failure state.
Proposal
I propose that we relax the requirement that all sub-conditions (potentially) trigger happy-state changes, and partition the sub-conditions of a type as follows:
With this, the Revision status above would change to:
The text was updated successfully, but these errors were encountered: