-
Notifications
You must be signed in to change notification settings - Fork 37k
Use remote authority names from product configuration #284942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the telemetry system to use remote authority names from product configuration (remoteExtensionTips and virtualWorkspaceExtensionTips) instead of a hardcoded list. This addresses issue #167156 by making the list of recognized remote names configurable through product.json.
Key Changes:
- Modified
cleanRemoteAuthorityto accept product configuration and check remote authority names dynamically againstremoteExtensionTipsandvirtualWorkspaceExtensionTips - Updated
resolveWorkbenchCommonPropertiesfunctions to acceptIProductServiceinstead of individual product properties - Added
remoteExtensionTipsandvirtualWorkspaceExtensionTipstoIExtensionHostInitDatafor extension host telemetry
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/telemetry/common/telemetryUtils.ts |
Refactored cleanRemoteAuthority to accept IProductRemoteConfig and check authority names against product configuration instead of hardcoded set |
src/vs/workbench/services/telemetry/common/workbenchCommonProperties.ts |
Updated function signature to accept IProductService and extract properties from it; passes product service to cleanRemoteAuthority |
src/vs/workbench/services/telemetry/browser/workbenchCommonProperties.ts |
Updated function signature to accept IProductService and extract properties from it; passes product service to cleanRemoteAuthority |
src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts |
Updated call to resolveWorkbenchCommonProperties to pass productService as first parameter |
src/vs/workbench/services/telemetry/browser/telemetryService.ts |
Updated call to resolveWorkbenchCommonProperties to pass productService and removed individual property parameters |
src/vs/workbench/services/extensions/common/extensionHostProtocol.ts |
Added remoteExtensionTips and virtualWorkspaceExtensionTips properties to IExtensionHostInitData |
src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts |
Added initialization of new remote tips properties from product service |
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts |
Added initialization of new remote tips properties from product service |
src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts |
Added initialization of new remote tips properties from product service |
src/vs/workbench/api/common/extHostTelemetry.ts |
Updated call to cleanRemoteAuthority to pass initData as product config |
src/vs/workbench/contrib/debug/common/debugger.ts |
Added IProductService injection and updated cleanRemoteAuthority call to pass product service |
src/vs/workbench/contrib/debug/test/node/debugger.test.ts |
Updated test constructor call to include additional undefined! parameter for new product service injection |
src/vs/workbench/services/telemetry/test/node/commonProperties.test.ts |
Updated test calls to pass undefined! for product service and removed unused local variables |
src/vs/workbench/services/telemetry/test/browser/commonProperties.test.ts |
Updated test calls to pass undefined! for product service and removed unused local variables |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fixes #167156
Used
IProductServiceto propagate remote authority config. Collapsed some parameters in places whereIProductServiceis being passed and added unit-tests.The hard-coded list was:
'ssh-remote', 'dev-container', 'attached-container', 'wsl', 'tunnel', 'codespaces', 'amlext'The new list (as per
product.json) would be:'ssh-remote', 'dev-container', 'attached-container', 'wsl', 'tunnel', 'codespaces', 'amlext', 'vscode-vfs'All of these but last one come from
remoteExtensionTipswithamlextadded in separate PR.vscode-vfscomes fromvirtualWorkspaceExtensionTips. This was added by Copilot and it seems relevant (it is forRemote Repositories, orms-vscode.remote-repositoriesextension). If this is incorrect, I can remove it.