* Retry the connection refused errors.
Some of the integration tests fail after Istio reprogramming
with `connection refused` errors.
They are usually transitive and are happening due to the Istio probes
temporarily failing after reprogramming.
With this change we'll retry those errors, hopefully reducing the
flakes.
* fix the error string
With this, the expectation is that folks can embed the following in
the status of their resource:
```go
type FooStatus struct {
duckv1alpha1.Status `json:",inline"`
// other fields
}
```
`ObservedGeneration` is important to the usefulness of our standard
conditions because `{Ready,Succeeded}: True` is only meaningful when
`.status.observedGeneration == .metadata.generation`.
When `.status.observedGeneration != .metadata.generation` it indicates
that the controller has not yet attempted to reconcile a change in the
desired state of the world (aka `spec:`).
* Modify the webhook to allow the use of duck types.
This change enables us to define a duck type that applies to a whole class of GroupVersionKinds and leverage it to perform generic validation, defaulting, etc.
Fixes: #322
* Fix typo
* split and update
* bug fixed
* change the copyright year
* use fake metadata in tests
* exclude test coverage for gcp_metadata
* add record
* add tests
* revert 2019 and add a new var
* change documents
* address comment
* change line
* Separate common monitoring methods into monitoring package
* Add doc.go to monitoring
* Update doc.go to add information about the public methods
* Fix build tests
Existing support for Zipkin tracing pushes the
responsibility of logging zipkin traces to
individual tests. This change moves the responsibility
to SpoofClient, so that all tests get it by default.
Traces are logged only for requests that have
encountered Server errors i.e if the
http.Response.StatusCode between 500 to 599.
For SpoofingClient.Poll calls we only log trace of the
final SpoofingClient.Do made.
* Add a variant of wait for status with explicit timeout.
This permits setting higher timeouts in the performance tests,
which it seems take longer to come to life.
* revert the default timeout change
* split and update
* bug fixed
* change the copyright year
* use fake metadata in tests
* exclude test coverage for gcp_metadata
* revert 2019 change on existing files
This is a breaking change, that can be fixed up by replacing `logger,` with `logger.Infof,` in the argument lists for these functions.
This is part of a larger cleanup to allow us to use alternate log methods like `t.Logf` in place of `BaseLogger`.
* Simplify and comment AppenRandomString
Port and rewrite the comment from the original.
Remove the sync.Once(). Initializing during package initialization is just as good.
Mutex doesn't have to be a pointer
* remove fancy rnd, remove mutex, add example, which would also check compilation
* actually commit the example
* add licence
* Metrics logging fix in pkg/test: Issue-3150
https://github.com/knative/serving/issues/3150 describes the issue
that currently exists in our test logging framework. This change
fixes the problem by prefixing metrics that needs to be emited by
a constant which the logging.ExpoxtSpan method then uses to identify
the spans that needs to be emitted as logs
Note this only fixes part of the issue:
https://github.com/knative/serving/issues/3150
this change needs to be ported to knative serving before the issue
can be closed.
* Update test/logging/logging.go
Adding required lines.
Co-Authored-By: dushyanthsc <43390008+dushyanthsc@users.noreply.github.com>
* Drop webhook logic to increment spec.generation
With Kubernetes 1.11+ metadata.generation now increments properly
when the status subresource is enabled on CRDs
For more details see: https://github.com/knative/serving/issues/643
* Drop the generational duck type
* Initial commit for the webhook to set the annotations about mutator.
The user that created or updated the resource will be set in the
annotations.
* update comments
* remove debug logging
* logging :/
* logging :/, returns
* logging :/ III
* error wrap
* simplify test
* rename the test
* add pkg/errors to the deps for better errors
* do not require CRD to implement Annotatable
* review issues
* fix interface as required by review
* Cleanup the webhook code.
- add more tests
- fix formatting
- fix logging and errors
- use shorthands
- some optimizations in types
- make code more Go'ey from C'ey.
* raise test coverage