-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Frontend development: redirect instead of proxy #19177
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
9317b88
to
9a8ba4d
Compare
This removes the "proxy needs network access to upstream" constraint, by relying on the developers browser
9a8ba4d
to
c74bcb3
Compare
We could make it open with another port and mark this port as public in |
And make developer role granting as a leeway script |
@mustard-mh @selfcontained Now also with the relevant commit... 😑 |
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.
Works like a charm!!
[nit not blocking] will it be better if we put document inside README.md?
/unhold |
Description
This allows you to overlay the Dashboard with any other version, as long as you can reach the source from your browser.
Steps
Just like before, do:
Get a workspace with your modified version of dashboard
yarn start-local
On the Gitpod installation you want to change the dashboard on
In this preview:
leeway run components:make-user-admin
(or as me to do it for you)a. go to /admin/users and grant yourself the "developer" role
gp url 3000
, and use that value to stick it into the "header editor" of your choice, so it matches this previewYou should now be able to change the dashboard on the fly, incl. hot-reload. 🎉
Thank you @selfcontained for the idea and help with webpack!
Summary generated by Copilot
🤖[deprecated] Generated by Copilot at 9317b88
Refactored the proxy plugin for frontend development with hot reloading and live reloading. Renamed the package and module from
workspacedownload
tofrontend_dev
and added unit tests for the index.html rewriting logic. Modified the filesfrontend_dev.go
,frontend_dev_test.go
, andgo.mod
.Related Issue(s)
Fixes #
How to test
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold