Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Simplify condition handling #119

Merged
merged 1 commit into from
Jan 16, 2022

Conversation

adrianludwin
Copy link
Contributor

While implementing managed labels, I found two problems with our
condition handling:

  1. They were using old terminology like "Critical Condition" instead of
    the newer "ActivitiesHalted".
  2. Instead of identifying problems like cycles right away, we delayed
    their identification until the end of the syncing process. This means
    that code that depends on knowing about cycles - like setting tree
    labels - needed to be at the end of the sync process instead of in the
    middle where they belonged (and couldn't set conditions themselves).

This change fixes both problems.

Tested: all existing unit/integ tests; no change in functionality.

While implementing managed labels, I found two problems with our
condition handling:

1. They were using old terminology like "Critical Condition" instead of
the newer "ActivitiesHalted".
2. Instead of identifying problems like cycles right away, we delayed
their identification until the end of the syncing process. This means
that code that depends on knowing about cycles - like setting tree
labels - needed to be at the end of the sync process instead of in the
middle where they belonged (and couldn't set conditions themselves).

This change fixes both problems.

Tested: all existing unit/integ tests; no change in functionality.
@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 Jan 12, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianludwin

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 12, 2022
@adrianludwin
Copy link
Contributor Author

/assign @rjbez17

This is the first of three PRs to implement #47

@adrianludwin
Copy link
Contributor Author

I forget if I can self-approve or not...

/lgtm

@k8s-ci-robot
Copy link
Contributor

@adrianludwin: you cannot LGTM your own PR.

In response to this:

I forget if I can self-approve or not...

/lgtm

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.

@adrianludwin
Copy link
Contributor Author

Nope :) Will wait for Ryan

@rjbez17
Copy link
Contributor

rjbez17 commented Jan 16, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 16, 2022
@k8s-ci-robot k8s-ci-robot merged commit bad9db5 into kubernetes-retired:master Jan 16, 2022
@adrianludwin adrianludwin deleted the cond-simplify branch March 24, 2022 14:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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. lgtm "Looks good to me", 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.

3 participants