Commit Graph

1305 Commits

Author SHA1 Message Date
Markus Thömmes 9a051b3dec
Add helpers for float pointers. (#1559) 2020-07-27 01:13:59 -07:00
Matt Moore 9c17340fef
[master] Auto-update dependencies (#1558)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-25 11:24:58 -07:00
Victor Agababov f21f66204a
Add a method to set possible maxidle params on the transport. (#1557)
This method is not used anywhere outside pkg right now, so it's a safe change.
This will permit activator to set desired maxidle params and cache more connection for better performance
2020-07-24 14:10:57 -07:00
Matt Moore a86246d335
[master] Auto-update dependencies (#1556)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-24 09:09:58 -07:00
Evan Anderson c36f46cc8c
Wait longer for metrics collection to settle for OpenCensus (#1555) 2020-07-23 22:55:57 -07:00
Victor Agababov 6757bb169b
Some nits in the tests in effort to fix race (#1553)
which panics in a strange place (sync.waitgroup that disables race detection)
and other nits
2020-07-23 15:17:57 -07:00
Jon Donovan e58afb06b7
Allow passing custom cmp.Options to TableTest. (#1552)
We're playing around with writing TableTests for the Operator (which uses manifestival) and would
like to see if we can get a good comparator for the automatically added last-applied-configuration annotation.
If that ends up being general purpose we can upstream it here, but in general it's nice to be allowed to do
some application specific filtering of the desired state changes.
2020-07-23 15:02:57 -07:00
Victor Agababov 6167cd9c1f
Add vagababov as productivity approver (#1551)
* Add vagababov as productivity approver

Either own, wrote, re-wrote or heavily reviewed a lot of libraries here.

* after talking to matt
2020-07-23 10:28:57 -07:00
Victor Agababov 814ec465ad
Add pod name to the list of things we log. (#1550)
With chaos duck (and other HA tests) we kill things and we now will be able to know
which exact instance logged a message to aid with debugging.
2020-07-23 10:17:57 -07:00
Matt Moore a3a29ac6e1
[master] Fix spelling errors (#1548)
Produced via:
  `github.com/client9/misspell`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-23 08:22:57 -07:00
Matt Moore 151f7137b6
[master] Auto-update dependencies (#1549)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-23 08:10:58 -07:00
Matt Moore 6f19c52bf1
[master] Format markdown (#1547)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github | grep -v docs/cmd/)`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-23 08:00:57 -07:00
Scott Nichols ae9c3f7fa8
Refactor the genreconciler code to pull state out (#1544)
* Refactor the genreconciler code to pull state out

* don't generate the stubs

* fix indent
2020-07-22 23:02:57 -07:00
Evan Anderson bc4dc000cb
Add utilities for accessing metrics via metricproducer (#1526)
* Add utilities for accessing metrics via metricproducer.

* Fix tag comparison, bump up coverage.

* Convert workqueue_test (one of the main users of metricstest) to the new methods.

* Force event propagation sync one more place.

* Boost test coverage again.

* Address vagababov comments
2020-07-22 18:31:57 -07:00
Victor Agababov afdc8bb9f4
Fix the race in the test (#1545)
The test was inherently racy and I saw it flake more than once (e.g. https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_pkg/1526/pull-knative-pkg-unit-tests/1286086935722332160)
So this fixes it.
Also other minor nits around the test to make it more readable.
2020-07-22 18:14:57 -07:00
Ville Aikas 1127f59d7b
kube already gives us this, do not double log http (#1542) 2020-07-22 10:13:57 -07:00
Matt Moore 424011ea5e
[master] Auto-update dependencies (#1540)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-22 09:16:57 -07:00
Francesco Guardiani ba0f3cb7cf
Revert port forward logging (#1537)
* Revert "Fixed error with #1531 (#1533)"

This reverts commit d7498436

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Revert "Added logging of port forwarding stdout (#1531)"

This reverts commit 3b7ca76a

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2020-07-22 01:53:54 -07:00
Francesco Guardiani d749843685
Fixed error with #1531 (#1533)
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2020-07-21 23:38:53 -07:00
Victor Agababov 557b6826ef
Reorder statements for more precise behavior and harden the test (#1534) 2020-07-21 14:14:53 -07:00
Yanwei Guo 0166004ef1
Another try to use hash.BucketSet for standard leader election mode (#1530)
* do not record for empty metric config

* Revert "do not record for empty metric config"

This reverts commit 539a5e4dbb.

* redo

* use local

* typo

* Update leaderelection/context.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* merge another pr

* update dep

* Update hash/bucketer_test.go

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

* Update hash/bucketer_test.go

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

* output diff

* output diff

Co-authored-by: Matt Moore <mattmoor@vmware.com>
Co-authored-by: Victor Agababov <vagababov@gmail.com>
2020-07-21 14:02:54 -07:00
Victor Agababov 08156c67f6
Use slow lane to do global resync (#1528)
* Use slow lane to do global resync

* cmt

* yolo

* yolo v2

* fix log str

* fixes

* publicize things

* renamemove
2020-07-21 13:11:54 -07:00
Matt Moore c0a9ec7f11
Make the chaosduck jitter (#1527) 2020-07-21 08:53:36 -07:00
Francesco Guardiani 3b7ca76a63
Added logging of port forwarding stdout (#1531)
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2020-07-21 02:16:35 -07:00
Victor Agababov acd3f31714
nits (#1529) 2020-07-20 18:44:35 -07:00
Victor Agababov bfb6ce8050
Harden the drain tests more (#1525)
* Harden the drain tests more

- introduce synthetic timer that gives us the capability to actually trigger events in the drain itself
- unfortunately we still need time.After calls in the test due to the timing for go routines to finish (they race the default: case and lose).

* comment

* more things

* pfpf

* dudud
2020-07-20 15:50:35 -07:00
jjzeng-seattle 03151bfc84
Add component name as the metric prefix for opencensus exporter (#1493)
* Add component name as the metric prefix for opencensus exporter

Read from all meters instead of just he default one

Add component name as the metric prefix for opencensus exporter

* Update codegen

* Add domain as metric prefix

* Use path.Join to simply the code
2020-07-20 14:10:36 -07:00
Matt Moore 9108ba3bd0
[master] Auto-update dependencies (#1522)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-20 10:12:35 -07:00
Victor Agababov 601c9ff383
Harden and reaarange the test for drain handler (#1521) 2020-07-19 15:15:34 -07:00
Victor Agababov 1cea86c85f
Use two lane queue instead of the regular workqueue (#1514)
* Use two lane queue instead of the regular workqueue

- we need to poll for len in the webhook tests because we have async propagation now, and check at the wrong time will be not correct.
- otherwise just a drop in replacement.

* update test

* cmt

* tests hardened
2020-07-19 14:01:34 -07:00
Matt Moore e193c4be24
Implement a new shared "Drainer" handler. (#1517)
* Implement a new shared "Drainer" handler.

This implements a new `http.Handler` called `Drainer`, which is intended to wrap some inner `http.Handler` business logic with a new outer handler that can respond to Kubelet probes (successfully until told to "Drain()").

This takes over the webhook's relatively new probe handling and lame duck logic with one key difference.  Previously the webhook waited for a fixed period after SIGTERM before exitting, but the new logic waits for this same grace period AFTER THE LAST REQUEST.  So if the handler keeps getting (non-probe) requests, the timer will continually reset, and once it stops receiving requests for the configured grace period, "Drain()" will return and the webhook will exit.

The goal of this work is to try to better cope with what we believe to be high tail latencies of the API server seeing that a webhook replica is shutting down.

Related: https://github.com/knative/pkg/issues/1509

* Switch to RWLock
2020-07-17 21:25:34 -07:00
Victor Agababov 6cd456823f
Revert "Use hash.BucketSet for standard leader election mode (#1490)" (#1518)
This reverts commit 8d80e63709.
2020-07-17 20:40:33 -07:00
Victor Agababov 25be382806
Add more time for the checks (#1516)
* Add more time for the checks
On the prow clusters which are usually strapped for CPU this fails due to wrong order of things

* harden
2020-07-17 16:03:33 -07:00
Matt Moore 931d1210f1
Enable components to get debug logging from our rest transports. (#1515) 2020-07-17 13:54:33 -07:00
Matt Moore a9ea699c70
Make MainWithConfig respect user-provided overrides. (#1513) 2020-07-17 10:09:34 -07:00
Victor Agababov 97e2175a17
Implement Slowlane/FastLane queues (#1512)
* Fast/slow queue implementation/

* more3
2020-07-17 09:51:34 -07:00
Matt Moore 0f78f8a8cc
Disable keep-alives on shutdown. (#1511)
See also: https://github.com/knative/pkg/issues/1509#issuecomment-659737054
2020-07-16 16:55:33 -07:00
Victor Agababov 25f2aa6443
micro-Nit in the test: don't make a private type public (#1510) 2020-07-16 10:41:33 -07:00
Matt Moore fa2ad62b72
[master] Auto-update dependencies (#1508)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-16 09:53:33 -07:00
Markus Thömmes f1b82401dc
Remove logging from pod watcher to avoid race conditions. (#1506) 2020-07-16 07:06:33 -07:00
Markus Thömmes cb729b8ae6
Assorted linting fixes. (#1507)
- Remove unused code.
- Remove unnecessary conversion.
- Prevent copies of structs that contain sync.Mutex.
2020-07-16 05:59:33 -07:00
Ignacio (Nacho) Cano 096656a2d4
generating reconciler for deploymnets (#1502) 2020-07-15 17:45:33 -07:00
Yanwei Guo 8d80e63709
Use hash.BucketSet for standard leader election mode (#1490)
* do not record for empty metric config

* Revert "do not record for empty metric config"

This reverts commit 539a5e4dbb.

* for standard

* delete bucket

* add s
2020-07-15 16:13:33 -07:00
Victor Agababov 3ba0019af6
Add a new method to permit creation of buckets from the bucketset (#1500)
* Add a new method to permit creation of buckets from the bucketset

This is a natural factory.

* review
2020-07-15 13:32:33 -07:00
Matt Moore 67e9bcf967
Bump the drain timeout (#1501) 2020-07-15 13:08:33 -07:00
Victor Agababov 4c35539561
Make logstream watch the pods as they change. (#1496)
* Make logstream watch the pods as they change.

- watch the pods and track what we already watch
- start watchers for the new pods

* log

* review

* other
2020-07-15 12:19:34 -07:00
Markus Thömmes f50bf783a7
Set relevant golang env variables in update-codegen.sh. (#1422) 2020-07-15 10:58:33 -07:00
Julian Friedman 3aca29a4b4
Remove unused parameter (#1499)
Pretty confusing that the connTimeout parameter isn't actually respected, better to remove it
2020-07-15 10:47:33 -07:00
Evan Anderson 9f3fb07346
Remove delay-based flakiness from workqueue_test.go (#1497) 2020-07-15 10:20:33 -07:00
Evan Anderson 723b71fa47
Update Stackdriver custom exporter to support RecordBatch where some records are special and others are not. (#1495) 2020-07-15 10:05:33 -07:00