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

Cleanup condition handling #47

Merged
merged 4 commits into from
Jun 28, 2023
Merged

Cleanup condition handling #47

merged 4 commits into from
Jun 28, 2023

Conversation

loganmc10
Copy link
Contributor

@loganmc10 loganmc10 commented Jun 27, 2023

Right now, the Conditions section of the Status is very busy.

I've condensed it all into a single Condition type (Reconciled), which is either True or False.

If the reconcile loop is progressing, or something has failed, it will be "False" with a reason. Once the Reoncile is complete, it will be "True"

@loganmc10 loganmc10 self-assigned this Jun 27, 2023
@loganmc10 loganmc10 marked this pull request as ready for review June 27, 2023 14:03
@loganmc10
Copy link
Contributor Author

I tested this (by applying the CR, and also by modifying it). It seems to work properly, now it looks like this when things are in progress:

status:
  conditions:
  - lastTransitionTime: "2023-06-27T13:43:53Z"
    message: ""
    observedGeneration: 3
    reason: ValidationSucceeded
    status: "True"
    type: Ready
  - lastTransitionTime: "2023-06-27T14:02:20Z"
    message: reconcile in progress
    observedGeneration: 3
    reason: ReconcileInProgress
    status: "False"
    type: Reconciled

and this when everything is complete:

status:
  conditions:
  - lastTransitionTime: "2023-06-27T13:43:53Z"
    message: ""
    observedGeneration: 2
    reason: ValidationSucceeded
    status: "True"
    type: Ready
  - lastTransitionTime: "2023-06-27T14:01:58Z"
    message: reconcile succeeded
    observedGeneration: 2
    reason: ReconciliationSucceeded
    status: "True"
    type: Reconciled

and this when one of the steps fails:

status:
  conditions:
  - lastTransitionTime: "2023-06-27T13:43:53Z"
    message: ""
    observedGeneration: 3
    reason: ValidationSucceeded
    status: "True"
    type: Ready
  - lastTransitionTime: "2023-06-27T14:22:38Z"
    message: test error
    observedGeneration: 3
    reason: CatalogReconciliationFailed
    status: "False"
    type: Reconciled

@loganmc10 loganmc10 requested a review from danielchg June 27, 2023 14:51
Copy link
Contributor

@danielchg danielchg left a comment

Choose a reason for hiding this comment

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

LGTM

@danielchg danielchg merged commit 62cfc79 into main Jun 28, 2023
@danielchg danielchg deleted the conditions branch June 28, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants