* Use http.Transport.Clone in preference to copy-pasting defaults
Since go 1.13 http.Transport has a Clone method which means we can
inherit and override the defaults rather than re-stating them. This also
makes it clear that we're overriding the http.DefaultTransport default
for ForceAttemptHTTP2, which we are.
* Enable disableKeepAlives
* Deep copy views to avoid races
* Use copy instead of append
* Update metrics/resource_view.go
Co-authored-by: Victor Agababov <vagababov@gmail.com>
* Update metrics/resource_view.go
Co-authored-by: Matt Moore <mattmoor@vmware.com>
Co-authored-by: Victor Agababov <vagababov@gmail.com>
Co-authored-by: Matt Moore <mattmoor@vmware.com>
Common use cases for this webhook involve using Kubernetes's
generateName API to randomise resource names (this is a good
idea in Tekton pipelines, for example, where there are uniqueness
constraints. That means that the webhook metrics here end up with
very high cardinality, which makes Prometheus fall over. Even
without generateName, it is possible to shoot oneself in the foot.
This commit just removes the resource_name label altogether.
* Upgrade suite types and tests
* Naively fixing upgrade suite tests
* Properly implement InstallingBase, and PreUpgradeTests
* Continual tests implemented
* UpgradeWith and PostUpgradeTests implemented
* DowngradeWith and PostDowngradeTests implemented
* zaptest.Buffer race removed
* Remove barely used testify/assert
* Ensure that VerifyContinualTests is always called if continual tests started
* Prepare tests for failure assertions
* Refactor to enable failure testing
* Prepare for failure testing
* Testing suite can fail now
* Prepare a failing test suite
* Mock testing.T implemented
* Failure testing works for single point
* Split testing code to more manageable pieces
* Tests for upgrade suite are working well
* Remove confusion about StopSignal type
A StopSignal has been splitted to 2 separate type private stoppable and
a StopEvent. StopEvent contains only elements that are essential for
implementors to use *testing.T and signalize end of stop & verify
procedure to upgrade suite.
* Introducing NewBackgroundVerification and WaitForStopEvent
Functions NewBackgroundVerification and WaitForStopEvent has
been introduced to ease implementers to write a simple setup &
verify background tests.
* Rework of "Starting continual tests"
* Removal of return value from background handler
* Move stop channel to be closer to background operation
* Remove unneeded Named interface
* Documenting public types
* Fixes to satisfy golangci-lint
* Final linting fixes
* Remove patch detail for webhook being logged on info
It might contain the sensitive data so print it to debug log
* Pass admission review info to the fields in structured logging
* Remove knative namespace from admission webhook logkey
* Use loosely-typed key-value pairs for suggered logger in admission wb
* Move admission specific logkey to local package
* Print patch type with patch body on debug log
* Teach the spoofing client to support NodePort.
This is loosely based on similar logic that I added to kingress conformance testing here:
611f989aa5/test/conformance/ingress/util.go (L904-L912)
The basic idea is that in our custom dialer we look at the requested port and translate that to the service's NodePort when present.
This is in support of running Serving's e2e testing on top of KinD environments without service `type: LoadBalancer`.
* name the return values
* Make Do have consistent retry semantics to Poll.
Today Poll delegates to Do and has additional logic to retry certain error conditions returned by Do focused around connection issues. This means that we are inconsistent about retrying connection issues between Poll and Do.
This change has two main parts:
1. Inline the main logic previously within Do into Poll.
2. Invert the previous relationship (Poll -> Do) to have Do effectively become "Poll once".
With this, Do should have consistent connection retry semantics to Poll (because it IS just a call to Poll).
See also: https://knative.slack.com/archives/CA4DNJ9A4/p1600011374118700
* Sink header addition below reading the body
* looking at what a github action would look like to test a downstream integration
* sample controller has no real tests, so this was a bad test.
* use the downstream-test-go action
* checkout happens in the steps, the action merges the two and run the tests
* adding serving.
* adding eventing-contrib and the samples.
* select major api only.
* revert semver change
* only run the downstream tests on PRs
* go 1.15
We still see users frequently struggle with this and the error message seemingly doesn't help them. This gives a more explicit description of what the user can do to fix the situation.