-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[VTAdmin] Migrate to Vite #12831
[VTAdmin] Migrate to Vite #12831
Conversation
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
…v in place of process.env Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]> Signed-off-by: Frances Thai <[email protected]>
Left several comments about license header missing, but there are a few other places where the headers are missing |
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 am not an expert in VTAdmin so I'll let @ajm188 stamp this. But everything outside of VTAdmin and the few comments I left looks good to me 🙏🏻
Co-authored-by: Florent Poinsard <[email protected]> Signed-off-by: Frances Thai <[email protected]>
Signed-off-by: notfelineit <[email protected]>
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! Just a couple small things, feel free to fix-and-merge!
@@ -14,32 +14,33 @@ Scripts for common and not-so-common tasks. These are always run from the `vites | |||
|---|---| | |||
| `npm local` | Start vtadmin-web in development mode on [http://localhost:3000](http://localhost:3000), pointed at a vtadmin-api server running on [http://localhost:14200](http://localhost:14200). This is most useful when running against a [local Vitess cluster](https://vitess.io/docs/get-started/local/). | | |||
| `npm start` | Start vtadmin-web in development mode on [http://localhost:3000](http://localhost:3000). Additional environment variables can be specified on the command line or in a .env file; see [Environment Variables](#environment-variables). | | |||
| `npm run test` | Launches the test runner in the interactive watch mode. See the create-react-app documentation about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | | |||
| `npm run test` | Launches the test runner in the interactive watch mode. See the vitest documentation about [running tests](https://vitest.dev/guide/cli.html#vitest-run) for more information. | |
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.
oh noooo lol
i completely get the name but boy that's gonna be confusing hahaha
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.
😅 yeah it will be, we could add (NOT VITEST!!) afterwards lol
That shouldn't be needed if what the new version creates is also committed? |
Signed-off-by: notfelineit <[email protected]>
…anetscale/vitess into frances/migrate-from-create-react-app Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
@dbussink we wouldn't need to disable it if the workflow uses this branch's The CI step is still failing. The protos generated are still the latest though:
|
Signed-off-by: notfelineit <[email protected]>
It would be, afaik all jobs run against the current branch including this one so it would generate the same code. |
@dbussink not sure why the CI is failing then 🤔 even after pulling latest from main + running Running locally:
|
Hmm, the reason it's not showing a diff is that the files are marked as generated / binary, so if you modify
Then it should show what the difference is that CI sees so we can find out what's up here. |
@dbussink thank you! Updating now and checking the diff. Hoping it shows! |
Signed-off-by: notfelineit <[email protected]>
…e-from-create-react-app Signed-off-by: notfelineit <[email protected]>
Signed-off-by: notfelineit <[email protected]>
.gitattributes
Outdated
@@ -1,6 +1,3 @@ | |||
web/vtadmin/src/proto/** linguist-generated=true | |||
web/vtadmin/src/proto/*.js -diff | |||
web/vtadmin/src/proto/*.ts -diff |
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.
@notfelineit Should we revert this now that the issue was found?
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.
Yes! 😄
@@ -33,23 +31,22 @@ | |||
"react-toastify": "^8.1.0", |
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.
@notfelineit I'm seeing also a following message:
npm WARN deprecated [email protected]: react-flow-renderer has been renamed to reactflow, please use this package from now on https://reactflow.dev/docs/guides/migrate-to-v11/
Should we also update all dependencies here in general? Or do that in a separate PR then?
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'm thinking we can do that in a separate PR! Should be easy to upgrade now we're on Vite 😄
Signed-off-by: Frances Thai <[email protected]>
Description
This PR addresses this issue and migrates VTAdmin web from create-react-app to vite. Some of the larger changes include:
vitest
for all testsjest
sincevitest
replaces itvitest
has a global config fileREACT_APP_*
env variables toVITE_
process.env
toimport.meta.env
commonjs
toes6
to better work with vite's defaultsManual validations
./101_initial_cluster.sh
and VTAdmin web loads fine 👍npm run build
locally and verified build runs locallynpm run local
and verified env vars passed are respectedRelated Issue(s)
Checklist
Deployment Notes
N/A