Open serathius opened 4 years ago
/assign I am interested in working on pkg/scheduler/framework/v1alpha1
Thanks @serathius for picking this. Let's try done this by 1.19. /milestone v1.19
/assign staging/src/k8s.io/apiserver/pkg/admission/metrics staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics
/assign pkg/master cluster/images/etcd-version-monitor
@zhouya0 sorry , i open a pr just now
@zhouya0 sorry , i open a pr just now
Ok, but all of it? Should I remove them all?
@zhouya0 sorry , i open a pr just now
Ok, but all of it? Should I remove them all?
just for pkg/volume/util/operationexecutor , you can pick up others , thanks.
Just a reminder. There are several methods in testutil.go, If you are removing the reference from a test, please try using these methods refactor the test case first.
Does this cover the component-base library as well? It relies on several Prometheus modules.
Oh, I see it's in the whitelist here.
Hey @seh, component-base/metrics is the intended wrapper for Prometheus. So it's intended to be using it there.
I have a question:
cluster/images/etcd-version-monitor
has deeply rely on github.com/prometheus/client_model/go
with three structs :dto.MetricFamili
, dto.LabelPair
, dto.Metric
. so it's not easy to move these fucntions to staging/src/k8s.io/component-base/metrics
. What I'm going to do is simply wrap these structs like:
type MetricFamily struct {
*dto.MetricFamily
}
Is that suitable to do this? If yes, where should I put this definition?
I am working on the pkg/scheduler/framework/v1alpha1
part, and got a problem here:
This test needs to get the label names/values, sampleCount of a Histogram, I didn't find function to get these two values in testutil.go
.
Also, I am trying to use CollectAndCompare
to pass the expected metric string and compare, but the problem is sampleSum
is not a constant value (it is a duration and will change each time we run the test), so I guess we can't use CollectAndCompare
.
So, shall I introduce new methods in testutil.go
to get the labels
and sampleCount
?
@serathius @RainbowMango
Do you have any suggestion? Thanks
pkg/master
has been fixed by this PR, isn't it?
https://github.com/kubernetes/kubernetes/pull/76741/files
@zhouya0 If so then please just remove it from prometheus_import_allow_list
Personally I would be for focusing on removing dependencies in this issue. I have doubts that prometheus "CollectAndCompare" matches on how we currently do tests in k8s. Before refactoring we should agree on how metrics should be tested.
@RainbowMango WDYT?
Personally I would be for focusing on removing dependencies in this issue.
The reference we need to remove mainly is github.com/prometheus/client_golang/prometheus
, that we can ensure all components turn into component-base instead of using Prometheus directly.
For other references, actually we don't need to move them in a rush as they won't hurt anything. The benefit when we move these references is we can provide a uniform style for metrics testing.
I have doubts that prometheus "CollectAndCompare" matches on how we currently do tests in k8s.
If current utils can't meet the testing requirement, then we can introduce COMMON
util in testutil.
I don't want testutil package to be a grocery store, that what I mean do not just move code into it
.
Visibility rules for prometheus were moved to better location. Now you can find them here https://github.com/kubernetes/kubernetes/blob/master/build/visible_to/BUILD#L428
/cc
Hello, @jtslear here from Bug Triage! This issue has not been updated for a long time, so I'd like to check on the status. The code freeze is starting June 25th and while there is still plenty of time, we want to ensure that each PR has a chance to be merged on time.
As the issue is tagged for 1.19, is it still planned for this release?
As the issue is tagged for 1.19, is it still planned for this release?
Yes.
Due to reaching the code freeze deadline, I'm going to bump this to the next release.
/milestone v1.20
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Hey :wave: Bug Triage here. Wanted to follow up on the status of this issue as we're approaching code freeze on 12.11.2020. This issue is tagged for 1.20, is it still planned for this release?
/milestone clear
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
/remove-lifecycle rotten
@serathius It seems all related PRs here are either merged or closed. But there is still some work left, maybe I can take this up.
Sure, some issues were not finished before they were closed due to time passed. Doesn't look like current owners will continue the work. Feel free to pick up directory for fixings. Let's make sure that we notify previous owner.
Just comment with information which directory you want to pick up and cc current owner.
Hi @notpad, I will pick up scheduler part. Ping me if you are still working on this.
@tanjunchen still working this? If not, I want to pick up the left ones and drive to close this issue.
@gavinfish no,welcome to close this issue.thanks
/assign /remove-help
Thanks for picking this up I have updated issue description to reflect current state.
Hi @serathius, I just noticed the bazel build system has been removed, does that means we can't forbid importing prometheus directly anymore?
Thanks @RainbowMango for pointing this out, I will follow up with author of PR to figure out on replacement.
Thank you for flagging this and apologies for the oversight, https://github.com/kubernetes/kubernetes/issues/99876 to track migrating this.
Restrictions are in place again with an alternative mechanism. Sorry about that.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/lifecycle frozen
I am writing some new code that should be allowed to import from github/prometheus, but is getting dinged by CI. Please see #109277 . How do I mark this as OK, so that I do not get the complaint in https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/109277/pull-kubernetes-verify/1510880783680671744 ?
@dims: done, thanks for the pointer.
Are you still working on the remaining tasks? If not, I want to try. @gavinfish
As part of Metrics Stability KEP we migrated from Prometheus client to Kubernetes Metrics Framework. So we no longer need to depend on promethues client directly.
I configured Bazel to forbid importing prometheus directly. https://github.com/kubernetes/kubernetes/blob/master/hack/verify-prometheus-imports.sh (EDITED)
Example PR that removes reference https://github.com/kubernetes/kubernetes/pull/85289
There are still couple of directories that need to be cleaned up:
cluster/images/etcd-version-monitor
(@zhouya0, https://github.com/kubernetes/kubernetes/pull/89413)pkg/master
(@zhouya0)pkg/scheduler/
(@gavinfish, https://github.com/kubernetes/kubernetes/pull/98338)pkg/volume
(@gavinfish, https://github.com/kubernetes/kubernetes/pull/98729)staging/src/k8s.io/apiserver/pkg/admission/metrics
(@tanjunchen, https://github.com/kubernetes/kubernetes/pull/89285)staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics
(@tanjunchen)test/e2e_node
(@gavinfish)/sig instrumentation /kind cleanup /cc @logicalhan
Please volunteer if your interested in working on certain directory. /help