-
Notifications
You must be signed in to change notification settings - Fork 892
fix: specific handling for lazy requests #7698
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This comment was marked as duplicate.
This comment was marked as duplicate.
frontend/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx
Show resolved
Hide resolved
This comment was marked as duplicate.
This comment was marked as duplicate.
2 similar comments
This comment was marked as duplicate.
This comment was marked as duplicate.
|
Breaking changes detected in the OpenAPI specification! ==========================================================================
|
|
@dmadisetti, thanks fixed |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.18.5-dev149 |
manzt
left a comment
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.
Sorry for the post-merge review. Nice implementation, just a couple clarifying comments.
| // Start connection and wait for it to be open | ||
| await initOnce(runtimeManager); | ||
| await waitForConnectionOpen(); | ||
| if (key !== "sendInstantiate") { |
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.
Maybe worth adding a comment explaining why sendInstantiate is exempt (it's the one that creates the instantiation?)
|
|
||
| switch (action) { | ||
| case "dropRequest": | ||
| // Silently drop the request |
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.
Maybe consider logging?
| // We have various requests that act different when called and not connected to a Kernel. They are: | ||
| // - throw an Error | ||
| // - drop the request | ||
| // - start the connection | ||
| // - wait for the connection to be open |
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.
| // We have various requests that act different when called and not connected to a Kernel. They are: | |
| // - throw an Error | |
| // - drop the request | |
| // - start the connection | |
| // - wait for the connection to be open | |
| // We have various requests that act differently when called and not connected to a Kernel: | |
| // | |
| // - throwError: Throws NoKernelConnectedError, caught by requests-toasting.tsx | |
| // and shown as a toast with a "Connect" button. Use for operations that | |
| // shouldn't silently fail but also shouldn't auto-start the kernel. | |
| // | |
| // - dropRequest: Silently returns undefined. Only for requests where failure is | |
| // expected and doesn't matter (e.g., background polling). | |
| // | |
| // - startConnection: Initializes the runtime and waits for connection before | |
| // executing. Use for user-initiated actions that should "just work" and | |
| // kick off the kernel if needed (e.g., clicking Run). | |
| // | |
| // - waitForConnectionOpen: Waits for an existing connection but won't start one. | |
| // Use for operations that depend on a running kernel but shouldn't be the | |
| // trigger to start it (e.g., saving, interrupting). |
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.
thanks, great comments, followed up with all them here: #7710

Each request now will either:
"throwError" | "dropRequest" | "startConnection" | "waitForConnectionOpen". This is a bit cumbersome to manage but i think getting it right will have a good UX. For example, we can let the user type and make edits, but not start the kernel. Once the user hits "run", then we can actually start the kernel.