feat(runtime): Implement streaming execution output (fixes #1813)#1814
Open
tinodj wants to merge 1 commit intodatabricks:mainfrom
Open
feat(runtime): Implement streaming execution output (fixes #1813)#1814tinodj wants to merge 1 commit intodatabricks:mainfrom
tinodj wants to merge 1 commit intodatabricks:mainfrom
Conversation
…#1813) Problem: Previously, the output of commands executed via was only displayed after the entire process had finished. This provided a poor user experience for long-running commands, as there was no real-time feedback on the command's progress. Solution: This commit refactors the execution logic to handle output as a stream. An callback function has been introduced and is now passed to . This callback receives output in chunks during execution, tracks the current position in the stream via the new variable, and dispatches new output to the UI immediately. This provides users with real-time feedback from their commands.
Contributor
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1813.
Description
This pull request addresses the lack of real-time feedback during command execution in the
DatabricksRuntime.Problem
Previously, the output of executed commands was buffered and only displayed after the entire process had completed.
For long-running tasks, this left the user without any visibility into the command's progress, making it difficult t
determine if the process was still running or had stalled.
Solution
This PR refactors the execution logic to process output as a stream. This is achieved by:
onStatusUpdatecallback: This function is now passed to theexecutionContext.executemethod.
outputPositionvariable tracks the portion of the stream that has alreadybeen sent to the UI, ensuring that only new output is displayed.
This change provides users with immediate, real-time feedback from their running commands, significantly improving t
user experience.
Testing Notes
This feature has not yet been covered by automated tests. Manual verification is required.
To Test:
printstatements separated bytime.sleepcalls).
once at the end.