-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
ui: unbreak make watch
#25871
ui: unbreak make watch
#25871
Conversation
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.
LGTM, seems to fix the problem. Thanks!
pkg/ui/webpack.app.js
Outdated
proxy: { | ||
// Note: this shouldn't require a custom bypass function to work; | ||
// docs say that setting `index: ''` is sufficient to proxy `/`. | ||
// However, that did not work, and may require upgrading ty webpack 4.x. |
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.
s/ty/to/
pkg/ui/webpack.app.js
Outdated
secure: false, | ||
target: process.env.TARGET, | ||
bypass: (req) => { | ||
if (req.path === "/") { |
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.
is it worth putting "/"
in proxyPrefixes
?
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.
Needs to be a special case because if it were treated as a prefix, it'd match everything. Will move logic to shouldProxy
though.
bors r+ |
Looks like this is hitting a lint error that failed the bors CI. |
Build failed (retrying...) |
By telling Webpack to proxy the path `/` through to the Cockroach process. Webpack used to serve `/` itself from a static file, but as of cockroachdb#25195 we generate `/` dynamically in Go, so we can use it to pass login state to the UI. Fixes cockroachdb#25858 Release note: None
Canceled |
Whoops! Fixed. Looks like bors split out the other PRs and tried to merge them individually, which is cool. bors r+ |
Build failed (retrying...) |
25868: sql: Log event for TRUNCATE TABLE r=a-robinson a=a-robinson Fixes #25867 Release note (sql change): TRUNCATE TABLE commands are now logged in the event log. 25871: ui: unbreak `make watch` r=vilterp a=vilterp By telling Webpack to proxy the path `/` through to the Cockroach process. Webpack used to serve `/` itself from a static file, but as of #25195 we generate `/` dynamically in Go, so we can use it to pass login state to the UI. Fixes #25858 Release note: None 25875: ui: fix action names broken by #25823 r=couchand a=couchand In that PR, I mechanically replaced identifiers when there were new warnings about shadowing, but in two places I accidentally changed semantics due to the shorthand form of object literals. 🤦♂️ Release note: None Co-authored-by: Alex Robinson <[email protected]> Co-authored-by: Pete Vilter <[email protected]> Co-authored-by: Andrew Couch <[email protected]>
Build succeeded |
By telling Webpack to proxy the path
/
through to the Cockroach process.Webpack used to serve
/
itself from a static file, but as of #25195 wegenerate
/
dynamically in Go, so we can use it to pass login state tothe UI.
Fixes #25858
Release note: None