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

pd: Routes added to tonic server cause regression in http trailers #3697

Open
conorsch opened this issue Jan 29, 2024 · 3 comments
Open

pd: Routes added to tonic server cause regression in http trailers #3697

conorsch opened this issue Jan 29, 2024 · 3 comments
Labels
A-node Area: System design and implementation for node software C-bug Category: a bug _P-low Priority: low

Comments

@conorsch
Copy link
Contributor

We observed a breaking change in the local dev env for web extension development this morning, caused by merge of #3679. Although that PR passed smokes and even manual testing via pcli, it broke the web extension, due to the refactor no longer supporting HTTP trailers.

For now, we'll revert that commit, to unbreak web development immediately. We should also investigate how to improve integration testing between the penumbra monorepo and the latest tip of extension code.

Misc

@hdevalence isolated the failing commit via git bisect.

@cratelyn
Copy link
Contributor

hyperium/tonic#455 notes two unfinished issues:

  • Decide how to better integrate this functionality with the transport. For now, the GrpcWeb type is designed to decorate services but it doesn't have to be. A different design might not even expose the service and wire everything up internally.
  • How to better integrate with tonic's router. To multiplex services, it is necessary to wrap them individually. This is either a feature or a bug.

(emphasis mine)

i suspect that the change to use a Routes in #3679 was adversely affected by this.

i'll take a look tomorrow, but i plan to keep a tight timebox on attempting to land that PR again, as written. it was addressing a TODO that i found while working on auto-https. i may remove that comment, or rewrite it to point here.

it would be nice to test pd against a grpc-web client, if we do not already. that feels outside the scope of this issue.

thanks for opening this and for reverting that commit, @conorsch! (and thank you to everybody else that helped track this regression 🐛 🔍)

@hdevalence
Copy link
Member

Another possibility is that we could file an issue upstream, and then keep the commit around to pull up again if it gets resolved -- the new code is certainly nicer but i'm not sure it's critical to land it at the moment.

@cratelyn cratelyn added A-node Area: System design and implementation for node software C-bug Category: a bug labels Jan 30, 2024
@cratelyn cratelyn changed the title pd: regression in http trailers pd: Routes added to tonic server cause regression in http trailers Jan 30, 2024
@cratelyn
Copy link
Contributor

note: i filed #3704 to track the addition of integration tests exercising grpc-web compatibility, to keep that conversation separate from this specific regression.

@hdevalence hdevalence added the _P-low Priority: low label Feb 9, 2024
cratelyn added a commit that referenced this issue Mar 12, 2024
see #3913, #3973 and #3588. this is a second attempt, following up on
#3980.

#### 🔭 background

NB: the difference between this and #3679 is that the latter (_which ran
afoul of a regression_) would have `penumbra-app` create a `Routes`,
that we would
[add](https://github.com/penumbra-zone/penumbra/pull/3679/files#diff-fbc4204ceb976c8cb30ed06168e2476700bae21bfd803e26281b2d026194d430R204)
to the builder (_which stays in `pd`_). here, i'm not trying to make
that cut between `Router` and `Routes`, and am attempting to hoist the
whole thing out of `pd`, without making changes to how we interact with
`tonic`. my aim is for us to be able to move this, without running into
that bug (#3697) again.

NB: after running into problems in #3980, i found a way to easily
reproduce the issue locally. my belief was that something related to our
dependencies' cargo features was at play. rather than isolate the issue,
it was easier to rewrite this (_it's just code motion, after all_) while
running some of the network integration tests in a loop.

unlike #3980, this moves the rpc server into `penumbra-app`, per
#3980 (comment)

#### 👁️ overview

we would like to use the rust view server in mock consensus tests. in
order to run the `penumbra_view::ViewServer` however, we need to spin up
the corresponding grpc endpoint for it to connect to.

this branch performs a bit of code motion, moving the `grpc_server` out
of `pd` and into `penumbra-app`. there will likely be other functional
changes to the code in question before we can use it in those tests, but
this PR is interested in moving that code into a place where our tests
can rely upon it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-node Area: System design and implementation for node software C-bug Category: a bug _P-low Priority: low
Projects
Status: Backlog
Status: No status
Development

No branches or pull requests

3 participants