Commit Graph

48 Commits

Author SHA1 Message Date
Chao Xu
2558c239b8 remove logWatcher to logf 2016-08-04 10:28:18 -07:00
Harry Zhang
cb14b35bde Refactor util clock into it's own pkg 2016-07-28 02:29:04 -04:00
k8s-merge-robot
ffff1ab63c Merge pull request #28319 from grodrigues3/revert-comments-tLogf
Automatic merge from submit-queue

reverted the code from 23688 that cause race condition with older version of Go

```release-note
* release-note-None
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-26 19:56:47 -07:00
Chao Xu
99d8868c7c don't use string(index) 2016-07-19 11:41:16 -07:00
Garrett Rodrigues
02e29a98b8 reverted the code from 23688 that cause race condition with older version of Go 2016-06-30 16:01:03 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot
167e4d03cc Merge pull request #23734 from sky-uk/fix-update-for-expired-events
Automatic merge from submit-queue

Fix expired event logic to use 404 instead of 500

It seems this logic was never updated once apiserver started returning 404s for expired (missing) events.

This change corrects it to use a 404 so events will get resent correctly if they were expired in etcd.

Fixes #23637.
2016-04-16 12:46:07 -07:00
James Ravn
5f9ee58de0 Fix expired event logic to use 404 instead of 500
It seems this logic was never updated once apiserver started returning
404s for expired (missing) events.

This change corrects it to use a 404 so events will get resent correctly
if they were expired in etcd.
2016-04-01 16:52:43 +01:00
Chao Xu
674d083092 temporarily disable goroutine calls to testing.T.Logf to avoid race 2016-03-31 11:43:38 -07:00
Marcin Wielgus
c640256917 Shorten execution time of HPA tests 2016-03-25 13:02:55 +01:00
Kris
e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Daniel Smith
4a7d70aef1 extend fake clock 2016-02-01 15:36:15 -08:00
Kris
dd9301ede9 Fix data race by eliminating concurrency in test
I broke out the error retry logic into a named function that could be
tested independently of the rest of the event processing framework. This
allows the test to know when the retry logic is done.

The problem with the original test was there was no reliable way to know
when it was done trying record an event. A sentinal event was being
used, but there is no ordering guarantee. I could have added
synchronization around attempts tracking to fix the data race, but the
test case was still fundamentally flawed and would error occasionally.
2016-01-07 13:00:42 -08:00
Avesh Agarwal
001437a72f This commit fixes tests. 2015-11-24 09:16:12 -05:00
derekwaynecarr
6ad7f1a8cb Add event correlation to client 2015-11-06 16:59:38 -05:00
Timothy St. Clair
d00bf0c48c "Force events to be non-blocking on the client side" 2015-10-20 11:52:09 -05:00
Chao Xu
b443f1264c Use PATCH instead of PUT when update events 2015-10-13 17:12:09 -07:00
jiangyaoguo
e4ef28f096 generate new event cache for every event sink 2015-09-19 10:58:25 +08:00
Daniel Smith
15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
Kris Rousey
7ba5b058cc Moving client libs to unversioned dir 2015-08-18 10:03:19 -07:00
Veres Lajos
9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
CJ Cullen
0e2be0d320 Fix record tests 2015-06-30 17:08:27 -07:00
Chao Xu
030099a5bd update fieldPath in event_test.go to v1 2015-06-09 10:45:55 -07:00
Eric Paris
6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Vishnu Kannan
84e2c36cf7 Set namespace of events to "default" if the involved object does not have
any namespace set.
2015-04-28 16:08:16 -07:00
nikhiljindal
08d9e244f7 Removing some references to v1beta1 from test code 2015-04-08 17:28:06 -07:00
saadali
e0f71cb21f Make each new instance of kubelet generate a new event channel (instead of reusing existing). 2015-03-30 14:22:16 -07:00
Paul Morie
02b18edac6 Allow multiple sources to be used with record package 2015-03-05 13:54:29 -05:00
saadali
033577efa2 Optimize etcd storage by compressing recurring events in to a single event 2015-02-11 22:57:44 -08:00
saadali
79cbcf918e Modify Event struct to allow compressing multiple recurring events in to a single event.
# *** ERROR: *** Some API files are missing the required field descriptions
# Add description tags to all non-inline fields in the following files:
#   pkg/api/v1beta1/types.go
#   pkg/api/v1beta2/types.go
#
# Your commit will be aborted unless you fix these.
#   COMMIT_BLOCKED_ON_DESCRIPTION
2015-02-05 21:50:29 -08:00
Daniel Smith
4738da0822 fix build 2015-01-14 16:12:22 -08:00
Daniel Smith
2bee4ac572 Merge pull request #3381 from a-robinson/events2
Improve client recording of events such that clients are
2015-01-14 15:21:16 -08:00
saadali
90dfdcecd5 Remove CONDITION from event object completely
# *** ERROR: *** Some files have not been gofmt'd.  To fix these
# errors, run gofmt -s -w <file>, or cut and paste the following:
#   gofmt -s -w pkg/kubecfg/resource_printer.go pkg/proxy/config/config.go pkg/runtime/types.go
#
# Your commit will be aborted unless you override this warning. To
# commit in spite of these format errors, delete the following line:
#   COMMIT_BLOCKED_ON_GOFMT
2015-01-14 14:17:16 -08:00
Alex Robinson
3eaf362f8e Switch the client event recorder from exponential backoff to one random
sleep on the first failed request followed by a constant amount on all
subsequent consecutive failed requests.
2015-01-13 19:48:41 +00:00
Alex Robinson
702a6f96b4 Improve client recording of events such that clients are
(1) less likely to drop events if the master is unavailable
(2) less likely to have goroutines block while trying to record an
event.

Done as part of #3163 to ensure that minions operate well even while the
master is down.
2015-01-13 02:22:30 +00:00
Clayton Coleman
cacd2ac40b Shorten client/record test by changing default value
Also add opinionated comment about using singletons in code
2015-01-09 13:16:30 -05:00
Dawn Chen
e3c019128e Add EventSource to api to have both Component and Host information. 2015-01-06 16:08:20 -08:00
Clayton Coleman
88715cc6ef Rename Event.Status to Event.Condition to match v1beta3 agreement
Question - should this be a phase?  Seems like no, since phase implies
defined lifecycle and this field is explicitly not defined.
2014-12-16 09:43:10 -05:00
Daniel Smith
4437f03dbf Don't hold up the entire event queue for a single bad event. Also, don't retry forever. 2014-11-20 16:01:42 -08:00
Daniel Smith
25bd151d86 Make fieldPath part of getting a reference rather than part of making an event. 2014-11-05 15:09:14 -08:00
Daniel Smith
a7cc25f7ff Add namespaces to event creation path. 2014-10-29 18:03:14 -07:00
derekwaynecarr
c6eb371c93 Fixup unit tests 2014-10-24 11:49:04 -04:00
Clayton Coleman
644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman
35eaf90255 Add UID to MetaAccessor and Ref 2014-10-22 22:59:15 -04:00
Clayton Coleman
bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Daniel Smith
ad1212b9af Add client time to events 2014-10-22 11:12:17 -07:00
Daniel Smith
95b855b8e6 Add event client and easy creation library 2014-10-15 11:42:05 -07:00