Commit Graph

35 Commits

Author SHA1 Message Date
Markus Thömmes b708bdee24
Bump a few assorted dependencies (#2292) 2021-09-21 03:23:37 -07:00
Markus Thömmes 2bd91f7557
Bump K8s dependencies to 1.21.4 (#2242)
* Bump apimachinery

* Update code-generator

* Update API and client, some progress

* Hack the generator to work at all

* Hack the PodDisruptionBudget extension to fulfill the interfaces

* Bump apiextensions as well

* Fix conflict

* Better condition

* Roll back unnecessary codegen change

* Fix PodDisruptionBudget extensions

* Panic on not-yet-implemented like others
2021-08-27 11:45:38 -07:00
Markus Thömmes fac4920fca
Update assorted dependencies (#2240) 2021-08-27 02:10:38 -07:00
Markus Thömmes 12d915ede2
Update prometheus dep to 0.30.0 (#2227) 2021-08-23 06:36:35 -07:00
Markus Thömmes 21eb4c167c
Bump assorted dependencies to their latest versions (#2205) 2021-08-03 09:00:15 -07:00
Markus Thömmes e8973c6acb
Bump a few assorted dependencies (#2186) 2021-07-12 08:08:22 -07:00
Markus Thömmes 00fa1549f7
Bump a few assorted libs (#2153) 2021-06-10 01:36:43 -07:00
Markus Thömmes ea766de6bd
Bump assorted dependencies (#2130) 2021-05-25 07:27:38 -07:00
Markus Thömmes 554d133a0d
Bump assorted dependencies (#2096) 2021-04-19 09:00:01 -07:00
Markus Thömmes 9050838f89
Bump assorted dependencies (#2086) 2021-04-07 09:09:49 -07:00
Markus Thömmes a02dcff9ee
Bump a few assorted dependencies to their latest versions (#2013)
* Bump a few assorted dependencies to their latest versions

* Use new uuid helper

* Some more slight adjustments
2021-02-08 09:52:52 -08:00
Markus Thömmes 909c152426
Update dependencies to their latest versions (#1958)
* Update dependencies to their latest versions

* update-deps.sh
2020-12-14 06:46:44 -08:00
Markus Thömmes 6a24d54694
Update assorted dependencies to their latest releases (#1869) 2020-10-28 10:16:34 -07:00
Matt Moore 38578c3cf4
Add a test package for making assertions about dependencies. (#1853)
* Add a test package for making assertions about dependencies.

See the example test for illustrative examples of usage.  It is notable that the gofuzz test failed until I rebased on Ville's recent change.

The goal here is ultimately to assert that our key libraries don't take on heavy dependencies to combat the binary-size bloat that currently afflicts the queue-proxy.

* vagababov feedback
2020-10-27 09:42:33 -07:00
Victor Agababov a04d64c180
Shush autogomaxproc. (#1800)
* Shush autogomaxproc.

I am not as sure about this change, but those logs are not following the standard formt
and given we need to inject the logger in init() makes this next to impossible.

Corollary, is that we set cpu limits on all our binaries, except QP, so it only mattered there
since otherwise the package logs nothing.

* m
2020-10-12 19:13:30 -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
Julian Friedman 095ff27da6
Automatically set GOMAXPROCS using automaxprocs library (#1585) 2020-08-10 02:00:30 -07:00
Matt Moore 7726ec60db
[master] Auto-update dependencies (#1567)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-29 10:21:00 -07:00
Matt Moore b9795c7b2b
[master] Auto-update dependencies (#1562)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-07-27 14:33:59 -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
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
Evan Anderson e7bd895fbd
Introduce `pkg/metrics` support for multiple Resources (#1392)
* Update OpenCensus to include #1196.

* Extend OpenCensus to track per-Resource stats.

* Add generic ResourceView mechanics, part 1. TODO: wire newFactory, tests

* Move factory creation to where it can be customized per-backend

* Integrate opencensus export with Resource-based exporters

* Add stackdriver support for resource views

* address feedbacks

* add test cases

* make KnativeRevision a map

* Update go modules to point to latest opencensus which includes `view.Meter`.

* Add support for Resources to Prometheus Exporter.

This involved copying/improving much of the contrib prometheus exporter.

* add resource_view tests and fix minor issues

* add recorder tests for meter

* Update resource_view_test with an e2e export test.

* Fix prometheus e2e resource_view_test.

Found a fun circular lock.

Found a fun double-registration in metricproducer/Meter.

Found some unnecessary extra code.

Fixed prometheus string sanitization.

Removed a layer of Prometheus wrapping which made debugging more challenging.

* Add test for standard view exports and non-resourced views to e2e test.

* Add UnregisterResourceView to fix tests

* Add OpenCensus e2e resource export test.

Still a little flaky, so work around that with "<=".

* Fix tests for OpenCensus export.

* Fix flakiness / timing issues in OpenCensus exporter e2e test.

* Update to latest ocagent to fix `Resources` bug.

* Don't swallow errors from stackdriver init.

* Get Stackdriver export mostly working in e2e tests

Tests still fail because stackdriver converts custom metrics to a namespaced format and seems to lose Resource information.

* Add support for Stackdriver resource export.

* ./hack/update-codegen.sh

* Fix data race with graceful shutdown.

* Fix issues noticed by @vagababov

* Address mattmoor-bot comments.

* Remove MonitoredResource and apply suggestions from yanweiguo

* More cleanup to stackdriver_exporter_test.go

* Update tests (particularly config_test.go) for Stackdriver recorder changes which sometimes record with additional resources.

* Avoid setting two `view.WithRecorder` options on record

* Add stackdriver tests

* Address comments

* Switch Prometheus port due to possible conflict in test env

* Fix missing :=

* FIx data races around *view.Data shared across Meters.

Cleanup resource_view_test.

* Remove unneeded monitored_resources.go

* Use sync.WaitGroup to avoid data races on closing channel.

* Sort the map for ResourceAsString

* Apply lint and vagababov changes.

* Fix typos

* refactor ResourceAsString

* Update stackdriver exporter version

* Update metrics/resource_view_test.go

Remove accidental paste

* Fix go.sum

* Address yanweiguo comments on comments

* Fix autogen/go mod

* Handling resource extraction when custom metrics are allowed

* Add tests for AllowCustomMetrics set to true

* Address vagababov and yanweiguo comments.

Signed-off-by: Evan Anderson <evan.k.anderson@gmail.com>

* address comments

* Renaming

* Reduce some condition nesting

* go fmt

* Sleep for 1ms to allow metrics being sent (#9)

* Address yanweiguo comments

Co-authored-by: JJ Zeng <jjzeng@google.com>
Co-authored-by: jjzeng-seattle <56568376+jjzeng-seattle@users.noreply.github.com>
2020-07-14 10:46:19 -07:00
Victor Agababov b09a159e12
Add BucketSet type which implements consistent bucketing (#1477)
* Add BucketSet type which implements consistent bucketing

BucketSet permits mapping keys to buckets in a consistent manner, permitting us to use this type
in the HA applications. BucketSet implements the Bucket interface so it can be used in reconciler/leaderelection
pieces and has an additional method which returns the owner for the key. This is necessary in autoscaler
where requests need to be forwarded to an appropriate autoscaler.

* git mod stuff

* fixes

* nit

* two types for two thigns

* more tests
2020-07-12 20:16:12 -07:00
Nghia Tran 0a8314b444
Back to tracking master branch of floating deps (#1468) 2020-07-07 12:03:44 -07:00
Matt Moore 4fc2d8ab75
[master] Auto-update dependencies (#1290)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
2020-05-05 08:42:44 -07:00
Chi Zhang 90fc61bae7
Switch to Go modules (#1179)
* test out go modules

* chmod +x *.sh

* revert some changes

* update-deps

* try fixing

* chmod +x

* update

* update test-infra for testing

* test

* test

* update

* no -mod=vendor

* update
2020-04-28 12:43:51 -07:00
Scott Nichols 6b9ee63b4a
adding tools to master in prep for go mod. (#1251)
* adding tools to master in prep for go mod.

* adding tools via update deps.

* import the tools directly

* need the root dir too

* adding gengo tools, dep update.
2020-04-27 12:00:51 -07:00
Victor Agababov aa5b1f2211
update go-cmpt to work with 1.14. (#1167)
* update go-cmpt to work with 1.14.

Mostly to fix https://github.com/google/go-cmp/issues/167, but we also pinned at some
random commit, rather than at a release version.

* add new pkg
2020-03-22 14:03:08 -07:00
Victor Agababov 37bd04dc3e Move generic packages from serving to pkg. (#927)
* Move generic packages from serving to pkg.

I was asked to move this to do some re-use in Eventing.

/cc @chizh
/assign mattmoor @tcnghia

* fix the compile error
2019-12-06 17:57:40 -08:00
Chi Zhang 604c5a32d1 Add basic code to alert for performance regression (#596)
* add basic code to alert for performance regression

* add comment before closing issue

* minor change

* address code review feedbacks

* address feedbacks and add unit tests
2019-08-25 08:29:13 -07:00
Victor Agababov d5915547d9 Update opencensus to a newer version (#526) 2019-07-12 16:18:48 -07:00
akyyy 10ceeb6163 Add stackdriver exporter support in pkg. (#126)
* update dep golang.org/x/net

* Add stackdriver exporter support in pkg

* fix race and tests

* Use thread safe newMetricsExporter in tests

* address cr comments

* minor fix

* checkpoint

* Address cr comments

* add test for UpdateExporterFromConfigMap

* Move lock position

* add a test case for stackdriver error check

* minor change

* removing one test case since it seems app default creds exists for presubmit tests

* replace promSrvChan with promSrv as cr suggsted

* use a local var server for ListenAndServe

* add getter and setter for shared variables

* add func isMetricsConfigChanged and test

* address cr comments

* Update opencensus-go-exporter-stackdriver to v0.7.0

* Revert "Update opencensus-go-exporter-stackdriver to v0.7.0"

This reverts commit 9825f641f8.

* run update-deps.sh

* merge conflict

* run update-deps.sh

* Update Gopkg.toml so it doesn't have stackdriver exporter

* remove regex for metrics domain at pkg repo per cr comments

* merge conflict
2018-10-24 15:23:31 -07:00
Matt Moore bf6f9e373f Move our base controller infrastructure into knative/pkg. (#33)
The `controller.go` is from: https://github.com/knative/serving/pull/1770, however, this adds 100% coverage of `controller.go`, which we have been missing in `knative/serving`.

This also adds a `context.Context` to the `Reconcile` signature, to enable better sharing of logger setup across controllers.

Fixes: https://github.com/knative/pkg/issues/8
2018-08-01 14:32:37 -07:00
Matt Moore 8b7b2d7cfb Move the logging packages from serving into pkg. (#21) 2018-07-27 09:53:35 -07:00
Matt Moore f8e84c0d02
Copy `pkg/configmap` over from `knative/serving`. (#11) 2018-07-25 14:56:29 -07:00