Skip to content

Conversation

@kfswain
Copy link
Collaborator

@kfswain kfswain commented May 16, 2025

When requests/responses are not valid json, EPP clobbered any body message. This should improve UX & useful messaging in the face of failures.

@netlify
Copy link

netlify bot commented May 16, 2025

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

Name Link
🔨 Latest commit ef78cf0
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/682ce755c2ec18000804a660
😎 Deploy Preview https://deploy-preview-847--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 May 16, 2025
@k8s-ci-robot k8s-ci-robot requested a review from danehans May 16, 2025 00:39
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kfswain

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 requested a review from nirrozenbaum May 16, 2025 00:39
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 16, 2025
logger.V(logutil.DEFAULT).Error(err, "Error unmarshaling request body")
// TODO: short circuit and send the body back as is (this could be an envoy error), currently we drop
// whatever the body request would have been and send our immediate response instead.
err = errutil.Error{Code: errutil.BadRequest, Msg: "Error unmarshaling request body: " + string(body)}
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't adding the body make the message too large?

},
},
}
break
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the behavior before doing this short circuit?

Copy link
Contributor

@ahg-g ahg-g May 16, 2025

Choose a reason for hiding this comment

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

I am asking because we hit an issue when running large scale benchmark with model server streaming; surprisingly some requests were hitting this code path and so causing unmarshling errors. My theory was that for some reason the response header events were not always being sent before the response body events, and so the modelServerStreaming flag was being set late for some requests.

@ahg-g
Copy link
Contributor

ahg-g commented May 20, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 20, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 20, 2025
@ahg-g
Copy link
Contributor

ahg-g commented May 20, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 20, 2025
@k8s-ci-robot k8s-ci-robot merged commit 87b3a08 into kubernetes-sigs:main May 20, 2025
8 checks passed
irar2 pushed a commit to irar2/gateway-api-inference-extension that referenced this pull request Jun 3, 2025
rlakhtakia pushed a commit to rlakhtakia/gateway-api-inference-extension that referenced this pull request Jun 11, 2025
@kfswain kfswain deleted the response-fixes branch July 31, 2025 21:25
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. 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