Skip to content

Conversation

LukeAVanDrie
Copy link
Contributor

This PR improves the pkg/epp/flowcontrol/types package. It is a preparatory step that cleans up and refines our core data contracts before the main FlowController engine logic is introduced.

This change directly addresses previous reviewer feedback regarding documentation, co-locating it with the code to improve maintainability and prevent documentation drift.

This work tracks #674

Key Changes

  • Consolidated Documentation: The package-level README.md has been removed, and its content has been migrated into a comprehensive GoDoc package comment (doc.go). The narrative has been rewritten to tell a clearer architectural story, explaining the request lifecycle through the lens of the EnqueueAndWait model.

  • Scoped feature set for GA: The ErrDisplaced error and QueueOutcomeEvictedDisplaced outcome have been removed. This aligns the types package with the planned feature set for the initial release and follows the YAGNI principle. These types will be reintroduced in the future PR that implements the displacement feature itself.

  • Safer Enum Zero-Value: A new QueueOutcomeNotYetFinalized enum value has been added. This serves as a safer, explicit zero-value for the QueueOutcome type. It prevents the default state of a new request item from being misinterpreted as a valid final outcome (e.g., Dispatched), making the internal state machine more robust.

Next Steps

Once this is merged, it unblocks the subsequent PR which will introduce the FlowController's ShardProcessor.

Copy link

netlify bot commented Jul 19, 2025

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

Name Link
🔨 Latest commit 40d9d21
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/687bf5d0013ba500083c394e
😎 Deploy Preview https://deploy-preview-1191--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 added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 19, 2025
@k8s-ci-robot k8s-ci-robot requested review from ahg-g and danehans July 19, 2025 19:42
@k8s-ci-robot
Copy link
Contributor

Hi @LukeAVanDrie. 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. Regular contributors should join the org to skip this step.

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.

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 19, 2025
This commit improves the foundational `types` package by consolidating
documentation and adding a safer default enum value in preparation for
the new `FlowController` implementation. It also removes concepts
related to displacement, which are out of scope for the initial
release.

Key changes:
- The package-level `README.md` has been removed. Its content is now
  in a comprehensive GoDoc package comment in `doc.go`. This addresses
  reviewer feedback to co-locate documentation with the code it
  describes, reducing maintenance burden and preventing doc drift.

- The package documentation has been rewritten to tell a clearer
  architectural narrative, explaining the request lifecycle through
  the lens of the `EnqueueAndWait` model.

- The `ErrDisplaced` error and `QueueOutcomeEvictedDisplaced` outcome
  have been removed to align the types with the GA feature set.

- A new `QueueOutcomeNotYetFinalized` enum value has been added. This
  serves as a safer, explicit zero-value for the `QueueOutcome` type,
  which is used by the new `ShardProcessor` to represent the initial
  state of a request before its lifecycle is complete.
@LukeAVanDrie LukeAVanDrie force-pushed the feat/flow-control-types branch from def65e8 to 40d9d21 Compare July 19, 2025 19:45
@ahg-g
Copy link
Contributor

ahg-g commented Jul 21, 2025

/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 Jul 21, 2025
@ahg-g
Copy link
Contributor

ahg-g commented Jul 21, 2025

No logic changes in this PR, all changes are comments and docs

/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 Jul 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jul 21, 2025
@k8s-ci-robot k8s-ci-robot merged commit 9ac2a4d into kubernetes-sigs:main Jul 21, 2025
9 checks passed
kfswain pushed a commit to kfswain/llm-instance-gateway that referenced this pull request Jul 31, 2025
This commit improves the foundational `types` package by consolidating
documentation and adding a safer default enum value in preparation for
the new `FlowController` implementation. It also removes concepts
related to displacement, which are out of scope for the initial
release.

Key changes:
- The package-level `README.md` has been removed. Its content is now
  in a comprehensive GoDoc package comment in `doc.go`. This addresses
  reviewer feedback to co-locate documentation with the code it
  describes, reducing maintenance burden and preventing doc drift.

- The package documentation has been rewritten to tell a clearer
  architectural narrative, explaining the request lifecycle through
  the lens of the `EnqueueAndWait` model.

- The `ErrDisplaced` error and `QueueOutcomeEvictedDisplaced` outcome
  have been removed to align the types with the GA feature set.

- A new `QueueOutcomeNotYetFinalized` enum value has been added. This
  serves as a safer, explicit zero-value for the `QueueOutcome` type,
  which is used by the new `ShardProcessor` to represent the initial
  state of a request before its lifecycle is complete.
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. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants