Skip to content

fix(vscode): auto-enable multi-language worker for JDBC connector - #9535

Merged
Andrew Eldridge (andrew-eldridge) merged 8 commits into
mainfrom
aeldridge/ccastrotrejo-microsoft-investigate-issue-8597-patch
Aug 13, 2026
Merged

fix(vscode): auto-enable multi-language worker for JDBC connector#9535
Andrew Eldridge (andrew-eldridge) merged 8 commits into
mainfrom
aeldridge/ccastrotrejo-microsoft-investigate-issue-8597-patch

Conversation

@andrew-eldridge

@andrew-eldridge Andrew Eldridge (andrew-eldridge) commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Fixes #8597. Using the JDBC built-in connector in a local Standard Logic App failed with "JDBC client library is missing" even when the driver JAR (for example, ojdbc8.jar) was correctly placed in lib/builtinOperationSdks/JAR.

The JDBC connector is a Java built-in operation that only runs when the Functions multi-language Java worker is enabled via the app setting AzureWebJobsFeatureFlags=EnableMultiLanguageWorker. The extension only wrote that flag for customCode, rulesEngine, and codeful project types, so a plain codeless Logic App never got it and the Java worker never started locally. This is why it works in the Portal/Kudu, where the runtime is already provisioned, but not in VS Code.

This change makes the tooling self-heal the prerequisite instead of requiring users to discover it by trial and error:

  • Auto-enable the worker: on design-time startup, when driver JARs are detected in lib/builtinOperationSdks/JAR, EnableMultiLanguageWorker is merged into local.settings.json. The merge preserves existing flags and is idempotent, so it does not clobber user values.
  • JDK guidance: the JDBC connector also needs a locally installed JDK. When driver JARs are present but no Java runtime is found on PATH, a non-blocking warning with a "Learn more" link to the connector docs is shown, so the prerequisite is clear up front.

The JAR-detection, flag-merge, and Java-runtime checks live in app/utils/java/jdbcConnector.ts so they are easy to test and reuse. createLibFolder was also updated to reuse the new folder-name constants with no behavior change.

Impact of Change

  • Users: Local JDBC connections now work after dropping the driver JAR into lib/builtinOperationSdks/JAR and reopening the designer, with clear guidance when a JDK is missing. No manual local.settings.json edit is required.
  • Developers: Adds app/utils/java/jdbcConnector.ts helpers (hasJdbcDriverJars, mergeMultiLanguageWorkerFlag, isJavaRuntimeInstalled, warnIfJdbcJavaRuntimeMissing) and new builtinOperationSdksFolderName, jarFolderName, and jdbcConnectorDocsUrl constants.
  • System: The multi-language worker is only enabled when driver JARs are present, so projects that never use Java are unaffected. Because this ships in the VS Code extension and can update local runtime settings, the PR is classified as Medium risk.

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: pnpm run test:extension-unit (jdbcConnector 19 tests, validateProjectArtifacts 56 tests including 4 new tests, CreateLogicAppWorkspace 83 tests) all passing; E2E integration suite type-checks via tsc -p tsconfig.e2e.json; Biome clean; changed files type-check clean.

New coverage:

  • app/utils/java/__test__/jdbcConnector.test.ts - JAR detection (casing, empty folder, non-JAR files, missing folder), flag merge (empty, idempotent, preserve, dedupe, whitespace), Java runtime check, and warning flow.
  • validateProjectArtifacts.test.ts - self-heal branches (add, merge without clobbering, idempotent, no-op when no JARs).
  • test/e2e/integration/jdbcConnectorPrerequisites.test.ts - real on-disk contract for the self-heal.

Contributors

Root cause and prerequisites corroborated by community findings on the issue thread (Matt Milner (@mnmilner)).

Screenshots/Videos

N/A - no visual UI changes.

Closes #8597

)

The JDBC built-in connector runs on the Functions multi-language (Java)
worker, gated by AzureWebJobsFeatureFlags=EnableMultiLanguageWorker. A
plain codeless Logic App never received that flag, so a driver JAR placed
in lib/builtinOperationSdks/JAR was never loaded locally and connections
failed with "JDBC client library is missing".

- Self-heal on design-time startup: when driver JAR(s) exist, merge
  EnableMultiLanguageWorker into local.settings.json (preserving any
  existing flags) in regenerateLocalSettings.
- Warn (non-blocking, with docs link) when JDBC JARs are present but no
  local Java runtime (JDK) is found.
- Add jdbcConnector util (JAR detection, flag merge, Java runtime check).
- Unit + integration tests for all branches and edge cases.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 72cac36b-47ce-4d10-a368-b71fddfca967
…t-investigate-issue-8597

# Conflicts:
#	apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateLogicAppWorkspace.ts
#	apps/vs-code-designer/src/app/projectConsistency/__test__/projectFilesConsistency.test.ts
#	apps/vs-code-designer/src/app/projectConsistency/projectFilesConsistency.ts
#	apps/vs-code-designer/src/app/utils/codeless/startDesignTimeApi.ts
The merge commit's pre-commit lint-staged hook applied eslint/biome
auto-fixes (consistent-type-imports, trailing-whitespace strips, line
reflows) to files pulled in from origin/main, adding churn unrelated to
the JDBC fix. Restore those files to their exact origin/main content and
re-apply only the JDBC self-heal to projectFilesConsistency so this PR's
diff is limited to the JDBC connector change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 72cac36b-47ce-4d10-a368-b71fddfca967
…ngs generator

Addresses PR review feedback: generateLocalSettingsJson is the single
source of truth for local.settings.json content, so it now owns whether
EnableMultiLanguageWorker belongs in the baseline via an optional
hasJdbcDriverJars signal.

The async disk probe stays in ensureLocalSettingsFile so the generator
remains synchronous (avoiding a breaking change for all other callers),
and the repair path keeps merging with existing user-defined flags so
custom values are never clobbered.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 72cac36b-47ce-4d10-a368-b71fddfca967
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: fix(vscode): auto-enable multi-language worker for JDBC connector
  • Issue: None — valid fix: prefix with scope, and clearly descriptive of the behavior change.
  • Recommendation: No change needed.

Commit Type

  • Exactly one type selected: fix - Bug fix.
  • Matches the diff, which repairs the missing EnableMultiLanguageWorker flag for JDBC — a genuine bug fix.

Risk Level

  • Medium selected in the body and the risk:medium label is present — both agree. This matches the advised estimate: the change ships in the VS Code extension (apps/vs-code-designer) and mutates local runtime settings (local.settings.json), which is squarely Medium per the rubric. No security/auth or shared-logic-apps-shared impact that would raise it to High.

What & Why

  • Current: Clear root-cause explanation (Java worker only enabled for customCode/rulesEngine/codeful; plain codeless never got the flag) plus the self-heal approach.
  • Issue: None.
  • Recommendation: No change needed.

Impact of Change

  • All three audiences addressed (Users, Developers, System) with concrete detail including new helpers and constants.
  • Recommendation:
    • Users: Well covered — local JDBC works after dropping the JAR; JDK guidance shown.
    • Developers: Well covered — new jdbcConnector.ts helpers and constants listed.
    • System: Well covered — worker only enabled when JARs present.

Test Plan

  • Unit tests added/updated (jdbcConnector.test.ts, projectFilesConsistency.test.ts, localSettings.test.ts) and E2E tests added (jdbcConnectorPrerequisites.test.ts), all confirmed in the diff. Passes the CHECK TESTS rule comfortably.

⚠️ Contributors


Screenshots/Videos

  • Diff touches only apps/vs-code-designer (backend/tooling logic, no designer-ui/designer/vs-code-react UI components). No visual change, so screenshots are not required. N/A is appropriate.

Summary Table

Section Status Recommendation
Title No change needed
Commit Type No change needed
Risk Level Medium is correct (extension + local settings)
What & Why No change needed
Impact of Change No change needed
Test Plan No change needed
Contributors ⚠️ Optional — already credited
Screenshots/Videos N/A is appropriate

All required checks pass. This PR is compliant with the team template and is cleared to merge. Nice work on the thorough root-cause writeup and test coverage.


Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Thu, 13 Aug 2026 19:31:30 GMT

@andrew-eldridge Andrew Eldridge (andrew-eldridge) added VSCode Issues or PRs specific to VS Code extension risk:medium Medium risk change with potential impact and removed needs-pr-update labels Aug 13, 2026
@andrew-eldridge Andrew Eldridge (andrew-eldridge) changed the title Aeldridge/ccastrotrejo microsoft investigate issue 8597 patch fix(vscode): auto-enable multi-language worker for JDBC connector Aug 13, 2026
…astrotrejo-microsoft-investigate-issue-8597-patch
@andrew-eldridge
Andrew Eldridge (andrew-eldridge) marked this pull request as ready for review August 13, 2026 16:45
Copilot AI balanced review requested due to automatic review settings August 13, 2026 16:45
@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Check

🎉 All changed files have adequate test coverage!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes local JDBC connector startup by enabling the Java worker when driver JARs are detected and warning when Java is unavailable.

Changes:

  • Detects JDBC drivers and merges the multi-language worker flag.
  • Adds Java prerequisite guidance.
  • Adds unit and integration coverage.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
jdbcConnectorPrerequisites.test.ts Adds filesystem integration tests.
constants.ts Adds JDBC paths and documentation URL.
jdbcConnector.ts Adds JAR and Java detection.
jdbcConnector.test.ts Tests JDBC utilities and warning flow.
startDesignTimeApi.ts Runs the Java prerequisite check.
projectFilesConsistency.ts Repairs feature flags when JDBC drivers exist.
localSettings.ts Generates JDBC-aware settings.
localSettings.test.ts Tests JDBC-aware generation.
projectFilesConsistency.test.ts Tests settings self-healing.
CreateLogicAppWorkspace.ts Reuses folder constants.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread apps/vs-code-designer/src/app/utils/java/jdbcConnector.ts
Comment thread apps/vs-code-designer/src/test/e2e/integration/jdbcConnectorPrerequisites.test.ts Outdated
@andrew-eldridge
Andrew Eldridge (andrew-eldridge) merged commit 449cee3 into main Aug 13, 2026
43 checks passed
@andrew-eldridge
Andrew Eldridge (andrew-eldridge) deleted the aeldridge/ccastrotrejo-microsoft-investigate-issue-8597-patch branch August 13, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:medium Medium risk change with potential impact VSCode Issues or PRs specific to VS Code extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use JDBC built-in connector within VS COde

3 participants