Repository navigation
refactor revision lifecycle status markers - #5804
Conversation
|
Hi @nimakaviani. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/assign @dgerd |
|
/ok-to-test |
knative-prow-robot
left a comment
There was a problem hiding this comment.
@vagababov: 12 warnings.
Details
In response to this:
/lint
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.
|
wrt lint issues, I believe the names are pretty self explanatory. I am willing to ignore linter warnings unless you all feel otherwise. |
|
/retest |
|
I do believe in 0 linter warnings :-) |
|
The following jobs failed:
Automatically retrying due to test flakiness... |
68cefa9 to
3a007c3
Compare
|
/lint |
knative-prow-robot
left a comment
There was a problem hiding this comment.
@nimakaviani: 0 warnings.
Details
In response to this:
/lint
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.
|
The following is the coverage report on the affected files.
|
| // MarkActive calls .Status.MarkActive on the Revision. | ||
| func MarkActive(r *v1alpha1.Revision) { | ||
| r.Status.MarkActive() | ||
| r.Status.MarkActiveTrue() |
There was a problem hiding this comment.
Is there a reason that we are deviating the names of MarkXxx functions from their respective revision status methods?
There was a problem hiding this comment.
We tied the function names to the ConditionType plus the status they can have (True, False or Unknown) and decided to keep the naming verbose (so MarkActiveTrue() rather than MarkActive()). see this #5804 (comment)
| func MarkDeploying(reason string) RevisionOption { | ||
| return func(r *v1alpha1.Revision) { | ||
| r.Status.MarkDeploying(reason) | ||
| r.Status.MarkResourcesAvailableUnknown(reason, "") |
There was a problem hiding this comment.
Is there a reason we are removing some of the MarkXxx methods off of revision status?
There was a problem hiding this comment.
MarkDeploying() is not a ConditionType but a helper function that alters two condition types. No longer needed if we explicitly set condition types.
serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go
Lines 171 to 174 in 1d26395
|
There's an outstanding issue with consistent naming convention for the |
|
This is very similar to the pattern proposed in the other issue. It follows I don't see a benefit in having to map a set of states to another set of states (i.e. NotReady == Unknown). In addition |
|
@dgerd @vagababov if you all are happy with comments on functions and constants, I think the PR is ready to go. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dgerd, nimakaviani The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #5780