The test assumes the threads would schedule in particular way, but they don't.
But what we really care to check is that we thread in the proper RL and it works.
We don't need to check that underlying queue impl works, that's done in its own tests.
So just verify these two things.
* Various cleanups around the codebase
- unindent the else after return
- make things private that are not used anywhere
- rearrange params
- etc
* add
I see this in Serving:
```
=== CONT TestSecretVolume
kubelogs.go:197: I 11:01:04.358 controller-79bd7dbf6b-d4fkg [revision-controller] [serving-tests/secret-volume-dgqznzoi-jq457] Reconcile succeeded. Time taken: 21.144µs
kubelogs.go:197: I 11:01:04.621 webhook-59bb47db88-wpwbw [conversion/conversion.go:133] [serving-tests/projected-secret-volume-ogqtvwfy] Converting [kind=Service group=serving.knative.dev version=v1] to version serving.knative.dev/v1alpha1
```
The projected volume inclusion is clearly a collision due to matching suffix.
Since we expect this to be a resource name prefix, expect to see the `/` delimiter prior to is in the key.
Drop GOPATH from all except verify (codegen needs it), and change directories to just use workspace.
Switch to Go 1.15 (go.mod actually controls what's used IIUC).
* include a filter on control plane namespaces for defaulting and validation webhooks from knative/pkg
* Update unit tests to include control-plane
* adding a comment to explain why we are adding 'control-plane' to the webhook config
* Use real synchronization to make sure we get four exports in the OpenCensus test.
* Fix a few bugs in the metrics implementation:
1. We could create two OpenCensus exporters for the empty resource, which would cause double-reporting
2. Add a mechanism to clear out background Meter threads to to prevent them exporting in subsequent tests.
* Remove ErrGroup from kubelogs altogether
The latest change makes eg never to exit. In reality we don't really need EG there at all
and can just store the error.
This will return the _latest_ error, but 🤷
* fix
`eg.Wait` cannot be called before `eg.Go` without tripping Go's race detection.
Internally errgroup uses sync.Wait, which has [the following](https://godoc.org/sync#WaitGroup.Add) warning:
> Note that calls with a positive delta that occur when the counter is zero must happen before a Wait
When `eg.Go` isn't clearly called prior to `eg.Wait` the read of the error field in `eg.Wait` races with the
assignment of the error field in the once of `eg.Go`.
* Set reporting period for all meters
* using switch statement to simplify
* Change 60 seconds to a minute
* Add a test case for openCencus customed reporting period
* Allow creating controller with custom RateLimiter.
Which was possible before via field modification.
Not switching to a builder pattern mostly for speed of resolution.
Happy to consider alternatives.
* Add tests for new functionality.
Specifically, these test that the Wait() function is notified about
the item, and that the RateLimiter is passed through to the queue.
* Add Options. Gophers love Options.
* Even moar controller GenericOptions.
* Attempt to appease lint, don't create struct for typecheck.
* GenericOptions -> ControllerOptions
* Public struct fields.
* Allow to specify service name and hostPort for zipkin tracing
This patch allows to specify service name and hostPort for zipkin tracing.
Currently the serviceName(display in the console) and
hostPort(endpoint) must be same name.
To make matters worse, the hostPort only supports `80` port.
This patch allows to specify both serviceName and hostPort. Also,
hostPort can be `IP:PORT` format for port customization.
* Fix review comments
* Remove port