Commit Graph

539 Commits

Author SHA1 Message Date
mattmoor-sockpuppet f00ff90b54 Auto-update dependencies (#724)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign mattmoor
2019-09-27 07:27:41 -07:00
dushyanthsc d02c80dc62 test/webhook-apicoverage: Junit cleanup utility (#719)
Change to add a utility to cleanup Junit test summary files.
2019-09-25 06:06:40 -07:00
chaodaiG a1b3961a1d Fix cluster creation lib return not up-to-date cluster issue (#718) 2019-09-24 12:12:43 -07:00
mattmoor-sockpuppet 6bc5bf74cc Auto-update dependencies (#716)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign mattmoor
2019-09-24 07:36:19 -07:00
Adriano Cunha 25b6d3af4d Update OWNERS_ALIASES for Productivity WG (#714) 2019-09-23 17:01:16 -07:00
Jean-Rémy Bancel 0b1a8b3530 Log spoofing details only once. (#710) 2019-09-23 13:40:14 -07:00
Chi Zhang f31c478cbc minor changes (#713) 2019-09-23 09:59:14 -07:00
Nima Kaviani d90ec6a015 add config validation as admission controller (#636) 2019-09-22 07:23:10 -07:00
Matt Moore 2e019c8a87 Expose Go memstats as metrics. (#711)
This exposes metrics for the properties available through [here](https://godoc.org/runtime#MemStats) so that we can get some better visibility into things like GC pressure.
2019-09-21 00:07:08 -07:00
Markus Thömmes 1ba51667e8 Revert "Add SIGPIPE signal handler to the signals package (#689)" (#709)
This reverts commit 1fb9a43308.
2019-09-20 13:33:05 -07:00
Markus Thömmes de32ec136d Fix a subtle bug with cluster scoped entities. (#708) 2019-09-20 12:26:07 -07:00
Tara Gu 06918f4c69 Remove caching in test logger setup (#661)
* Remove caching in test logger setup

* Revert "Remove caching in test logger setup"

This reverts commit e3c5349e3c.

* Don't create new logger in SetupFakeContextWithCancel

* Revert "Don't create new logger in SetupFakeContextWithCancel"

This reverts commit 2d57ccf028.

* Remove test logger cache, and leave an empty shell for ClearAll()
2019-09-20 10:42:06 -07:00
Markus Thömmes b55b842259 Adjust tracker to take structured keys as well. (#706)
* Use structured keys in the tracker.

* Adjust the addressable resolver too.
2019-09-20 09:44:06 -07:00
chaodaiG 27ef42f063 Create cluster with basic auth enabled by default (#705) 2019-09-20 09:12:03 -07:00
mattmoor-sockpuppet 2d704be7a4 Auto-update dependencies (#704)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign mattmoor
2019-09-20 07:22:04 -07:00
Markus Thömmes 4a790dd36c Plumb through a structured key, keep current behavior. (#703)
* Plumb through a structured key, keep current behavior.

* Rename variable.
2019-09-20 06:52:05 -07:00
Matthias Wessendorf dcfc14495f Remove deprecated NewFixedWatcher (#699) 2019-09-19 14:38:01 -07:00
Markus Thömmes 7b725e1ae6 Use a nil map instead of an empty map for the same effect. (#695) 2019-09-19 13:00:00 -07:00
mattmoor-sockpuppet 9d08e921cc Fix spelling errors (#701)
Produced via:
  `github.com/client9/misspell`
/assign mattmoor
2019-09-19 07:49:00 -07:00
mattmoor-sockpuppet 0ec97c7f72 golang format tools (#700)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-09-19 07:42:15 -07:00
Slavomir Kaslev 1fb9a43308 Add SIGPIPE signal handler to the signals package (#689)
By default raised SIGPIPE signal will cause the program to exit immediately[1]
and bypass any shutdown logic.

Add syscall.SIGPIPE to the signals we get notified to disable this behavior.

[1] https://golang.org/pkg/os/signal/#hdr-SIGPIPE

Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
2019-09-18 19:27:48 -07:00
Matt Moore ba7564872c Bump the minimum Kubernetes version to 1.14.x (#683)
This will be the lowest supported version of upstream Kubernetes, once 1.16 has cut.
2019-09-18 18:03:47 -07:00
Chi Zhang 1b735efee7 Remove config file for slack alert (#671)
* make slack config file accessible from benchmarks

* refactor config for Mako test

* fix unit test

* fix the name

* remove the config file for slack

* revert some changes
2019-09-18 14:19:47 -07:00
Matt Moore e4ac97c252 Update our dependency on K8s libs to 1.15.3 (#686)
With a minimum K8s version of 1.14 (starting in 0.10), 1.15.3 puts us in the center of the +/-1 version window of support.
2019-09-18 13:36:48 -07:00
Jean-Rémy Bancel 2d6c3459ce Use *url.URL instead of string in request.go. (#670) 2019-09-18 11:56:47 -07:00
chaodaiG 9d9cb54ed0 Cluster management lib: Add autoscaling to cluster creation (#692)
* Add autoscaling to cluster creation

* Apply suggestions from code review

Co-Authored-By: Adriano Cunha <35786489+adrcunha@users.noreply.github.com>

* fixing a test failure
2019-09-18 10:37:46 -07:00
Adam Harwayne e0149df35c Remove CheckZipkinPortAvailability. (#693)
The check did not work well on Macs, where calling JSONTrace would fail immediately because the check failed.
2019-09-18 10:31:47 -07:00
Vincent 24f524cb25 Add the creation of default LoggingConfig, if config-logging is missing (#663)
* Add the creation of default LoggingConfig, if config-logging is missing

* Create empty map for the func NewConfigFromMap
2019-09-17 09:30:47 -07:00
mattmoor-sockpuppet 4febcfe6ae Auto-update dependencies (#690)
Produced via:
  `dep ensure -update knative.dev/test-infra`
/assign mattmoor
2019-09-17 07:33:49 -07:00
Matt Moore 5cdf30f51e Change how we test the generateName reactor. (#688)
The 1.14 K8s test libs introduce changes that broke how we were testing this, but it still works in the cases we care about, so this adjusts the test to more accurately test the reactor in the way we actually care about.
2019-09-16 17:25:45 -07:00
chaodaiG 53eebd4e81 Cluster management lib: create cluster with addon (#687)
* Create cluster with addon

* Apply suggestions from code review

Co-Authored-By: Victor Agababov <vagababov@gmail.com>
Co-Authored-By: Adriano Cunha <35786489+adrcunha@users.noreply.github.com>
2019-09-16 16:06:46 -07:00
chaodaiG b980bf131b Cluster creation lib uses v1beta1 instead of v1 (#677) 2019-09-16 12:57:49 -07:00
Matt Moore 3c828cf99f Hook into two other Kubernetes metric subsystems. (#682)
This adds logic to hook into two other metric systems:
1. `cache.SetReflectorMetricsProvider`, which doesn't seem hooked up in Kubernetes yet, but would theoretically give us metrics about the mechanisms underpinning informers.
2. `metrics.Register`, which hooks us into the rest client infrastructure to give us metrics about low-level API server calls.

Fixes: https://github.com/knative/pkg/issues/679
Fixes: https://github.com/knative/pkg/issues/680
2019-09-16 10:46:43 -07:00
Matt Moore ecb98001f2 Implement workqueue.MetricsProvider (#678)
The kubernetes workqueue provides a facility for collecting metrics by registering a workqueue.MetricsProvider
via workqueue.SetProvider.

This change implements that interface to expose the workqueue metrics into opencensus.

This is loosely based on some work started by @grantr [here](https://github.com/kubernetes-sigs/controller-runtime/compare/master...grantr:opencensus-replace#diff-bb94124aff8d568cb4e82854c7d44fd1)

Fixes: https://github.com/knative/pkg/issues/522
2019-09-16 09:55:41 -07:00
mattmoor-sockpuppet ed1a121c33 golang format tools (#684)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-09-16 07:21:41 -07:00
Dan Gerdesmeier d8d1bc2718 Move duck patch helper function from Knative Serving to pkg (#681)
We have been maintaining a copy of this helper function in the Knative
Serving tests. Moving it here and adding tests so it can be used more
generally. The function allows creating a []byte patch without having to
check two levels of error conditions.
2019-09-15 21:35:40 -07:00
Ignacio Cano 6b1c5cf09a StackDriver CustomMetrics with Custom Domain Prefix (#676)
* renaming source_name and source_resource_group to name and resource_group,
as they will be used in other resources

* updating

* updates based on code review

* update

* fix
2019-09-13 15:50:35 -07:00
Ignacio Cano 1633d4dded renaming source_name and source_resource_group to name and resource_group, (#675)
as they will be used in other resources
2019-09-13 14:03:35 -07:00
chaodaiG 55634011c4 Add cluster deletion funciton (#674)
* Add cluster deletion funciton

* Apply suggestions from code review

Co-Authored-By: Adriano Cunha <35786489+adrcunha@users.noreply.github.com>
2019-09-13 11:05:34 -07:00
Ignacio Cano 1bea34570b SourceStatsReporter UT fix (#667)
* source stats reporter... should be used by well-behaved sources

* public fields

* moving serialization/deserialization of metrics and logging maps to pkg

* nits

* adding UT

* same order

* updates

* sock-puppet

* unregistration problem?

* removing base64 encoding

* removing TODO

* removing config changes... done in another PR

* to properly address the comment

* changing importer to source

* moving stats_reporter to new source folder

* fixing UT
2019-09-13 09:40:34 -07:00
mattmoor-sockpuppet 2b5e8011b8 golang format tools (#672)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-09-13 07:40:34 -07:00
Kenjiro Nakayama 3415797394 Introduce error util ErrInvalidCombination for invalid combination (#638)
* Introduce error util ErrInvalidCombination for invalid combination

Sometimes valid value becomes invalid value by combination.

example 1. https://github.com/knative/serving/issues/5382
example 2. following combination in `spec.traffic`.

```
  traffic:
  - latestRevision: true
    revisionName: hello-example-dk7nd
    percent: 100
```

But there are no error util for them, so we need to create
custom error like c1583f3045
or `ErrInvalidValue`.

The custom error will make code complicated and `ErrInvalidValue` is
not debug friendly.

To solve it, this patch introduces an util func `ErrInvalidCombination`.

* Introduce ErrGeneric instead of ErrInvalidCombination
2019-09-12 16:44:32 -07:00
chaodaiG 2e2ab7a878 clusterlib: fake boskos client for better test coverage (#649)
* Fake boskos

* feedback updates
2019-09-12 11:36:32 -07:00
Adam Harwayne 343f1649fe JSONTrace returns a structured object, not just a string. (#658)
* JSONTrace returns a structured object, not just a string.

* Fix usage in spoof.go.

* Update test/zipkin/util.go

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

* Update test/zipkin/util.go

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

* PR comments.
2019-09-12 10:48:38 -07:00
mattmoor-sockpuppet 03caae6041 golang format tools (#669)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-09-12 08:28:33 -07:00
mattmoor-sockpuppet da722d04a7 Format markdown (#668)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
/assign mattmoor
2019-09-12 08:22:35 -07:00
chaodaiG 87ad483365 Cluster operations wait for *Operation object directly (#666)
* Cluster operations wait for *Operation object directly

* feedback updates
2019-09-11 17:28:35 -07:00
Chi Zhang d484d03f55 Finish the initial Alerter support for Mako (#645)
* add slack operations and the main alerter

* function renaming

* solve the codereview issues

* address feedbacks

* add unit test and fix some old unit tests
2019-09-11 14:35:31 -07:00
Ignacio Cano 7f77962556 Moving Source StatsReporter to its own package (#664)
* source stats reporter... should be used by well-behaved sources

* public fields

* moving serialization/deserialization of metrics and logging maps to pkg

* nits

* adding UT

* same order

* updates

* sock-puppet

* unregistration problem?

* removing base64 encoding

* removing TODO

* removing config changes... done in another PR

* to properly address the comment

* changing importer to source

* moving stats_reporter to new source folder
2019-09-11 13:42:31 -07:00
Ignacio Cano 62d3aa64b5 Renaming Importer to Source (#662)
* source stats reporter... should be used by well-behaved sources

* public fields

* moving serialization/deserialization of metrics and logging maps to pkg

* nits

* adding UT

* same order

* updates

* sock-puppet

* unregistration problem?

* removing base64 encoding

* removing TODO

* removing config changes... done in another PR

* to properly address the comment

* changing importer to source
2019-09-11 13:16:31 -07:00