You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The proposal here is to create True/Unknown/False functions for each ConditionType and a struct type to pass the remaining relevant string information.
For example,
const (
ReasonDeadlineExceeded = "ProgressDeadlineExceeded"
ReasonNotOwned = "NotOwned"
...
)
/// These methods pre-set Type/Status/Severity. They take a Reason and Message for Unknown/False status.
MarkResourcesAvailableTrue()
MarkResourcesAvailableUnknown(reason, message string)
MarkResourcesAvailableFalse(reason, message string)
func ExitCodeReason(exitCode int32) string { ...}
The proposal here is to create True/Unknown/False functions for each ConditionType and a struct type to pass the remaining relevant string information.
For example,
const (
ReasonDeadlineExceeded = "ProgressDeadlineExceeded"
ReasonNotOwned = "NotOwned"
...
)
/// These methods pre-set Type/Status/Severity. They take a Reason and Message for Unknown/False status.
MarkResourcesAvailableTrue()
MarkResourcesAvailableUnknown(reason, message string)
MarkResourcesAvailableFalse(reason, message string)
func ExitCodeReason(exitCode int32) string { ...}
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.
looks like lifecycle functions for other resources can also benefit from similar refactoring. once I have the first PR approved, I can refactor those functions as well.
Activity
knative-prow-robot commentedon Oct 9, 2019
@dgerd: The label(s)
kind/proposalcannot be applied. These labels are supported: ``Details
In response to this:
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.
nimakaviani commentedon Oct 10, 2019
I can take a stab at refactoring it.
refactor revision lifecycle status markers
nimakaviani commentedon Oct 15, 2019
looks like lifecycle functions for other resources can also benefit from similar refactoring. once I have the first PR approved, I can refactor those functions as well.
refactor revision lifecycle status markers
refactor revision lifecycle status markers (#5804)