-
Notifications
You must be signed in to change notification settings - Fork 760
fix: query parameters in ws #5381
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
for more information, see https://pre-commit.ci
| } | ||
| } | ||
|
|
||
| // Move over window level parameters to the WebSocket URL |
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.
@dmadisetti Was there a reason for stripping unknown query parameters? This breaks mo.query_params().
Was this code too aggressively refactored, i.e. is there a codepath that relies on query parameter stripping?
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.
A little too conservative - with the refactor query params were not passed down at all. Thanks for the general fix
…rimo into aka/fix-query-param-in-ws
| if ( | ||
| restrictToKnownQueryParams && | ||
| !Object.values(KnownQueryParams).includes(key) | ||
| ) { | ||
| continue; | ||
| } |
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.
I included this in case other code paths do need to restrict to known query parameters.
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.
Likely not needed
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.
Got it, so just don't filter known query params, pass all through?
Edit: nvm, saw your approval.
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.
Thanks for the unit test too
This fixes a regression that caused `mo.query_params()` to stop working. We need to send all query parameters to the backend, not just known ones, as part of the websocket URL. Tested by playing with the query parameters smoke test (`_marimo/smoke_tests`). Fixes #5376. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This fixes a regression that caused `mo.query_params()` to stop working. We need to send all query parameters to the backend, not just known ones, as part of the websocket URL. Tested by playing with the query parameters smoke test (`_marimo/smoke_tests`). Fixes marimo-team#5376. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This fixes a regression that caused `mo.query_params()` to stop working. We need to send all query parameters to the backend, not just known ones, as part of the websocket URL. Tested by playing with the query parameters smoke test (`_marimo/smoke_tests`). Fixes marimo-team#5376. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This fixes a regression that caused
mo.query_params()to stop working. We need to send all query parameters to the backend, not just known ones, as part of the websocket URL.Tested by playing with the query parameters smoke test (
_marimo/smoke_tests).Fixes #5376.