Skip to content

Commit 6760a03

Browse files
authored
Add vscode docker test (microsoft#32152)
* Add vscode docker test * Remove PID-log line * Update user baselines (bloomberg#18)
1 parent 2af8ac7 commit 6760a03

File tree

6 files changed

+77
-89
lines changed

6 files changed

+77
-89
lines changed

src/testRunner/externalCompileRunner.ts

+24-5
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,15 @@ ${sanitizeDockerfileOutput(result.stderr.toString())}`;
157157
}
158158

159159
function sanitizeDockerfileOutput(result: string): string {
160-
return stripAbsoluteImportPaths(sanitizeTimestamps(sanitizeVersionSpecifiers(stripRushStageNumbers(stripANSIEscapes(normalizeNewlines(result))))));
160+
return [
161+
normalizeNewlines,
162+
stripANSIEscapes,
163+
stripRushStageNumbers,
164+
sanitizeVersionSpecifiers,
165+
sanitizeTimestamps,
166+
sanitizeUnimportantGulpOutput,
167+
stripAbsoluteImportPaths,
168+
].reduce((result, f) => f(result), result);
161169
}
162170

163171
function normalizeNewlines(result: string): string {
@@ -172,17 +180,28 @@ function stripRushStageNumbers(result: string): string {
172180
return result.replace(/\d+ of \d+:/g, "XX of XX:");
173181
}
174182

183+
/**
184+
* Gulp's output order within a `parallel` block is nondeterministic (and there's no way to configure it to execute in series),
185+
* so we purge as much of the gulp output as we can
186+
*/
187+
function sanitizeUnimportantGulpOutput(result: string): string {
188+
return result.replace(/^.*(\] (Starting)|(Finished)).*$/gm, "") // task start/end messages (nondeterministic order)
189+
.replace(/^.*\] Respawned to PID: \d+.*$/gm, "") // PID of child is OS and system-load dependent (likely stableish in a container but still dangerous)
190+
.replace(/\n+/g, "\n");
191+
}
192+
175193
function sanitizeTimestamps(result: string): string {
176194
return result.replace(/\[\d?\d:\d\d:\d\d (A|P)M\]/g, "[XX:XX:XX XM]")
177-
.replace(/\d+(\.\d+)? seconds?/g, "? seconds")
178-
.replace(/\d+(\.\d+)? minutes?/g, "")
179-
.replace(/\d+(\.\d+)?s/g, "?s");
195+
.replace(/\[\d?\d:\d\d:\d\d\]/g, "[XX:XX:XX]")
196+
.replace(/\d+(\.\d+)? sec(onds?)?/g, "? seconds")
197+
.replace(/\d+(\.\d+)? min(utes?)?/g, "")
198+
.replace(/\d+(\.\d+)?( m)?s/g, "?s");
180199
}
181200

182201
function sanitizeVersionSpecifiers(result: string): string {
183202
return result
184203
.replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx")
185-
.replace(/@\d+\.\d+\.\d+/g, "@X.X.X");
204+
.replace(/([@v])\d+\.\d+\.\d+/g, "$1X.X.X");
186205
}
187206

188207
/**

tests/baselines/reference/docker/azure-sdk.log

-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
Exit Code: 1
22
Standard output:
33

4-
54
Rush Multi-Project Build Tool 5.7.3 - https://rushjs.io
6-
7-
85
Starting "rush rebuild"
9-
106
Executing a maximum of 1 simultaneous processes...
11-
127
[@azure/cosmos] started
138
XX of XX: [@azure/cosmos] completed successfully in ? seconds
149
[@azure/service-bus] started
@@ -44,7 +39,6 @@ XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds
4439
[@azure/keyvault-secrets] started
4540
XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds
4641
[@azure/core-amqp] started
47-
4842
SUCCESS (16)
4943
================================
5044
@azure/abort-controller (? seconds)
@@ -64,18 +58,15 @@ SUCCESS (16)
6458
@azure/template (? seconds)
6559
testhub (? seconds)
6660
================================
67-
6861
SUCCESS WITH WARNINGS (1)
6962
================================
7063
@azure/service-bus (? seconds)
7164
Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md
7265
================================
73-
7466
BLOCKED (1)
7567
================================
7668
@azure/event-hubs
7769
================================
78-
7970
FAILURE (1)
8071
================================
8172
@azure/core-amqp (? seconds)
@@ -85,8 +76,6 @@ src/errors.ts(586,20): error TS7053: Element implicitly has an 'any' type becaus
8576
src/errors.ts(607,34): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'typeof SystemErrorConditionMapper'.
8677
src/errors.ts(608,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'typeof ConditionErrorNameMapper'.
8778
================================
88-
89-
9079
Error: Project(s) failed to build
9180
rush rebuild - Errors! ( ? seconds)
9281

@@ -95,7 +84,6 @@ rush rebuild - Errors! ( ? seconds)
9584
Standard error:
9685
Your version of Node.js (12.4.0) has not been tested with this release of Rush. The Rush team will not accept issue reports for it. Please consider upgrading Rush or downgrading Node.js.
9786
XX of XX: [@azure/service-bus] completed with warnings in ? seconds
98-
9987
XX of XX: [@azure/core-amqp] failed to build!
10088
XX of XX: [@azure/event-hubs] blocked by [@azure/core-amqp]!
10189
[@azure/core-amqp] Returned error code: 2

0 commit comments

Comments
 (0)