Skip to content
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

apis: add implementation for GEP-1731 HTTPRoute Retries #3301

Merged

Conversation

mikemorris
Copy link
Contributor

What type of PR is this?
/kind documentation
/kind feature

What this PR does / why we need it:
Implements GEP-1731: HTTPRoute Retries

Which issue(s) this PR fixes:

Fixes #1731

Does this PR introduce a user-facing change?:

adds support for configuring retries in HTTPRoute

@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/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 27, 2024
@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. kind/gep PRs related to Gateway Enhancement Proposal(GEP) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 27, 2024
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @mikemorris!

apis/v1/httproute_types.go Outdated Show resolved Hide resolved
apis/v1/httproute_types.go Outdated Show resolved Hide resolved
apis/v1/httproute_types.go Outdated Show resolved Hide resolved
geps/gep-1731/index.md Show resolved Hide resolved
pkg/test/cel/grcproute_experimental_test.go Outdated Show resolved Hide resolved
apis/v1/httproute_types.go Outdated Show resolved Hide resolved
Comment on lines +374 to +375
// Implementations SHOULD retry on connection errors (disconnect, reset, timeout,
// TCP failure) if a retry stanza is configured.
Copy link
Member

Choose a reason for hiding this comment

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

Any reason not to make this configurable?

Copy link
Contributor Author

@mikemorris mikemorris Aug 28, 2024

Choose a reason for hiding this comment

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

Primarily because there's way too much variance in how different implementations define, default, bucket or even allow these to be configurable for this to be generally implementable within extended conformance, and secondarily because it's a simpler UX for what is often a good practice.

Copy link
Contributor

Choose a reason for hiding this comment

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

FTR I think that makes sense, @mikemorris.

//
// +optional
// <gateway:experimental>
Codes []HTTPRouteRetryStatusCode `json:"codes,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

If at some point we want to include strings here, do we add a new Reasons []string field?

Copy link
Contributor Author

@mikemorris mikemorris Aug 28, 2024

Choose a reason for hiding this comment

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

Exactly what I had been thinking if that we end up wanting that in the future! Per above comment on connection error variance between implementations, a Reasons []string field may need to be implementation-specific, and could potentially even enable use cases like unsetting default behavior with a string like google.com/no-retry-connection-errors or something.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 28, 2024
@mikemorris mikemorris force-pushed the apis/gep-1731-httproute-retry branch from ffc0c9d to 68f9dc9 Compare August 28, 2024 21:37
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 28, 2024
@mikemorris mikemorris force-pushed the apis/gep-1731-httproute-retry branch from 68f9dc9 to 5d24b39 Compare August 29, 2024 16:01
Copy link
Contributor

@youngnick youngnick left a comment

Choose a reason for hiding this comment

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

LGTM with one small removal nit.

apis/v1/httproute_types.go Outdated Show resolved Hide resolved
@shaneutt shaneutt requested a review from robscott August 30, 2024 17:34
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 30, 2024
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @mikemorris! One small nit but otherwise LGTM.

/approve

apis/v1/httproute_types.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mikemorris, robscott, shaneutt

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

@robscott
Copy link
Member

Thanks @mikemorris!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2024
@robscott robscott added this to the v1.2.0 milestone Aug 30, 2024
@robscott
Copy link
Member

/hold cancel

@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. and removed 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 Aug 30, 2024
@mikemorris
Copy link
Contributor Author

Just caught some last-minor minor cleanup on GEP index/status!

@robscott
Copy link
Member

Just caught some last-minor minor cleanup on GEP index/status!

Good catch, thanks!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2024
@mikemorris mikemorris force-pushed the apis/gep-1731-httproute-retry branch from d246bfa to 86f5d87 Compare August 30, 2024 20:35
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2024
@kflynn
Copy link
Contributor

kflynn commented Aug 30, 2024

Thanks @mikemorris, looks good here at this point! 🙂

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2024
Copy link
Member

@mlavacca mlavacca left a comment

Choose a reason for hiding this comment

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

Thanks, @mikemorris!

/lgtm
/unhold

@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 Aug 31, 2024
@k8s-ci-robot k8s-ci-robot merged commit c46ef9d into kubernetes-sigs:main Aug 31, 2024
8 checks passed
@mikemorris mikemorris deleted the apis/gep-1731-httproute-retry branch September 3, 2024 15:13
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/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Configurable Retries in HTTPRoute
7 participants