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

📖 Condition CAEP #3017

Merged

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
This PR brings the CAEP for introducing conditions in Cluster API

The discussion on the Google doc are addressed, with expectation for:

  • Confirming/Removing the Severity field
  • Adding the ObservedGerneration field

Moving here for getting feedback from a broader adience

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
xref #3005

/assing @vincepri
/assing @ncdc

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 6, 2020
@k8s-ci-robot k8s-ci-robot requested review from justinsb and ncdc May 6, 2020 15:31
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 6, 2020
@vincepri
Copy link
Member

vincepri commented May 6, 2020

/hold

for community consensus

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2020
@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-capd-e2e b757b2d link /test pull-cluster-api-capd-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

docs/proposals/20200506-conditions.md Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
@fabriziopandini fabriziopandini changed the title 📖Condition CAEP 📖 Condition CAEP May 7, 2020
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
Once there will be an agreed design for the condition types, a second iteration will start
with the following goals:

1. To define the first set of conditions on the different Cluster API objects.
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to be conflated with the first interaction. In order to come up with a sane data model we need to have first a clear understanding and view for each component needs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed. Done
however, even if we are conflating iterations, please note those objectives are still non-goals

  • To pre-define every possible condition.
  • To define the exact semantic for every condition introduced in the proposal
    This should be done by implementation PR once there is an agreement on data structure and on constraints/design principles for defining conditions.


The goal of this first iteration is:

1. To agree on a design for the condition types.
Copy link
Member

Choose a reason for hiding this comment

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

I think that to agree on a design for the condition types we need to include as goals a list of user stories traversing capi components which are not well communicated today but they will with the new conditions. Then in the "Implementation" section we can elaborate how we'll achieve these goals fleshing out where we set those conditions, which values and how the user can see them in a meaningful manner.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we should preserve the distinction between goals and user stories, but I agree on expanding the implementation section with user stories and examples traversing CAPI components (see new commits)

Copy link
Contributor

@davidewatson davidewatson left a comment

Choose a reason for hiding this comment

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

This was a pleasure to read, thanks for creating it!

docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
The `Severity` field MUST be set only when `Status=False` and it is designed to provide a standard classification
of possible conditions failure `Reason`.

Please note that the combination of `Reason` and `Severity` gives different meaning to a condition failure
Copy link
Contributor

Choose a reason for hiding this comment

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

Given my comment above about what a condition is, I wonder if Severity might be the wrong word, or even mechanism, for classifying conditions. The information encoded there (i.e. Info, Warning, Error) comes from logging, and even there some people dispute whether there is a need for more than Info and Error. Is there a more specific word, which applies to all conditions, which we can use? Or should we just treat Conditions as freeform messages and force callers to know which conditions they care about ahead of time? Could we have a convention for encoding whether a Condition is terminal or not in Type?

I would also be curious if this discussion has come up in SIG API Machinery...

Sorry if this note is confusing at all! I probably need to review @bgrant0607's conditions references in more detail...

Copy link
Member Author

Choose a reason for hiding this comment

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

The information encoded there (i.e. Info, Warning, Error) comes from logging

True, but this is also a generally understood way to express:

  • You are good
  • You should take a look
  • You have some problems

I wonder if Severity might be the wrong word

I have considered ReasonClass, ReasonCategory, but at the end opted for Severity because the focus here is in catching the user's attention.
But I'm more than happy to hear suggestions here...

should we just treat Conditions as freeform messages and force callers to know which conditions they care about ahead of time

free form message is difficult for consumers, so we are encoding ConditionTypes, Reason, and Severity to make it easier to deal with conditions

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 11, 2020
@fabriziopandini
Copy link
Member Author

@davidewatson @enxebre @ncdc @vincepri thanks for the feedback!
I have updated the proposal adding use cases and examples as requested; as a consequence,
we are now aiming to a single iteration of the proposal.

@vincepri
Copy link
Member

Holding for 1 more week for async consensus

@benmoss
Copy link

benmoss commented May 12, 2020

docs/proposals/20200506-conditions.md Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Outdated Show resolved Hide resolved
docs/proposals/20200506-conditions.md Show resolved Hide resolved
@ncdc ncdc added the kind/proposal Issues or PRs related to proposals. label May 13, 2020
@fabriziopandini
Copy link
Member Author

fabriziopandini commented May 20, 2020

@vincepri @ncdc @benmoss @detiber I have addressed comment about risks of using a consistent polarity and relaxed naming convention rules, PTAL.

WRT to the management of the "Unknown" state, I have found a consideration in the recent Kubernetes KEP that IMO clearly defines the problem:

"Unknown" is a fact about the writer of the condition and not a claim about the object

I agree also on the proposed remediation, which is to require the condition author to clearly document the meaning of the "Unknown" state for each condition.

TL;DR. even if "Unknown" might vary case by case and we should document this, consistent polarity clarifies the meaning of "True" and "False" and this is an improvement vs having different interpretations for all the three possible condition states.

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, vincepri

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:
  • OWNERS [fabriziopandini,vincepri]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vincepri
Copy link
Member

Before merging, let's squash and change the status of the proposal to implementable

@vincepri
Copy link
Member

/milestone v0.3.x

@k8s-ci-robot k8s-ci-robot added this to the v0.3.x milestone May 20, 2020
@fabriziopandini
Copy link
Member Author

let's squash and change the status of the proposal to implementable

done

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/hold cancel
/assign @ncdc @detiber
for final lgtm

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 20, 2020
@detiber
Copy link
Member

detiber commented May 21, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 21, 2020
@k8s-ci-robot k8s-ci-robot merged commit 08e9060 into kubernetes-sigs:master May 21, 2020
@fabriziopandini fabriziopandini deleted the conditions-caep branch May 24, 2020 08:46
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/proposal Issues or PRs related to proposals. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants