-
Notifications
You must be signed in to change notification settings - Fork 179
feat(flowcontrol): refine types and consolidate docs #1191
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
feat(flowcontrol): refine types and consolidate docs #1191
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 Once the patch is verified, the new status will be reflected by the 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. |
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.
def65e8
to
40d9d21
Compare
/ok-to-test |
No logic changes in this PR, all changes are comments and docs /lgtm |
[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 |
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.
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 mainFlowController
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 theEnqueueAndWait
model.Scoped feature set for GA: The
ErrDisplaced
error andQueueOutcomeEvictedDisplaced
outcome have been removed. This aligns thetypes
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 theQueueOutcome
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
'sShardProcessor
.