-
Notifications
You must be signed in to change notification settings - Fork 707
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
Support for large code #386
Conversation
Running code in the debugger is now a two step process:
I've tried this locally and it works beautifully. Based on how I've configured express, I've been able to run with code that is up to 1mb compressed. This is handle basically any code that we could want to run. A couple things to note.
|
ab4b30f
to
5ed2001
Compare
The only issue I can see with this, since it's not a two-step process, is that load-balancing across a fleet of instances might get trickier. Since it is a UI, I suppose it's possible to use cookies or something similar with nginx to do sticky load-balancing. |
That is a valid concern. You have a couple calls at the moment that are similar, right? Feels like the same issue could be said about /workspace and /sessions. I’m open to any other ideas you have to solve this issue. |
Good point! There are a few stateful things like sessions and workspace that have the same issue. In that case I think having a two step process is our only option. Could we (instead of using cookies, which was the only way I was able to do this in one call) use a more idiomatic JSON API for sending in the code to debug? IE: POST /debugger Does that sound cool with you? |
@joelgriffith QQ: If maxConcurrentSessions is set to 0 does the app fail to start? |
I don’t think so... I believe it just queues work but will never start it from what I recall of the libraries internals. |
I also don’t mind pushing this over the finish line since you’ve done a lot of work on this repo. Would also love to hear your thoughts on what could help future contributors |
@joelgriffith I'm fine with a POST to /debugger. It would remove one endpoint, but the workflow would be basically the same. |
@joelgriffith Just to be clear, you are thinking we should accept a POST to /debugger to cache the code (rather than the /cache I added) and then use it on the execute? |
Only expose the /cache endpoint if the debugger is enabled
Delete from code cache after retrieval Set code cache ttl to connectionTimeout
f8fc6bb
to
d7863ad
Compare
@joelgriffith Am I correct about your thinking? |
Going to close this out as this will be fixed in a coming refactor |
Fix for #360