Skip to content

client-go/features: introduce WatchListClient feature gate #122571

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

Merged

Conversation

p0lyn0mial
Copy link
Contributor

@p0lyn0mial p0lyn0mial commented Jan 3, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR introduces WatchListClient feature gate to client-go.
The gate will be used by KCM to enable the streaming feature.
It allows the client to get a stream of individual items instead of chunking from the server.

Which issue(s) this PR fixes:

xref: kubernetes/enhancements#3157

Special notes for your reviewer:

First we need #122555

Does this PR introduce a user-facing change?

Add `WatchListClient` feature gate to `client-go`. When enabled it allows the client to get a stream of individual items instead of chunking from the server.

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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. 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. labels Jan 3, 2024
@p0lyn0mial
Copy link
Contributor Author

/assign @wojtek-t

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 3, 2024
@k8s-ci-robot k8s-ci-robot requested review from apelisse and sttts January 3, 2024 14:03
@p0lyn0mial p0lyn0mial force-pushed the upstream-client-go-watch-list-fg branch from f1b5031 to f8f186e Compare January 9, 2024 10:34
@p0lyn0mial p0lyn0mial force-pushed the upstream-client-go-watch-list-fg branch from f8f186e to 37cbf53 Compare January 11, 2024 07:30
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 11, 2024
@p0lyn0mial p0lyn0mial changed the title [WIP]: client-go/features: introduce WatchListClient feature gate client-go/features: introduce WatchListClient feature gate Jan 11, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 11, 2024
@p0lyn0mial p0lyn0mial force-pushed the upstream-client-go-watch-list-fg branch 2 times, most recently from 002df8b to a630801 Compare January 11, 2024 07:34
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 11, 2024
@p0lyn0mial
Copy link
Contributor Author

/assign @deads2k

// across the file.

// owner: @p0lyn0mial
// alpha: v1.27
Copy link
Member

Choose a reason for hiding this comment

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

We didn't have this FG in 1.27 in client-go.
In fact, you're saying that client-side you're going directly to beta, which I'm fine with [given we gated the logic differently before and it's already there].

But let's not pretend that we had a FG before we actually added it :)

So let's remove it.

@deads2k - FYI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sgtm, pushed.

@p0lyn0mial p0lyn0mial force-pushed the upstream-client-go-watch-list-fg branch from a630801 to a442193 Compare January 11, 2024 09:45
@wojtek-t
Copy link
Member

/lgtm
/approve

In case @deads2k wants to take a look too
/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jan 11, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f4d4cff453760b573395aea9d4afb94ea120cf80

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 11, 2024
// NOTE:
// The feature is disabled in Beta by default because
// it will only be turned on for selected control plane component(s).
WatchList Feature = "WatchListClient"
Copy link
Contributor

Choose a reason for hiding this comment

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

Match the featurename please. WatchListClient

Copy link
Contributor Author

Choose a reason for hiding this comment

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

np, updated the featurename.

// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
//
// To add a new feature, define a key for it above and add it here. The features will be
// available throughout Kubernetes binaries.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment doesn't appear to be true yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

This comment doesn't appear to be true yet.

I'd be ok having the comment match reality and the first wiring will use the env var impl.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, updated the comment.

@p0lyn0mial p0lyn0mial force-pushed the upstream-client-go-watch-list-fg branch from a442193 to 7773b0f Compare January 15, 2024 08:46
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 15, 2024
@k8s-ci-robot
Copy link
Contributor

@p0lyn0mial: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-e2e-gce-cos-alpha-features 7773b0f link false /test pull-kubernetes-e2e-gce-cos-alpha-features

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@deads2k
Copy link
Contributor

deads2k commented Jan 15, 2024

/lgtm
/hold cancel

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 15, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: fa3ceceb0af264cb963050637ab2d20999f62617

@k8s-ci-robot k8s-ci-robot merged commit 026a27e into kubernetes:master Jan 15, 2024
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Jan 15, 2024
@cici37
Copy link
Contributor

cici37 commented Jan 16, 2024

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 16, 2024
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. 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. 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.

5 participants