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

Merge grpc headers and trailers in case of failure #391

Merged
merged 7 commits into from
Oct 29, 2024

Conversation

NavidJalali
Copy link
Contributor

@NavidJalali NavidJalali commented Oct 23, 2024

Attempt to fix #392

@pjfanning
Copy link
Contributor

A lot of unit tests are broken by this change.

@NavidJalali
Copy link
Contributor Author

@pjfanning yes, I am investigating them now. I didn't run the tests when I was checking if it fixed my issue.

@NavidJalali
Copy link
Contributor Author

Ran into an unrelated issue:
apache/pekko-http#622

@raboof
Copy link
Member

raboof commented Oct 24, 2024

Ran into an unrelated issue: apache/pekko-http#622

That's strange, where does that Trailer without headers get created?

@pjfanning
Copy link
Contributor

I would not favour merging this. It ties us to an unreleased version of pekko-http - and I think there is an argument that the real issue is in the AWS code.

@raboof
Copy link
Member

raboof commented Oct 26, 2024

I would not favour merging this. It ties us to an unreleased version of pekko-http - and I think there is an argument that the real issue is in the AWS code.

I agree we should not merge this as long as it depends on an unreleased version of Pekko HTTP. The PR is still in 'Draft' mode, so that tracks ;).

I agree there's a case to be made that the 'real issue' of #392 is in the AWS implementation. That said, responding with a Strict response for errors like a 404 instead of streaming (which is the core of this PR) seems like a reasonable optimization regardless.

It might still be possible to adapt this PR to avoid creating the situation where a Trailers object without any headers is created, so it can go back to using the regular released Pekko HTTP version. In any case it'll still take a couple of rounds of improvements to make this change nice and ready to merge, but I'm optimistic about the chances of getting there.

@raboof
Copy link
Member

raboof commented Oct 26, 2024

@NavidJalali thanks for working on this, let me know if you'd like me to review your work-in-progress!

@pjfanning
Copy link
Contributor

For practical reasons, it would be good to change this PR to avoid creating Trailers with no headers.

@NavidJalali
Copy link
Contributor Author

Ran into an unrelated issue: apache/pekko-http#622

That's strange, where does that Trailer without headers get created?

I had to dig to find it, but it seems to be created by some fallback logic I removed in this commit

@NavidJalali NavidJalali marked this pull request as ready for review October 27, 2024 12:09
@NavidJalali
Copy link
Contributor Author

Looks like I missed something, I'll get back to debugging

@NavidJalali NavidJalali marked this pull request as draft October 27, 2024 12:29
@NavidJalali NavidJalali marked this pull request as ready for review October 27, 2024 12:54
@pjfanning pjfanning added this to the v1.1.1 milestone Oct 27, 2024
Copy link
Member

@raboof raboof left a comment

Choose a reason for hiding this comment

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

I like the general direction this is going, a couple of review points!

Copy link
Member

@raboof raboof left a comment

Choose a reason for hiding this comment

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

This looks good!

(the link validator failure is unrelated, #395)

@NavidJalali
Copy link
Contributor Author

@pjfanning is the link validator flakey? would it be green if you ran it again? I would love to get a snapshot build

@pjfanning
Copy link
Contributor

@NavidJalali don't worry about the link validator - we tend to ignore the results of that build - see #395

Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

lgtm

@raboof raboof merged commit fa1bfff into apache:main Oct 29, 2024
21 of 22 checks passed
@NavidJalali NavidJalali deleted the alb-fix branch October 29, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potentially incorrect transformation of errors into HttpResponse
3 participants