Skip to content

Move the Route controllers "mark" methods into _types.go.#1113

Merged
google-prow-robot merged 1 commit intoknative:masterfrom
mattmoor:condition-helpers
Jun 8, 2018
Merged

Move the Route controllers "mark" methods into _types.go.#1113
google-prow-robot merged 1 commit intoknative:masterfrom
mattmoor:condition-helpers

Conversation

@mattmoor
Copy link
Copy Markdown
Member

@mattmoor mattmoor commented Jun 8, 2018

No description provided.

@google-prow-robot google-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 8, 2018
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/. Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/apis/serving/v1alpha1/route_types.go 58.3% 30.4% -27.9
pkg/controller/route/route.go 79.0% 78.1% -0.9
pkg/controller/route/route_test.go 79.0% 78.1% -0.9

*TestCoverage feature is being tested, do not rely on any info here yet

}

func (rs *RouteStatus) MarkTrafficNotAssigned(kind, name string) {
reason := kind + "Missing"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Doing this makes it difficult to grep for e.g. "RevisionMissing" if I'm trying to debug what's going on.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(surfacing offline convo) We don't expect "Reason" to have limited cardinality, or this would be an enumeration and we'd simply pass in the appropriate constant (like "Type"). Ack the grep difficulty, but I'm biasing towards not duplicating such sparsely used code.

@jonjohnsonjr
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2018
@google-prow-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonjohnsonjr, mattmoor

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@google-prow-robot google-prow-robot merged commit a1eeb65 into knative:master Jun 8, 2018
google-prow-robot pushed a commit that referenced this pull request Jun 11, 2018
* Move revision condition manipulation into revision_types.go

This is the Revision equivalent of #1113

This contains two other unrelated changes:
1. Condense the object construction in `revision_test.go`
1. Reorder the `helloworld` yaml to create the configuration first.

The reason for the second "unrelated" change is that I was seeing the route controller marking the Route as "AllTrafficAssigned = False" because the configuration wasn't created yet.

* Update the conditions spec to eliminate wording about elision.

Eliding conditions can come later, it's a premature optimization,
and I'm not sure we're handling conditions well enough to do it
reliably yet.

* Fix test breakages due to setCondition becoming private.

* Add unit test coverage of the condition logic.

* Clarify isBuildDone through local variable names.
google-prow-robot pushed a commit that referenced this pull request Jun 11, 2018
This is the Service equivalent of #1113, #1118, #1132

However, Service's condition are largely not implemented, so mostly deferred to: #1134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm 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.

4 participants