Skip to content

cleanup: replace ENABLE_CLIENT_GO_WATCH_LIST_ALPHA with WatchListClient gate#122791

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
p0lyn0mial:upstream-cleanup-watch-list-env-var
May 21, 2024
Merged

cleanup: replace ENABLE_CLIENT_GO_WATCH_LIST_ALPHA with WatchListClient gate#122791
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
p0lyn0mial:upstream-cleanup-watch-list-env-var

Conversation

@p0lyn0mial
Copy link
Copy Markdown
Contributor

@p0lyn0mial p0lyn0mial commented Jan 15, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

replace ENABLE_CLIENT_GO_WATCH_LIST_ALPHA with client-go.WatchListClient gate

requires:

#122571
kubernetes/perf-tests#2506
#122721

xref: kubernetes/enhancements#3157

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

this change needs to be coordinated with updating https://github.com/kubernetes/perf-tests/blob/master/util-images/watch-list/main.go#L51 otherwise some performance test will show inaccurate results.

I used
https://grep.app/search?q=ENABLE_CLIENT_GO_WATCH_LIST_ALPHA&filter[repo.pattern][0]=kubernetes to find usages of the env var across k/* repository.

Does this PR introduce a user-facing change?

Removes `ENABLE_CLIENT_GO_WATCH_LIST_ALPHA` environmental variable from the reflector.
To activate the feature set `KUBE_FEATURE_WatchListClient` environmental variable or a corresponding command line option (this works only binaries that explicitly expose it).

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/3157-watch-list/README.md
- [Other doc]: https://docs.google.com/document/d/1g9BGCRw-7ucUxO6OtCWbb3lfzUGA_uU9178wLdXAIfs/edit#heading=h.lymszxjovg65

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 15, 2024
@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 15, 2024
@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

/assign @benluddy @deads2k
/cc @wojtek-t

}
}

type enabledWatchListClientFeatureGateRegistry struct {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm going to remove this struct once the WatchListClient is enabled for KCM.

@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

/test pull-kubernetes-e2e-gce-cos-alpha-features

@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

I think that kubernetes-e2e-gce-cos-alpha-features will be fixed by #122701

@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

I think that kubernetes-e2e-gce-cos-alpha-features will be fixed by #122701

Actually, kubernetes-e2e-gce-cos-alpha-features is blocked on #122721 and here is a proof https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/122763/pull-kubernetes-e2e-gce-cos-alpha-features/1746991268791062528

p0lyn0mial added a commit to p0lyn0mial/perf-tests that referenced this pull request Jan 16, 2024
…nv var with `KUBE_FEATURE_WatchListClient`

The previous environment variable is being replaced in kubernetes/kubernetes#122791
@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

created kubernetes/perf-tests#2506

The watchlist perf tests are run once a day. We can merge both pull requests roughly at the same time. In addition to that, no one actually monitors the results of the watchlist perf tests, so even if the tests temporarily fail, it is okay.


func (r *enabledWatchListClientFeatureGateRegistry) Enabled(feature clientfeatures.Feature) bool {
if feature == clientfeatures.WatchListClient {
return true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that you force the gate here, why do we need to wait for an env var change? It appears the test used to force the feature to "on" and that after this change it is still force "on" regardless of the state of the env var being specified.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I linked a wrong PR. We need #122571 (already merged).

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented Jan 16, 2024

verify failure.

looks fine otherwise

@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

/retest

@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

failing pull-kubernetes-dependencies will be fixed when #122738 merges (updates the vendor dir).

@k8s-ci-robot k8s-ci-robot reopened this Apr 4, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@wojtek-t: Reopened this PR.

Details

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@wojtek-t wojtek-t removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Apr 4, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Please note that we're already in Test Freeze for the release-1.30 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.30.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Wed Apr 3 02:18:49 UTC 2024.

@wojtek-t wojtek-t self-assigned this Apr 22, 2024
@p0lyn0mial p0lyn0mial force-pushed the upstream-cleanup-watch-list-env-var branch from 189dcce to 700f43a Compare April 24, 2024 10:28
@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 25, 2024
@p0lyn0mial p0lyn0mial force-pushed the upstream-cleanup-watch-list-env-var branch from 82f382e to ae08142 Compare April 25, 2024 14:33
// regression test for https://issues.k8s.io/117258
func TestAPIServerTransportMetrics(t *testing.T) {
featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, "AllAlpha", true)
featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.WatchList, false)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For tests that enable all alpha and beta flags, we need to disable the WatchList FG until we can manually request progress notification from the server.

This is not an ideal solution because in the meantime someone might add a new test.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already can request progress notifications manually if you switch on ConsistentListFromCache feature

So this shouldn't be needed - if it is it suggests something isn't working somewhere and we should debug it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, okay, I will have a look, thanks.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 26, 2024
@p0lyn0mial p0lyn0mial force-pushed the upstream-cleanup-watch-list-env-var branch from ae08142 to d71fc28 Compare April 29, 2024 14:55
@wojtek-t
Copy link
Copy Markdown
Member

@p0lyn0mial - can you please revert this PR to what it was supposed to do - it should work fine now.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2024
@p0lyn0mial p0lyn0mial force-pushed the upstream-cleanup-watch-list-env-var branch from d71fc28 to 9248ccc Compare May 21, 2024 06:47
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2024
@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

/test pull-kubernetes-e2e-gce-cos-alpha-features

@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

@p0lyn0mial - can you please revert this PR to what it was supposed to do - it should work fine now.

done, let's wait until pull-kubernetes-e2e-gce-cos-alpha-features gets green before merging this PR.

@wojtek-t
Copy link
Copy Markdown
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 21, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 59d6f1f68fdf40df40d8646e5677303bda1f47e5

@wojtek-t
Copy link
Copy Markdown
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 21, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, p0lyn0mial, wojtek-t

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@p0lyn0mial
Copy link
Copy Markdown
Contributor Author

/test pull-kubernetes-node-e2e-containerd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants