-
Notifications
You must be signed in to change notification settings - Fork 14
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
Can we run everything on the same port? #584
Comments
cc @cowboyd |
It seems like a sound idea. I have two thoughts that occur:
However, there's no reason we couldn't have a general mechanism that allowed plugins to allocate an entire origin, and then allocate urls within that origin. If everybody was configuring themselves over this central registry of origins and urls, then moving services around, splitting them or consolidating them can at least be straightforward. Bigtest can handle port allocation and configuration and your extension code never needs to worry about things like url discovery.... I like this idea of having something like a rails router, except including the origin too! |
That's a good point, plugins will need to be able to load custom mappings somehow. As for routing, we currently handle this through express, and it doesn't feel like we need to reinvent the wheel here. I just hit another reason to do this: if an error occurs in the test files, its details won't be reported to the uncaught error event, it will just show up as "script error", since errors from other origins cannot be "seen" in a global error handler for security reasons. As far as I can see, the only way of solving this is to move the manifest onto the same origin. |
I think moving the manifest onto the same origin really makes sense since it feels like we're learning that manifest bundling highly coupled to platform, and eventually might be completely under the responsibility of the agent or driver. For example, there is absolutely no need to concatenate down to a single bundle file for the node driver, and certainly no need to start a server to serve that single asset. That's behavior particular only to web agents. |
One thing that I've been thinking about: BigTest currently uses 4 or 5 different ports:
I am sure we do not really need to run the first three on different ports, and I'm pretty sure we can even map the manifest server to the same port. The app server needs to be running on a different port obviously.
The way this would work is basically through routing like this:
__bigtest/api
=> command server/GraphQL API__bigtest/connection
=> WS connection for agent__bigtest/manifest
=> serve generated manifest, this is a bit tricky since we need to prefix the paths in the generated bundle__bigtest/agent
=> serve static agent from agent package*
=> any other path goes to the proxy serverThis way BigTest itself would only occupy one single port with possibly an additional port for the app server.
The text was updated successfully, but these errors were encountered: