Skip to content

flow control: refactor and group dependencies in FlowController constructor#2775

Merged
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
evacchi:refactor-flow-controller-cons
Apr 7, 2026
Merged

flow control: refactor and group dependencies in FlowController constructor#2775
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
evacchi:refactor-flow-controller-cons

Conversation

@evacchi
Copy link
Copy Markdown
Contributor

@evacchi evacchi commented Apr 3, 2026

What type of PR is this?

/kind cleanup

What this PR does / why we need it:
Follow-up to @LukeAVanDrie's suggestion in #2530 (comment)

Refactor controller.NewFlowController() to accept a controller.Deps{} struct with the expected parameters. This also makes the opts varargs probably less useful, so this PR proposes to remove that too.

Notice error checking is pretty minimal, i.e. we only default the clock to a RealClock when the field is nil, otherwise we assume the rest of the parameters are correct. I can add more error checking if it's more consistent with the rest of the codebase.

Which issue(s) this PR fixes:
Fixes #2764

Does this PR introduce a user-facing change?:

NONE

evacchi added 2 commits April 3, 2026 12:50
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Apr 3, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 3, 2026

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit c1357ba
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/69cfb189c5c62f0008ee65b9
😎 Deploy Preview https://deploy-preview-2775--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot requested review from elevran and kfswain April 3, 2026 12:24
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 3, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @evacchi. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added 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. labels Apr 3, 2026
@LukeAVanDrie
Copy link
Copy Markdown
Contributor

/lgtm

Notice error checking is pretty minimal, i.e. we only default the clock to a RealClock when the field is nil, otherwise we assume the rest of the parameters are correct. I can add more error checking if it's more consistent with the rest of the codebase.

Since we control all callers here, this is fine. I didn't want unnecessary defensive checks. Though, this is usually more of a concern for anything running on the hot path.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 3, 2026
@ahg-g
Copy link
Copy Markdown
Contributor

ahg-g commented Apr 6, 2026

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 6, 2026
@evacchi
Copy link
Copy Markdown
Contributor Author

evacchi commented Apr 7, 2026

/retest

(possibly a flake)

@ahg-g
Copy link
Copy Markdown
Contributor

ahg-g commented Apr 7, 2026

/lgtm
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, evacchi

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2026
@k8s-ci-robot k8s-ci-robot merged commit 0b0e4f2 into kubernetes-sigs:main Apr 7, 2026
11 checks passed
elevran pushed a commit to llm-d/llm-d-router that referenced this pull request Apr 23, 2026
…ructor (kubernetes-sigs/gateway-api-inference-extension#2775)

* wip

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>

* wip2

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>

---------

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
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/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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flow control: refactor and group dependencies in NewFlowController() constructor

4 participants