Skip to content

feat: DH-20578: Groovy remote file source#273

Merged
bmingles merged 57 commits into
mainfrom
DH-20578_groovy-remote-file-source
Apr 29, 2026
Merged

feat: DH-20578: Groovy remote file source#273
bmingles merged 57 commits into
mainfrom
DH-20578_groovy-remote-file-source

Conversation

@bmingles

@bmingles bmingles commented Dec 16, 2025

Copy link
Copy Markdown
Collaborator

DH-20578: Adds Groovy support for remote file source features in VS Code extension. The supporting plugin work has not fully landed yet mostly waiting on tests, but I don't think that should block this PR:

Related Pending PRs
Changes for these are deployed to bmingles-remote-file-source2 BHS

Testing

  • Test on a grizzly or gplus server without the plugin installed. Verify that we can still run python and groovy scripts without remote file sourcing. This is just a regression test.
  • bmingles-remote-file-source2 has Groovy and Python remote plugins installed, so full feature set can be tested there

Setup

  • Start bmingles-remote-file-source2 vm if not already running
  • Clone this test repo git@github.com:bmingles/deephaven-controller-script-test
  • Checkout the local git branch (the main branch is configured as a controller source on bmingles-remote-file-source2).

Local override tests

  • Connect to bmingles-remote-file-source2 server in VS Code
  • Open and run src/main/groovy/docs-sample.groovy against the BHS
  • Should see STDOUT entries in OUTPUT -> Deephaven panel with "Server" prefix e.g.
    12:16:14.829 STDOUT Server: Notebook Level Var
    12:16:14.830 STDOUT Server: Notebook Level Var
    12:16:14.830 STDOUT Server: Top Level Var
    12:16:14.830 STDOUT Server: Top Level Var
    ...
    
  • Cells in the testTable should also include the "Server" prefix
  • Add src/main/groovy/test folder as a Groovy remote file source
  • Run the script again. Should see "Local" prefix e.g.
    12:21:12.336 STDOUT Local: Notebook Level Var
    12:21:12.336 STDOUT Local: Notebook Level Var
    12:21:12.337 STDOUT Local: Top Level Var
    12:21:12.337 STDOUT Local: Top Level Var
    ...
    
  • Cells in the testTable should also include the "Local" prefix
  • Remove the src/main/groovy/test as a remote file source
  • Run the script again. STDOUT and table cells should all go back to the "Server" prefixes

Tree Selection Behavior

There was a bug fixed in this PR that impacts how partial unmarking works in the Remote file source tree view.

  • Navigate to Deephaven activity bar tab (left sidebar)
  • Expand Groovy workspace tree until you get to src/main/groovy/nested/ws1
  • Add ws1 folder as remote source with the + button
  • Should see ws1 and all of its children turn green
  • Hover over ws1/sub1 subfolder and click the - sign to remove it
  • Result should be that ws1/sub2 is now the marked folder. ws1/sub1 and ws1/file1.groovy should both be unmarked

@github-actions

github-actions Bot commented Dec 16, 2025

Copy link
Copy Markdown

No docs changes detected for 6d1d2f9

@bmingles bmingles force-pushed the DH-20578_groovy-remote-file-source branch from ac0c50b to e92d180 Compare December 23, 2025 23:01
@bmingles bmingles force-pushed the DH-20578_groovy-remote-file-source branch from d2eaefd to 093ca1f Compare January 5, 2026 21:40
@bmingles bmingles force-pushed the DH-20578_groovy-remote-file-source branch from 4d810c2 to 5eab919 Compare January 14, 2026 19:21
@bmingles bmingles force-pushed the DH-20578_groovy-remote-file-source branch from 7b8e4ea to 9778ba0 Compare February 20, 2026 18:29
@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown

End-to-end Test Summary

Tests 📝Passed ✅Failed ❌Skipped ⏭️Pending ⏳Other ❓Flaky 🍂Duration ⏱️
312000000:03:03
A ctrf plugin

Failed Test Summary

NameStatusFailure Message
Panels Tests "before all" hook for "should open panels"failed ❌Error Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/vscode-deephaven/vscode-deephaven/e2e-testing/out/specs/panels.spec.js)
Status Bar Tests should connect to server on clickfailed ❌Error Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/vscode-deephaven/vscode-deephaven/e2e-testing/out/specs/statusBar.spec.js)
A ctrf plugin

@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown

Unit Test Summary

Tests 📝Passed ✅Failed ❌Skipped ⏭️Pending ⏳Other ❓Flaky 🍂Duration ⏱️
7407400000000:00:00
A ctrf plugin

Failed Test Summary

No failed tests ✨

@bmingles bmingles force-pushed the DH-20578_groovy-remote-file-source branch 2 times, most recently from 331321e to 69164eb Compare March 3, 2026 16:45
@bmingles bmingles force-pushed the DH-20578_groovy-remote-file-source branch 3 times, most recently from 22f7c02 to 94eb4ff Compare March 18, 2026 19:33
@bmingles bmingles force-pushed the DH-20578_groovy-remote-file-source branch from 94eb4ff to 7971923 Compare April 6, 2026 22:00
bmingles added 16 commits April 7, 2026 17:11
…rse Groovy import errors. Currently only Python errors are parsed in parseServerError(). Need to add new function that parses Groovy RuntimeExceptions with pattern 'Attempting to import a path that does not exist: import X;'. Example input: 'RuntimeException: Attempting to import a path that does not exist: import package3.subpackage1.MultiClassTest;'. Function should extract import path and return ParsedError object similar to Python version.

Added parseGroovyServerError function to errorUtils.ts that parses Groovy RuntimeException import errors, returning ParsedError with type, value, and importPath fields. Added 3 unit tests covering successful parse, unrecognized format, and empty string cases. (#DH-20578)
…nsionController. Currently only _pythonDiagnostics exists at line 230. Add _groovyDiagnostics property, initialize it in initializeDiagnostics() method (line 474) with vscode.languages.createDiagnosticCollection('groovy'), add listener to clear diagnostics on save for .groovy files, and pass to DhcService and MCP controller constructors.

Added _groovyDiagnostics property to ExtensionController, initialized with createDiagnosticCollection('groovy') in initializeDiagnostics(), added save listener to clear groovy diagnostics for .groovy files, passed to DhcService.factory and McpController constructor. Also updated DhcService.factory signature and McpController constructor to accept the new parameter. (#DH-20578)
@bmingles bmingles marked this pull request as ready for review April 17, 2026 17:32
@bmingles bmingles requested a review from mofojed April 17, 2026 17:32
@mofojed mofojed requested a review from Copilot April 20, 2026 18:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Groovy support for “remote file source” behavior across the extension (tree view, session/plugin wiring, error parsing/diagnostics, and MCP tools), while keeping Python behavior intact and more explicitly typed.

Changes:

  • Introduces Groovy remote file source service integration (execution context + source request handling) alongside existing Python integration.
  • Expands the Remote Import Source tree to group workspace content by language and updates context commands/icons accordingly.
  • Updates MCP tooling and error hinting to support Groovy and language-specific remote source operations.

Reviewed changes

Copilot reviewed 34 out of 37 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/util/remoteFileSourceUtils.ts Adds Groovy helpers/tree items + Groovy plugin request listener; refactors Python naming.
src/util/remoteFileSourceUtils.spec.ts Updates/extends unit tests for new tree items and module/package helpers.
src/util/remoteFileSourceMsgUtils.ts Renames module fullname type to Python-specific type.
src/util/remoteFileSourceMsgUtils.spec.ts Updates tests for renamed Python module fullname type.
src/util/snapshots/remoteFileSourceUtils.spec.ts.snap Snapshot updates for new/changed tree item outputs.
src/types/serviceTypes.d.ts Extends service interface with Groovy/Python remote plugin presence checks.
src/types/remoteImportSourceTreeTypes.ts Adds language root element + languageId fields on tree node types.
src/types/remoteFileSourceTypes.ts Introduces Groovy resource/package types and PythonModuleFullname rename.
src/services/RemoteFileSourceService.ts Splits Groovy vs Python plugin registration/execution context responsibilities.
src/services/FilteredWorkspace.ts Generalizes workspace filtering/marking for Groovy + Python; adds marked-relative path export + change handling.
src/services/FilteredWorkspace.spec.ts Extends marking/unmarking tests and adds suppress-notify scenarios.
src/services/DhcService.ts Wires Groovy plugin service + Groovy diagnostics; uses language-specific error parsers and plugin checks.
src/providers/RemoteImportSourceTreeProvider.ts Adds Groovy workspace support and language grouping in the tree provider.
src/mcp/utils/runCodeUtils.ts Adds Groovy import error hinting + improves Python hinting with raw error parsing fallback.
src/mcp/utils/runCodeUtils.spec.ts Adds/updates tests for new mock workspace model + Groovy/Python hint behavior.
src/mcp/tools/runCodeFromUri.ts Adds Groovy diagnostics/workspace inputs; produces Groovy hints and raw-error fallback.
src/mcp/tools/runCodeFromUri.spec.ts Adds Groovy execution scenarios and “no diagnostics” fallback cases.
src/mcp/tools/removeRemoteFileSources.ts Requires/validates languageId and routes to language-specific removal.
src/mcp/tools/removeRemoteFileSources.spec.ts Updates tests for languageId-aware removal.
src/mcp/tools/listRemoteFileSources.ts Adds optional languageId filtering and aggregates Groovy+Python sources.
src/mcp/tools/listRemoteFileSources.spec.ts Updates tests for per-language listing and combined listing behavior.
src/mcp/tools/addRemoteFileSources.ts Requires/validates languageId and routes to language-specific add.
src/mcp/tools/addRemoteFileSources.spec.ts Updates tests for languageId-aware add.
src/mcp/McpServer.ts Passes Groovy diagnostics/workspace into MCP server.
src/dh/modules.d.ts Temporarily augments jsapi-types with RemoteFileSourceService + request event types.
src/dh/errorUtils.ts Splits Python error parsing name and adds Groovy import error parsing.
src/dh/errorUtils.spec.ts Adds Groovy parse tests and renames Python parse tests accordingly.
src/dh/dhc.ts Session init now acquires Groovy RemoteFileSourceService when available; keeps Python widget acquisition.
src/dh/snapshots/errorUtils.spec.ts.snap Snapshot updates for renamed Python parser tests.
src/controllers/McpController.ts Wires Groovy diagnostics/workspace into MCP controller.
src/controllers/ExtensionController.ts Creates Groovy FilteredWorkspace + diagnostics; registers language-specific remote source commands; adds reveal-in-explorer command.
src/common/constants.ts Adds icon IDs for Groovy/Python.
src/common/commands.ts Adds language-specific remote source command IDs and dispatches execAdd/execRemove by language.
skills/deephaven-vscode-using/SKILL.md Updates skill docs with remote file source guidance and hint usage.
package.json Adds language-specific remote source commands/menu contributions and “Reveal in Explorer” action.
mocks/vscode.ts Improves EventEmitter mock and adds FS watcher onDidChange mock support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/services/FilteredWorkspace.ts Outdated
Comment thread src/services/FilteredWorkspace.ts Outdated
Comment thread src/services/FilteredWorkspace.ts Outdated
Comment thread src/util/remoteFileSourceUtils.ts
Comment thread src/util/remoteFileSourceUtils.ts
Comment thread src/mcp/tools/listRemoteFileSources.ts Outdated
Comment thread src/mcp/tools/listRemoteFileSources.ts Outdated
Comment thread src/common/commands.ts Outdated

@mofojed mofojed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Find/replace supress => suppress

No other real comments, seems fine

Comment thread src/common/constants.ts
Comment thread src/controllers/ExtensionController.ts Outdated
Comment thread src/controllers/ExtensionController.ts Outdated
Comment thread src/services/FilteredWorkspace.ts Outdated
Co-authored-by: Copilot <copilot@github.com> (#DH-20578)
@bmingles bmingles requested a review from mofojed April 23, 2026 21:16
@bmingles

Copy link
Copy Markdown
Collaborator Author

@mofojed I addressed yours and Copilot's review comments

@bmingles

Copy link
Copy Markdown
Collaborator Author

@mofojed FYI, failing e2e tests appear to be an issue on :edge Docker container. Not specific to this branch / PR. I've filed https://deephaven.atlassian.net/browse/DH-22416 to address separately.

@bmingles bmingles merged commit d50e8b3 into main Apr 29, 2026
5 of 6 checks passed
@bmingles bmingles deleted the DH-20578_groovy-remote-file-source branch April 29, 2026 19:46
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.

4 participants