-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[proxy] Match /api/v1
in the @backend_wss
matcher
#14974
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
Conversation
Websocket Upgrade requests can hit either `/api/gitpod` (from `server`) or `/api/v1` (from the public API). This matcher change ensures that the request is handled by the intended matcher block rather than the block for `api/*` requests below.
started the job as gitpod-build-af-caddyy-add-path-to-path-matcher.1 because the annotations in the pull request description changed |
The Public API uses both endpoints, depending on the type of Auth token. Currently server doesn't uniformly support Bearer and Session auth so it's spread across these. Shouldn't cause any issues but just an FYI |
Testing this PR. The only differences I see are the upstream_connection, upstream_headers or CORS header (templates). Only the later should influence behavior, though. The best test I could think of is trying to connect from a local IDE. @andrew-farries Might be worth asking the IDE team for their opinion on this PR. |
Have tagged the IDE team for review. |
preview env is down 😢 |
/werft run 👍 started the job as gitpod-build-af-caddyy-add-path-to-path-matcher.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested starting a workspace with browers and local VsCode, all worked fine. 👍
/hold for further review by IDE team
Checked that the public API is still able to talk to http POST https://api.af-caddyy-07cce80379.preview.gitpod-dev.com/gitpod.experimental.v1.TeamsService/GetTeam teamId="23bf92ee-4f08-456f-b498-1f89637b2900" Authorization:'Bearer <>' (using a bearer token rather than session auth forces the public api to use the |
@andrew-farries After additional testing I'm confident we're not breaking anybody with this 🙃 I would be happy to move forward with this 👍 |
Description
Websocket
Upgrade
requests can hit either/api/gitpod
(fromserver
) or/api/v1
(from the public API).This matcher change ensures that websocket requests to
api/v1
are handled by the matcher block intended to handle websocket requests rather than the block forapi/*
requests.Websocket
Upgrade
requests toapi/v1
worked without this change because the handler forapi/*
handled those requests correctly, but this won't be the case after #14897 (which makes changes to the/api/*
handler) lands.Related Issue(s)
Part of #9198
How to test
The public API RPCs that delegate to
server
over the JSON-RPC API still work.Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh