-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix worker state default metric value #4895
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: kyrylo.bilchenko <kirya7@gmail.om>
xtremerui
approved these changes
Dec 13, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix!
zoetian
added
the
release/documented
Documentation and release notes have been updated.
label
Dec 16, 2019
jamieklassen
pushed a commit
that referenced
this pull request
Jan 11, 2020
This commit also backfills tests for ths WorkersState metric. It turns out that there was enough untested logic there that a bug was introduced when #4895 was implemented, so it's high time to have some tests! It was more difficult than I expected to get the metric into a test harness -- the code had a problem with what Michael Feathers calls "sensing". It's not expensive to instantiate the metric, but it is difficult to observe the effect of its `Emit` method being called, since the `emitLoop` function in the `metric` package asynchronously passes events to the emitter in a goroutine. I think we should be able to isolate the metric from that emission channel in tests. #4985 #3856 Signed-off-by: Jamie Klassen <cklassen@pivotal.io>
jamieklassen
pushed a commit
that referenced
this pull request
Jan 11, 2020
This commit also backfills tests for ths WorkersState metric. It turns out that there was enough untested logic there that a bug was introduced when #4895 was implemented, so it's high time to have some tests! It was more difficult than I expected to get the metric into a test harness -- the code had a problem with what Michael Feathers calls "sensing". It's not expensive to instantiate the metric, but it is difficult to observe the effect of its `Emit` method being called, since the `emitLoop` function in the `metric` package asynchronously passes events to the emitter in a goroutine. Accordingly I tried to put pretty aggressive names on the helper functions. I think we should be able to isolate the metric from the `emissions` channel in tests, but I think it would be better to do it uniformly across all the various metrics. I haven't really thought it through yet at this point. #4985 #3856 Signed-off-by: Jamie Klassen <cklassen@pivotal.io>
jamieklassen
pushed a commit
that referenced
this pull request
Jan 11, 2020
This commit also backfills tests for ths WorkersState metric. It turns out that there was enough untested logic there that a bug was introduced when #4895 was implemented, so it's high time to have some tests! It was more difficult than I expected to get the metric into a test harness -- the code had a problem with what Michael Feathers calls "sensing". It's not expensive to instantiate the metric, but it is difficult to observe the effect of its `Emit` method being called, since the `emitLoop` function in the `metric` package asynchronously passes events to the emitter in a goroutine. I also think its possible that running these tests in multiple threads could case data races -- accordingly I tried to put pretty aggressive names on the helper functions. I think we should be able to isolate the metric from the `emissions` channel in tests, but I think it would be best to do the same thing uniformly across all the various metrics. I haven't really thought it through yet at this point. #4985 #3856 Signed-off-by: Jamie Klassen <cklassen@pivotal.io>
jamieklassen
pushed a commit
that referenced
this pull request
Jan 11, 2020
This commit also backfills tests for ths WorkersState metric. It turns out that there was enough untested logic there that a bug was introduced when #4895 was implemented, so it's high time to have some tests! It was more difficult than I expected to get the metric into a test harness -- the code had a problem with what Michael Feathers calls "sensing". It's not expensive to instantiate the metric, but it is difficult to observe the effect of its `Emit` method being called, since the `emitLoop` function in the `metric` package asynchronously passes events to the emitter in a goroutine. I also think its possible that running these tests in multiple threads could cause data races -- accordingly I tried to put pretty aggressive names on the helper functions. I think we should be able to isolate the metric from the `emissions` channel in tests, but I think it would be best to do the same thing uniformly across all the various metrics. I haven't really thought it through yet at this point. #4985 #3856 Signed-off-by: Jamie Klassen <cklassen@pivotal.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: kyrylo.bilchenko kirya7@gmail.com
Existing Issue
Fixes # .
Fixes #3856
Contributor Checklist
Reviewer Checklist
and Helm packaging; otherwise, ignored for the integration tests (for example, if they are Garden configs that are not displayed in the
--help
text).