Skip to content

[debug-certificate-manager] Default sync to the workspace home store - #6217

Open
Ian Clanton-Thuon (iclanton) wants to merge 1 commit into
microsoft:mainfrom
iclanton:fix/certificate-sync-default-store
Open

Ian Clanton-Thuon (iclanton) wants to merge 1 commit into
microsoft:mainfrom
iclanton:fix/certificate-sync-default-store

Conversation

@iclanton

Copy link
Copy Markdown
Member

Summary

Fix Ensure and Sync TLS Certificates aborting when .vscode/debug-certificate-manager.json is absent, including Remote SSH workspaces. Missing configuration now uses ~/.rushstack and the standard RushStack certificate filenames, matching the certificate store defaults.

Details

  • Resolve the default destination using the existing workspace home-directory logic; remote workspaces do not use the local UI host home directory.
  • Fall back only for VS Code FileNotFound errors. Other read errors and invalid JSON abort synchronization and show an error notification.
  • Decode workspace.fs.readFile() results as UTF-8 instead of assuming they are Node Buffers.
  • Create the destination directory before writing certificates.
  • Keep existing configured destinations and filenames unchanged. Since auto-sync is already enabled by default, workspaces without a config now sync on activation rather than logging a missing-file error.
  • Document the defaults and the workaround for older extension versions.

How it was tested

  • rush test --only debug-certificate-manager --parallelism 4: build/lint and all 8 command-level Jest tests pass on this isolated branch.
  • Regression tests cover missing configuration, configured and terminal-resolved remote home directories, plain Uint8Array decoding, custom relative/absolute destinations and filenames, read/parse errors, and directory creation failures.
  • Reversibly restored the original implementation: all 8 tests failed. Restored the fix and reran successfully.
  • Rebuilt the VSIX and verified archive integrity and that it contains the patched implementation.
  • rush change --verify --target-branch microsoft/main passes.
  • Attempted the full-repo build; it is blocked by an unrelated missing local-node-rig/package.json dependency in build-tests-subspace/rush-lib-test.
  • No live VS Code Remote SSH end-to-end test performed; VS Code APIs are mocked in the command tests.

Allow certificate synchronization without a workspace configuration by using ~/.rushstack in the workspace home directory. Preserve configured destinations and surface genuine read or parse failures instead of silently aborting.

Decode workspace filesystem bytes as UTF-8 and create the destination directory before writing certificates. Add command-level regression tests and document the defaults and older-version workaround.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

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

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant