[master] Auto-update dependencies (#234)

Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
This commit is contained in:
Matt Moore 2020-03-19 14:18:07 -07:00 committed by GitHub
parent 0f1d90796c
commit 9729e19dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 5 deletions

6
Gopkg.lock generated
View File

@ -966,7 +966,7 @@
[[projects]]
branch = "master"
digest = "1:7fce3b5a8d117763efbf4b6b9862940a5472d276022b0b324b39b70ef4fa77bd"
digest = "1:94d7cfde4eee652c089b47f0200b86bc28e618de18a2e5368b0bbc8e2b601026"
name = "knative.dev/pkg"
packages = [
"apis",
@ -986,7 +986,7 @@
"reconciler",
]
pruneopts = "T"
revision = "42d1b005c814b8f9ea786ff89c90c91448c1417a"
revision = "c13e86e2d4f484f1dd3b8ca6474994c16da74f20"
[[projects]]
branch = "master"
@ -997,7 +997,7 @@
"tools/dep-collector",
]
pruneopts = "UT"
revision = "e7f947d615d5eb623e80824f71d139a958c4019f"
revision = "64929018c86389e47a88782619565b6d099c0a5a"
[[projects]]
digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c"

4
vendor/knative.dev/pkg/Gopkg.lock generated vendored
View File

@ -1350,14 +1350,14 @@
[[projects]]
branch = "master"
digest = "1:115d2f6e72ee06327259bdba21d26f28c359c62464afd73538fbab66ae2b7698"
digest = "1:3f2366ce9a05503ac8da902b58e898c285cc9a972e0e89fda0b2a2fedcd4fb46"
name = "knative.dev/test-infra"
packages = [
"scripts",
"tools/dep-collector",
]
pruneopts = "UT"
revision = "01c075fbeae4b089793fcca6fc855d31e1628cad"
revision = "e7f947d615d5eb623e80824f71d139a958c4019f"
[[projects]]
digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c"

View File

@ -75,6 +75,10 @@ type ConditionManager interface {
// true if all dependents are true.
MarkTrue(t ConditionType)
// MarkTrueWithReason sets the status of t to true with the reason, and then marks the happy
// condition to true if all dependents are true.
MarkTrueWithReason(t ConditionType, reason, messageFormat string, messageA ...interface{})
// MarkUnknown sets the status of t to Unknown and also sets the happy condition
// to Unknown if no other dependent condition is in an error state.
MarkUnknown(t ConditionType, reason, messageFormat string, messageA ...interface{})
@ -253,7 +257,25 @@ func (r conditionsImpl) MarkTrue(t ConditionType) {
Status: corev1.ConditionTrue,
Severity: r.severity(t),
})
r.recomputeHappiness(t)
}
// MarkTrueWithReason sets the status of t to true with the reason, and then marks the happy condition to
// true if all other dependents are also true.
func (r conditionsImpl) MarkTrueWithReason(t ConditionType, reason, messageFormat string, messageA ...interface{}) {
// set the specified condition
r.SetCondition(Condition{
Type: t,
Status: corev1.ConditionTrue,
Reason: reason,
Message: fmt.Sprintf(messageFormat, messageA...),
Severity: r.severity(t),
})
r.recomputeHappiness(t)
}
// recomputeHappiness marks the happy condition to true if all other dependents are also true.
func (r conditionsImpl) recomputeHappiness(t ConditionType) {
if c := r.findUnhappyDependent(); c != nil {
// Propagate unhappy dependent to happy condition.
r.SetCondition(Condition{