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

Update the ConditionSet to support non-terminal conditions. #161

Merged
merged 2 commits into from
Nov 8, 2018

Conversation

mattmoor
Copy link
Member

@mattmoor mattmoor commented Nov 2, 2018

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

I'm putting a /hold on this until we discuss at next week's API WG.

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
@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 2, 2018
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 2, 2018
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 2, 2018
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@mattmoor: 0 warnings.

In response to this:

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

I'm putting a /hold on this until we discuss at next week's API WG.

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.

Copy link
Contributor

@n3wscott n3wscott left a comment

Choose a reason for hiding this comment

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

/lgtm

}

// set the happy condition
r.SetCondition(Condition{
Copy link
Contributor

Choose a reason for hiding this comment

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

I was so close!

types := []ConditionType{t}
for _, cond := range r.dependents {
if cond == t {
types = append(types, r.happy)
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch!

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2018
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, n3wscott

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

mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 2, 2018
To allow treating `BuildSucceeded` as a terminal condition when we adjust the model as outlined in knative/pkg#161, we need to pass it to the `ConditionSet` constructor.  This flushes out the downstream changes of that.
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 3, 2018
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 3, 2018
To allow treating `BuildSucceeded` as a terminal condition when we adjust the model as outlined in knative/pkg#161, we need to pass it to the `ConditionSet` constructor.  This flushes out the downstream changes of that.
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 3, 2018
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`).
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 7, 2018
@mattmoor
Copy link
Member Author

mattmoor commented Nov 7, 2018

I've updated this with Severity and some basic management thereof.

/hold

I am putting a hold on this because I'd like to coordinate this going in with an update to knative/serving, since I suspect the table tests will explode, and I'd like to get in front of that.

@n3wscott
Copy link
Contributor

n3wscott commented Nov 8, 2018

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2018
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 8, 2018
To allow treating `BuildSucceeded` as a terminal condition when we adjust the model as outlined in knative/pkg#161, we need to pass it to the `ConditionSet` constructor.  This flushes out the downstream changes of that.
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 8, 2018
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 8, 2018
To allow treating `BuildSucceeded` as a terminal condition when we adjust the model as outlined in knative/pkg#161, we need to pass it to the `ConditionSet` constructor.  This flushes out the downstream changes of that.
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 8, 2018
knative-prow-robot pushed a commit to knative/serving that referenced this pull request Nov 8, 2018
To allow treating `BuildSucceeded` as a terminal condition when we adjust the model as outlined in knative/pkg#161, we need to pass it to the `ConditionSet` constructor.  This flushes out the downstream changes of that.
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 8, 2018
@mattmoor
Copy link
Member Author

mattmoor commented Nov 8, 2018

/hold cancel

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2018
@knative-prow-robot knative-prow-robot merged commit 4b704fa into knative:master Nov 8, 2018
@mattmoor mattmoor deleted the fix-n3wscott branch November 9, 2018 00:36
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 9, 2018
mattmoor added a commit to mattmoor/serving that referenced this pull request Nov 9, 2018
knative-prow-robot pushed a commit to knative/serving that referenced this pull request Nov 9, 2018
chengjingtao pushed a commit to katanomi/knative-pkg that referenced this pull request Oct 22, 2024
knative#161)

* feat:add function to list commit and add additional information to commit

* feat:set status for list commitstatus when one commit failed (knative#168)

* add debug log

* feat: Add pagging metadata to ListMeta

* feat: Adds convert http response error into kubernetes error

* fix: boilerplate on new file

Co-authored-by: jjzhang <jjzhang@alauda.io>
Co-authored-by: Daniel <danielfbm@gmail.com>
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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants