-
Notifications
You must be signed in to change notification settings - Fork 162
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
Enhance Condition Messages for Better Clarity and Debugging #416
base: main
Are you sure you want to change the base?
Conversation
newGraphVerifiedCondition(metav1.ConditionFalse, err.Error()), | ||
newReconcilerReadyCondition(metav1.ConditionUnknown, "Faulty Graph"), | ||
newCustomResourceDefinitionSyncedCondition(metav1.ConditionUnknown, "Faulty Graph"), | ||
newGraphVerifiedCondition(metav1.ConditionFalse, "GraphValidationFailed"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need to let err.Error into the condition message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Condition Reason
needs to be a Key not a free form text field.
newGraphVerifiedCondition(metav1.ConditionTrue, ""), | ||
newCustomResourceDefinitionSyncedCondition(metav1.ConditionTrue, ""), | ||
newReconcilerReadyCondition(metav1.ConditionFalse, err.Error()), | ||
newGraphVerifiedCondition(metav1.ConditionTrue, "GraphValidated"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am shocked setting reason to "" worked before, this violates the built in type validation of conditions if you use the upstream open api.
Problem Statement
status.conditions
field does not fully adhere to Kubernetes conventions.Step 1: Standardizing Condition Types
Step 2: Improving Condition Messages
Step 3: Refining Condition Reasons
FaultyGraph
,InvalidCEL
, andCRDNotSynced
.Outcome
status.conditions
now follow Kubernetes conventions.