Skip to content

feat(runtime): Implement streaming execution output (fixes #1813)#1814

Open
tinodj wants to merge 1 commit intodatabricks:mainfrom
tinodj:feature/streaming-execution-output
Open

feat(runtime): Implement streaming execution output (fixes #1813)#1814
tinodj wants to merge 1 commit intodatabricks:mainfrom
tinodj:feature/streaming-execution-output

Conversation

@tinodj
Copy link

@tinodj tinodj commented Dec 3, 2025

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:

  1. Introducing an onStatusUpdate callback: This function is now passed to the executionContext.execute
    method.
  2. Handling Streaming Data: The callback processes output in chunks as they are generated by the remote process
  3. Tracking Output Position: A new outputPosition variable tracks the portion of the stream that has already
    been 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:

  1. Run a long-running command (e.g., a Python script with multiple print statements separated by time.sleep
    calls).
  2. Confirm that the output appears in the VS Code output panel in real-time as it is generated, rather than all at
    once at the end.

…#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.
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 1814
  • Commit SHA: f759bdd4e24467eb1e7a86a4cb9477898be47d3a

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Real-time output missing when using “Upload and Run File” from VS Code

1 participant