Skip to content

Commit 3256157

Browse files
authored
chore: update code to 1.71.2 (#5580)
* chore: update code to 1.71.2 * chore: update telemetry patch It appears part of the fix has been implemented upstream. * refactor: drop safari-console patch This has been fixed upstream.
1 parent fdec34c commit 3256157

File tree

5 files changed

+5
-94
lines changed

5 files changed

+5
-94
lines changed

ci/build/build-vscode.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ main() {
7979
"newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter",
8080
"linkProtectionTrustedDomains": [
8181
"https://open-vsx.org"
82-
]
82+
],
83+
"aiConfig": {
84+
"ariaKey": "code-server"
85+
}
8386
}
8487
EOF
8588
) > product.json

patches/safari-console.diff

Lines changed: 0 additions & 13 deletions
This file was deleted.

patches/series

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ telemetry.diff
2020
display-language.diff
2121
cli-window-open.diff
2222
exec-argv.diff
23-
safari-console.diff

patches/telemetry.diff

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
Add support for telemetry endpoint
22

3-
Contains some fixes included in https://github.com/microsoft/vscode/commit/b108bc8294ce920fcf2ee8d53f97c3bcf3316e1c
4-
53
To test:
64
1. Look inside a build of code-server, inside `lib/vscode/vs/server/node/server.main.js`
75
2. Search for a `JSON.stringify` near `TelemetryClient`
@@ -89,82 +87,6 @@ Index: code-server/lib/vscode/src/vs/server/node/telemetryClient.ts
8987
+ } catch (error) {}
9088
+ }
9189
+}
92-
Index: code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
93-
===================================================================
94-
--- code-server.orig/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
95-
+++ code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
96-
@@ -15,7 +15,7 @@ import { ClassifiedEvent, IGDPRProperty,
97-
import { ITelemetryData, ITelemetryInfo, ITelemetryService, TelemetryLevel, TELEMETRY_SETTING_ID } from 'vs/platform/telemetry/common/telemetry';
98-
import { TelemetryLogAppender } from 'vs/platform/telemetry/common/telemetryLogAppender';
99-
import { ITelemetryServiceConfig, TelemetryService as BaseTelemetryService } from 'vs/platform/telemetry/common/telemetryService';
100-
-import { isInternalTelemetry, ITelemetryAppender, NullTelemetryService, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
101-
+import { getTelemetryLevel, isInternalTelemetry, ITelemetryAppender, NullTelemetryService, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
102-
import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
103-
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
104-
import { resolveWorkbenchCommonProperties } from 'vs/workbench/services/telemetry/browser/workbenchCommonProperties';
105-
@@ -24,7 +24,7 @@ export class TelemetryService extends Di
106-
107-
declare readonly _serviceBrand: undefined;
108-
109-
- private impl: ITelemetryService;
110-
+ private impl: ITelemetryService = NullTelemetryService;
111-
public readonly sendErrorTelemetry = true;
112-
113-
constructor(
114-
@@ -37,11 +37,7 @@ export class TelemetryService extends Di
115-
) {
116-
super();
117-
118-
- if (supportsTelemetry(productService, environmentService) && productService.aiConfig?.ariaKey) {
119-
- this.impl = this.initializeService(environmentService, loggerService, configurationService, storageService, productService, remoteAgentService);
120-
- } else {
121-
- this.impl = NullTelemetryService;
122-
- }
123-
+ this.impl = this.initializeService(environmentService, loggerService, configurationService, storageService, productService, remoteAgentService);
124-
125-
// When the level changes it could change from off to on and we want to make sure telemetry is properly intialized
126-
this._register(configurationService.onDidChangeConfiguration(e => {
127-
@@ -64,23 +60,28 @@ export class TelemetryService extends Di
128-
productService: IProductService,
129-
remoteAgentService: IRemoteAgentService
130-
) {
131-
- const telemetrySupported = supportsTelemetry(productService, environmentService) && productService.aiConfig?.ariaKey;
132-
- if (telemetrySupported && this.impl === NullTelemetryService && this.telemetryLevel.value !== TelemetryLevel.NONE) {
133-
+ const telemetrySupported = supportsTelemetry(productService, environmentService);
134-
+ if (telemetrySupported && getTelemetryLevel(configurationService) !== TelemetryLevel.NONE && this.impl === NullTelemetryService) {
135-
// If remote server is present send telemetry through that, else use the client side appender
136-
const appenders = [];
137-
const isInternal = isInternalTelemetry(productService, configurationService);
138-
- const telemetryProvider: ITelemetryAppender = remoteAgentService.getConnection() !== null ? { log: remoteAgentService.logTelemetry.bind(remoteAgentService), flush: remoteAgentService.flushTelemetry.bind(remoteAgentService) } : new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey);
139-
- appenders.push(telemetryProvider);
140-
- appenders.push(new TelemetryLogAppender(loggerService, environmentService));
141-
- const config: ITelemetryServiceConfig = {
142-
- appenders,
143-
- commonProperties: resolveWorkbenchCommonProperties(storageService, productService.commit, productService.version, isInternal, environmentService.remoteAuthority, productService.embedderIdentifier, productService.removeTelemetryMachineId, environmentService.options && environmentService.options.resolveCommonTelemetryProperties),
144-
- sendErrorTelemetry: this.sendErrorTelemetry,
145-
- };
146-
+ const telemetryProvider: ITelemetryAppender | undefined = remoteAgentService.getConnection() !== null ? { log: remoteAgentService.logTelemetry.bind(remoteAgentService), flush: remoteAgentService.flushTelemetry.bind(remoteAgentService) } : productService.aiConfig?.ariaKey ? new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey) : undefined;
147-
+ if (telemetryProvider) {
148-
+ appenders.push(telemetryProvider);
149-
+ appenders.push(new TelemetryLogAppender(loggerService, environmentService));
150-
+ const config: ITelemetryServiceConfig = {
151-
+ appenders,
152-
+ commonProperties: resolveWorkbenchCommonProperties(storageService, productService.commit, productService.version, isInternal, environmentService.remoteAuthority, productService.embedderIdentifier, productService.removeTelemetryMachineId, environmentService.options && environmentService.options.resolveCommonTelemetryProperties),
153-
+ sendErrorTelemetry: this.sendErrorTelemetry,
154-
+ };
155-
+
156-
+ return this._register(new BaseTelemetryService(config, configurationService, productService));
157-
+ } else {
158-
+ return this.impl;
159-
+ }
160-
161-
- return this._register(new BaseTelemetryService(config, configurationService, productService));
162-
}
163-
- return NullTelemetryService;
164-
+ return this.impl;
165-
}
166-
167-
setExperimentProperty(name: string, value: string): void {
16890
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
16991
===================================================================
17092
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts

0 commit comments

Comments
 (0)