Commit Graph

739 Commits

Author SHA1 Message Date
Dave Protasowski cff115c2dd Refactor webhook to allow adding conversion support (#989)
* Refactor webhook to allow adding conversion support

* pr feedback

* fix memory leak

* We can use mux.Handle

* move admission integration tests to separate file
2020-01-20 09:20:05 -08:00
chaodaiG d99cc30f66 Add a junithelper for creating a junit result from command (#926)
* Add a junithelper for creating a junit result from command

* Fix typo
2020-01-17 12:57:03 -08:00
Matt Moore f609dc07e3 Auto-update dependencies (#995)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign n3wscott
/cc n3wscott
2020-01-16 11:11:04 -08:00
Slavomir Kaslev c2a529b1b7 Fix several mishandled errors.Wrap conversions. (#992)
Fixes: e08acb95 (Remove all occurrences of github.com/pkg/errors. (#888))
2020-01-16 08:44:03 -08:00
Nima Kaviani bb0f16f214 Add default metrics backend to observability config (#994) 2020-01-14 23:08:06 -08:00
Scott Nichols 387a161d37 update the deps for which repos the pkg release eng should deal with. (#991) 2020-01-14 06:34:05 -08:00
Matt Moore b8dc5fbc6d golang format tools (#990)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign n3wscott
/cc n3wscott
2020-01-13 10:25:02 -08:00
Antoine Cotten 5e3431e561 Filter tracked sharedmain ConfigMaps based on optional label selector (#973)
* tests: Rename 'cm' vars to 'cmw' for consistency

* Filter tracked sharedmain ConfigMaps based on label selector

The ConfigMap watcher only tracks the ConfigMaps which contain the label
defined by the optional SYSTEM_RESOURCE_LABEL env var if the latter
exists.
2020-01-13 06:53:04 -08:00
Dave Protasowski f72610ea73 unit test to ensure semantic equality func is registered for apis.URL (#988) 2020-01-11 18:40:59 -08:00
Evan Anderson 8c11c24324 Add support for OpenCensus Agent as a destination for Knative metrics. (#978)
* Add support for OpenCensus Agent as a destination for Knative metrics.

* Update with comments from @mattmoor and @anniefu

* Remember to register exporter.

Fix tests.

* Fix naming per discussion with @anniefu
2020-01-10 18:42:58 -08:00
Chi Zhang e0330640f0 perf-tests cluster manager supports creating clusters in other environment (#982)
* perf-tests cluster manager supports creating clusters in other environment

* address codereview comments

* address comments
2020-01-10 11:29:57 -08:00
Dave Protasowski fb00bf88a3 Provide an semantic equality func for apis.URL (#987)
url.URL has an unexported type (UserInfo) which causes semantic
equality to panic unless we add a custom equality function
2020-01-10 10:25:57 -08:00
Scott Nichols 14387e78fb Ban importing aliased domains. (#696)
* Ban importing aliased domains,

* move import test.
2020-01-10 10:11:56 -08:00
Nghia Tran 79d67498c2 Clean up other test to use suggestions of #984 (#986)
* Clean up other test to use suggestions of #984

* Properly capitalize error message.
2020-01-09 15:55:55 -08:00
Nghia Tran bd9fe634a9 Add WithPath option to set the probe path. (#984)
* Add WithPath option to set the probe path.

* Fix PR feedbacks.

* Remove unused struct fields.

* Fix test error message.
2020-01-09 14:16:55 -08:00
Chi Zhang a8f5900e93 add myself as productivity-approvers in pkg (#983) 2020-01-09 12:05:55 -08:00
Markus Thömmes 8c62412074 Optimize locking behavior of the profiling handler. (#980)
The profiling handler is in the path of our most performance critical components (especially the activator). Taking a write-lock on each request is probably a bad idea.

Replaced the mutex with an atomic flag. Lost reads are not critical in this code path and that should be the quickest solution in terms of avoiding contention.
2020-01-08 12:35:53 -08:00
Matt Moore 8f763fa65a Format markdown (#981)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
/assign n3wscott
/cc n3wscott
2020-01-08 07:19:53 -08:00
Scott Nichols 298f22bea6 update boilerplate to use 2020 (#979) 2020-01-07 16:04:51 -08:00
Evan Anderson e53a03271f Document the plan for metrics (#953)
* Document the plan for metrics

* Update with issue links

* Update with other @mattmoor comments.

* Address feedback from @anniefu

* Update export address since `localhost` won't work for a DaemonSet.

* Add an explicit action item to migrate Prometheus

* Fix possible (ambiguous) link vs checkbox.
2020-01-07 15:55:52 -08:00
Scott Nichols 2c145de3d5 Creating an Event interface and ReconcilerEvent type to be used in ReconcileKind (#952)
* Adding a base class to use as strong typed reconciler events.

* fmt, rename.

* support wrapped errors.

* make a custom alias for errors.Is and errors.As, use Event as an interaface.

* add context name (event) to is and as

* update based on feedback.

* fix test fail messages.

* feedback updated.

* cleanup test code.
2020-01-07 15:08:51 -08:00
Ville Aikas 7c7512aecf add ability to opt-out of bindings (#970)
* add ability to opt-out of bindings

* I guess a year changed...

* had opt-in / opt-out backwards

* add unit test for contexts, fix comment

* clarify comments

* remove Binding from method/const names since already in bindings package
2020-01-07 08:56:51 -08:00
Zhimin Xiang a43659c656 Add metrics for Knative Certificate creation count (#976) 2020-01-06 15:57:49 -08:00
Ignacio (Nacho) Cano daef119f73 adding knative_broker metrics (#944) 2020-01-06 15:21:49 -08:00
Joyce Liu 4f9e59084b Return GKECluster info in PCO (#975)
Returns gkeOps in create, get prow-cluster-operation actions to fetch the Cluster info that's just created/fetched without reading the metadata file when running in Go
2020-01-06 14:43:50 -08:00
Zhimin Xiang ffc4109d16 Bump k8s vendor to 1.16.4 (#972) 2020-01-06 13:17:50 -08:00
Zhimin Xiang daee70aa95 bump the default minimum version to 1.15 (#971) 2020-01-06 11:48:49 -08:00
capri-xiyue fa1c639c93 Add helper methods in conditon_set (#965)
* added isUnknown in condition_set

* added IsFalse for condition set

* added GetHappyCondition

* modified comments

* modified the code based on cr

* renamed the method and removed isXXX() methods

* modified comments
2020-01-06 08:00:49 -08:00
Antoine Cotten ce9dfe90d1 Fix sharedmain log messages format (#974) 2020-01-06 07:53:49 -08:00
Joyce Liu 169ef0797c Added GKE release channel support in cluster creation in cluster manager lib (#968)
* Added release channel support in cluster creation in cluster manager lib
* updated k8s beta dependency to pick up release channel API

* added unit test for the missing coverage in request_test.go
2020-01-02 11:27:42 -08:00
Matt Moore ead56ad1f3 Format markdown (#967)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
/assign n3wscott
/cc n3wscott
2019-12-30 10:37:37 -08:00
Joyce Liu 400dfb9ff9 updated boskos client based on the latest API in k8s (#945)
* updated boskos client based on the latest API in k8s

* Added clarification comments and cleanup dead code

* Apply suggestions from code review

Co-Authored-By: Victor Agababov <vagababov@gmail.com>

* Updated test error messages in boskos_test.go

* clarification on parameters

* removed accidentally modified client/istio changes

* Fixed unit test for AcquireGKEProject

* Apply suggestions from code review

Co-Authored-By: Victor Agababov <vagababov@gmail.com>

* simplified NewClient + annotated NewClient in boskos_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>
2019-12-29 20:19:35 -08:00
Lv Jiawei 00c3fda1d6 Update test README.md (#966)
Add flags and its explaination.
2019-12-27 11:11:32 -08:00
Victor Agababov 587055b113 Fix an annoying nit (#964)
Allocate as many as you're asked -- not just 1.

/assign mattmoor
2019-12-26 16:36:30 -08:00
Shaoxuan Zhang bb8b596645 Add error checker functions. (#961) 2019-12-26 14:46:30 -08:00
Chi Zhang 84bccfd045 Add fake cred file to make client_test.go independent of gcloud (#963)
* add fake cred file to make the test independent of gcloud

* address comments
2019-12-26 13:16:29 -08:00
Victor Agababov e73c8084c2 Fix a typo in the comment (#962) 2019-12-23 14:38:26 -08:00
Matt Moore a7fa10c6db golang format tools (#960)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign n3wscott
/cc n3wscott
2019-12-23 09:40:40 -08:00
Chi Zhang 9fda5bd59a For GKE clusters used in performance tests, always enable Workload Identity (#954)
* always enable workload identity for perf test cluster creation

* fix unit tests

* add comments
2019-12-20 19:25:35 -08:00
Chi Zhang 0094d3a892 RecreateClusters function also create new clusters if they do not exist (#950)
* recreate-clusters also create new clusters

* fix unit tests
2019-12-17 18:27:04 -08:00
Markus Thömmes e08acb9512 Remove all occurrences of github.com/pkg/errors. (#888) 2019-12-17 10:41:03 -08:00
Matt Moore b26ddf762b This should be done directly in Serving, not in knative/pkg. (#946) 2019-12-16 13:19:02 -08:00
coryrc 9d8b936ca0 Switch *testing.T uses to equivalent interface + structured logging (#935)
Working to introduce structured logging to our tests. See #907

This work allows these test functions to be called by objects other
than *testing.T. The t.Error() calls are made compatible with
structured logging (wrapping Zap sugared logger calls) or code using
testing.T.
2019-12-13 10:22:54 -08:00
Slavomir Kaslev f890690397 De-race webhook integration tests (#938)
Webhook integration tests occasionally fail with on testgrid, e.g.
  https://prow.knative.dev/view/gcs/knative-prow/logs/ci-knative-pkg-continuous/1204193472353931264
  https://prow.knative.dev/view/gcs/knative-prow/logs/ci-knative-pkg-continuous/1203166664988823552

Fix this by waiting for all goroutines to finish before each test ends.
2019-12-13 06:59:54 -08:00
Slavomir Kaslev 37e855f81e Update istio.io/client-go version to 1.4.1 (#930)
Update istio.io/client-go and drop our patch for it since it has been upstreamed.
2019-12-13 06:49:54 -08:00
Matt Moore a55e24e80c Remove temporary logic to allow shared paths in webhook. (#943)
* Remove temporary logic to allow shared paths in webhook.

* Update webhook/webhook.go

Co-Authored-By: Victor Agababov <vagababov@gmail.com>
2019-12-12 11:14:52 -08:00
Markus Thömmes bebd5557fe Turn websocket's handshake timeout down again. (#941) 2019-12-11 07:02:49 -08:00
Zhimin Xiang 9d7b063951 add metrics for recording knative certificate issuance latencies (#940) 2019-12-10 21:09:48 -08:00
Ignacio (Nacho) Cano d5d6ec4697 setting other test data (#933) 2019-12-10 10:44:47 -08:00
Matt Moore c9679c8353 Auto-update dependencies (#939)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign n3wscott
2019-12-10 09:36:47 -08:00