mirror of https://github.com/knative/pkg.git
				
				
				
			| * Do not set to unknown status when all dependents passed unhappy check
`accessor.GetConditions()` in `findUnhappyDependent()` gets status
filed from runtime. So, if an object has following status:
```
  status:
    address:
      url: http://hello-example.default.svc.cluster.local
    conditions:
    - lastTransitionTime: "2020-04-02T09:49:03Z"
      status: "True"
      type: AllTrafficAssigned
    - lastTransitionTime: "2020-04-02T09:49:03Z"
      message: autoTLS is not enabled
      reason: AutoTLSNotEnabled
      severity: Info
      status: "True"
      type: CertificateProvisioned
    - lastTransitionTime: "2020-04-02T09:49:05Z"
      status: "True"
      type: IngressReady
    - lastTransitionTime: "2020-04-02T09:49:05Z"
      status: "True"
      type: Ready
```
`accessor.GetConditions()` returns AllTrafficAssigned,
CertificateProvisioned, IngressReady (and Ready).
Then, current code (`len(r.dependents) != len(conditions)`) sets to
Unknown if all conditions are not unhappy. However, it does not work
if we added a new dependent and downgraded the cluster because
the number of dependents is less than current status conditions.
If all dependents are verified, it should not set to unknown
status. So, this patch changed it.
* Add unit test | ||
|---|---|---|
| .. | ||
| duck | ||
| test | ||
| testing | ||
| OWNERS | ||
| condition_set.go | ||
| condition_set_impl_test.go | ||
| condition_set_test.go | ||
| condition_types.go | ||
| condition_types_test.go | ||
| contexts.go | ||
| contexts_test.go | ||
| convert.go | ||
| convert_test.go | ||
| deprecated.go | ||
| deprecated_test.go | ||
| doc.go | ||
| field_error.go | ||
| field_error_test.go | ||
| interfaces.go | ||
| kind2resource.go | ||
| kind2resource_test.go | ||
| metadata_validation.go | ||
| metadata_validation_test.go | ||
| url.go | ||
| url_test.go | ||
| volatile_time.go | ||
| volatile_time_test.go | ||
| zz_generated.deepcopy.go | ||