Commit Graph

9 Commits

Author SHA1 Message Date
Victor Agababov a371418524
v2 (#1754) 2020-09-29 13:18:29 -07:00
Victor Agababov 236c084e37
Fix the racy test. (#1753)
The problem is that the original test presumed the 2 other backgound calls have
finished already.
Which is not really true always.
E.g. here: https://github.com/knative/pkg/pull/1746/checks?check_run_id=1179720602

Also other nits around the file
2020-09-28 22:20:28 -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
Slavomir Kaslev bc4401a91c
Fix TestInformedWatcher sporadic failing on testgrid (#1035)
See

  https://prow.knative.dev/view/gcs/knative-prow/logs/ci-knative-pkg-continuous/1224064360993787904
  https://prow.knative.dev/view/gcs/knative-prow/logs/ci-knative-pkg-continuous/1221890045716205568
  https://prow.knative.dev/view/gcs/knative-prow/logs/ci-knative-pkg-continuous/1220078144313102336

for more info.
2020-02-04 08:02:30 -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
Victor Agababov 73daad6e47 Ignore idempotent updates and other cleanups (#598)
* Ignore idempotent updates and other cleanups

This makes sure we don't call the configmap update on the idempotent updates, which we get now and
that causes us lots of global resyncs. (┛◉Д◉)┛彡┻━┻.

In addition I went ahead and applied some nitpicking to the code.

/assign mattmoor

* fix races

* resync to zero
2019-08-26 07:04:14 -07:00
mattmoor-sockpuppet 34792a92ce golang format tools (#419)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
2019-05-18 10:35:26 -07:00
Adam Harwayne 5548112eb7 Defaulting watcher (#415)
* Add configmap.DefaultingWatcher that allows watched ConfigMaps to be defaulted in code.

* Add a test where the real K8s CM is deleted.

* Remove unused cmName.

* WatchWithDefault after start panics.

* cfgs -> defaults

* Initialize defaults in NewInformedWatcherFromFactory.

* Remove unneeded error in panic.
2019-05-16 07:09:18 -07:00
Dave Protasowski 8fc80deb20 Few changes to the configmap package (#59)
* Few changes to the configmap package

- New* methods return concrete types
- defaultImpl is now InformedWatcher
- fixedImpl is now StaticWatcher
- Included a new ManualWatcher that mimics the InformedWatcher
  in behaviour. ie. allows updates - making this a true 'mock'

* Include note about embedding the ManualWatcher in the InformedWatcher

* Update static_watcher.go

Fix some godoc
2018-09-12 07:42:16 -07:00