Commit Graph

1305 Commits

Author SHA1 Message Date
Victor Agababov d86a08b1d8
Some more replacements to atomic.* types (#1747)
* Some more replacements to atomic.* types

* fix
2020-09-25 10:54:44 -07:00
Matt Moore 7b99ff5a0b
Update common github actions (#1745)
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-09-25 00:38:43 -07:00
Matt Moore dc16821b96
upgrade to latest dependencies (#1744)
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-09-24 14:53:40 -07:00
Matt Moore f0b8769399
upgrade to latest dependencies (#1743)
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-09-24 08:21:40 -07:00
Matt Moore 84e88546e8
upgrade to latest dependencies (#1739)
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-09-23 19:50:40 -07:00
Matt Moore 8bc2c39332
Update common github actions (#1742)
Signed-off-by: Matt Moore (via Sockpuppet) <mattmoor@vmware.com>
2020-09-23 19:31:40 -07:00
Scott Nichols 01609c8862
Updates to release leads workflow from 0.18 learnings (#1733)
* test-infra no longer deps on pkg

* adding new sandbox repos
2020-09-23 13:09:40 -07:00
Markus Thömmes 5fbbde31b3
Align linters with serving (enables stylecheck and asciicheck) (#1738) 2020-09-23 07:37:40 -07:00
Victor Agababov 58028584ae
Remove apicoverage from pkg (#1728)
and update the deps
2020-09-22 14:49:39 -07:00
Yanwei Guo 7f9b02e2c0
Add a func to return a connection which has been established (#1729)
* add sync func

* add comment

* Update websocket/connection.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* reviews

Co-authored-by: Victor Agababov <vagababov@gmail.com>
2020-09-22 11:03:40 -07:00
Markus Thömmes 754da4653a
Enable unparam linter to catch unused parameters (#1731) 2020-09-22 09:13:40 -07:00
Markus Thömmes e4ecf702a3
Apply gosec checks to the codebase, except tests. (#1725)
* Apply gosec checks to the codebase, except tests.

* Fix YAML whitespace.

* Tune back file mode change and add a comment.
2020-09-22 08:55:40 -07:00
Matt Moore ac55c3b922
[master] Update GitHub Actions (#1730)
Copied from `https://github.com/knative/.github/tree/master/workflow-templates`.
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-22 08:42:40 -07:00
Julian Friedman 6a12c75962
Use http.Transport.Clone in preference to copy-pasting defaults (#1722)
* 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
2020-09-21 15:36:36 -07:00
Ian Milligan 9128d4b9c1
Deep copy views to avoid races (#1720)
* 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>
2020-09-21 15:22:37 -07:00
James Turley 62c718260c
Remove resource_name tag from webhook stats (#1464)
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.
2020-09-21 12:09:49 -07:00
Matt Moore 70933c329d
[master] Update GitHub Actions (#1723)
Copied from `https://github.com/knative/.github/tree/master/workflow-templates`.
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-21 11:48:49 -07:00
Matt Moore 67be9c0f67
[master] Auto-update dependencies (#1724)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-21 10:46:49 -07:00
Victor Agababov c46a186449
Various nits around the pkg (#1721) 2020-09-20 14:04:45 -07:00
Evan Anderson 8c2ebdb0e0
Speed up & deflake tests by disabling bundling (#1689)
* Speed up & deflake tests by disabling bundling

* Fix `go vet` and races detected

* Address @vagababov comments, add nil check
2020-09-18 16:34:45 -07:00
Victor Agababov ddf2cbe3c1
Various nits around the code (#1719)
* Various nits around the code

* stagger
2020-09-18 16:22:45 -07:00
Riccardo Piccoli 27275cae24
add subresource reconciler for bindings BaseReconciler (#1712) 2020-09-18 15:26:45 -07:00
Victor Agababov e5e9fa8345
We don't really expect high test coverage for test helpers (#1718)
There's some, but we don't want to be in the red for that.
2020-09-18 13:56:45 -07:00
Chris Suszynski 6ce80a7c27
Suite for running upgrade tests in Knative components (#1652)
* 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
2020-09-18 13:05:45 -07:00
Victor Agababov 66ea58ce3a
Add codecov for pkg (#1717)
* Add codecov for pkg

* also more workflows
2020-09-18 11:55:44 -07:00
Victor Agababov caa3276afd
Remove now unused test helpers (#1716)
They were used in perf tests in serving, but those don't exit anymore either.
2020-09-18 11:12:44 -07:00
Tsubasa Nagasawa 9c6ca07aaf
Remove patch detail for webhook being logged on info (#1702)
* 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
2020-09-18 10:23:45 -07:00
Matt Moore eab1ceb664
[master] Auto-update dependencies (#1715)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-18 09:51:45 -07:00
Victor Agababov ec3e2dd4bd
Inject the pod name into logger when provided in the envvars (#1714)
Deployments that are H(P)A need to provide the pod name envvar via downward api.
Activator and QP are already doing this.
2020-09-17 14:47:45 -07:00
Matt Moore ff095e0e15
[master] Auto-update dependencies (#1713)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-17 09:43:42 -07:00
Julian Friedman 6e0430fd94
Fix flakes in EnqueueAfter tests (#1710)
* Fix flakes in EnqueueAfter tests

* only call q.Len() once
2020-09-16 10:15:41 -07:00
Matt Moore 1d4e654a38
[master] Update GitHub Actions (#1709)
Copied from `https://github.com/knative/.github/tree/master/workflow-templates`.
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-15 10:03:41 -07:00
Matt Moore a5e2edc217
[master] Auto-update dependencies (#1701)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-15 02:24:41 -07:00
Victor Agababov 7c22a6940c
Remove the interface that is no longer required (#1707)
and other nits
2020-09-14 18:52:41 -07:00
Matt Moore 2e7d80578f
Teach the spoofing client to support NodePort. (#1706)
* 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
2020-09-14 18:16:41 -07:00
Victor Agababov ea9a9de80c
Fix a nit in the spoof (#1705)
Not all errors result in polling stop — it must be an error we don't retry upon
2020-09-14 09:39:02 -07:00
Matt Moore ab67fe05ca
[master] Update GitHub Actions (#1704)
Copied from `https://github.com/knative/.github/tree/master/workflow-templates`.
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-14 09:21:03 -07:00
Matt Moore 948ac9f2ce
Make Do have consistent retry semantics to Poll. (#1703)
* 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
2020-09-14 06:49:01 -07:00
Scott Nichols de640e81d1
Adding github action to test downstream repos. (#1653)
* 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
2020-09-11 16:54:00 -07:00
Zbynek Roubalik 2d4efecc6b
bump to k8s 1.18 (#1428)
* bump to k8s 1.18.8

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* plumbing ctx through

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* add more ctx plumbing

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* ctx WithCancel()

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-09-11 07:54:00 -07:00
Matt Moore 0761d6b47e
[master] Auto-update dependencies (#1699)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-09-10 07:32:51 -07:00
Markus Thömmes 07fa902e49
Enhance error message on failure to update _example. (#1698)
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.
2020-09-10 07:18:51 -07:00
Matt Moore a79a813ce1
Fix vestigial argument in signature (#1697) 2020-09-09 18:00:51 -07:00
Scott Nichols b4c9a6da30
do not fight with azure's webhook for webhooks (#1696) 2020-09-09 16:37:51 -07:00
Matt Moore 6168842400
Create a dedicated helper for retrying API calls during tests. (#1695)
This is an expansion of the workaround that vaikas initially added to address https://github.com/knative/test-infra/issues/2346, however, a few new error types have emerged, which this will retry.
2020-09-09 15:59:50 -07:00
Markus Thömmes 69fcf75ee4
Remove branch examples referencing master. (#1694) 2020-09-09 10:45:50 -07:00
Lukas Berk 34829c0aee
Alter URIFromObjectReference to return apierrs (#1688)
* Return an apimachinery error if psbinding subject WithContext fails

In the event a subject's `WithContext()` call fails, then
ReconcileSubject fails without catching the proper
error (sinkbinding's WithContext returns its own custom errors).  This
can manifest itself in instances where the sinkbinding subject has
been deleted before the sinkbinding itself, and leaves the reconcile
deletion loop stuck before the finalizer can be removed.  Leaving the
sinkbinding itself stuck, despite the subject already being deleted.

* Alter URIFromObjectReference to return apierrs

This allows for reconcile deletion to properly remove finalizer and
delete sinkbinding

* Update Tests

* Drop unneeded Sprintf
2020-09-09 10:25:50 -07:00
Markus Thömmes d21012af55
Deprecate --master flag in favor of --server. (#1693)
* Deprecate --master flag in favor of --server.

* Actually just drop the flag altogether.
2020-09-09 09:57:50 -07:00
Markus Thömmes b4fa6c275e
Add linting config and fix issues. (#1691)
* Add linting config and fix issues.

* Inline unused test helper.
2020-09-09 08:35:50 -07:00
Victor Agababov 56fba14ba7
Use the constant in the unit tests that we already have (#1690)
and make it public so it can be used in serving as well.
2020-09-08 16:52:50 -07:00