Skip to content

Add vscode docker test #32152

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

Merged
merged 3 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions src/testRunner/externalCompileRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ ${sanitizeDockerfileOutput(result.stderr.toString())}`;
}

function sanitizeDockerfileOutput(result: string): string {
return stripAbsoluteImportPaths(sanitizeTimestamps(sanitizeVersionSpecifiers(stripRushStageNumbers(stripANSIEscapes(normalizeNewlines(result))))));
return [
normalizeNewlines,
stripANSIEscapes,
stripRushStageNumbers,
sanitizeVersionSpecifiers,
sanitizeTimestamps,
sanitizeUnimportantGulpOutput,
stripAbsoluteImportPaths,
].reduce((result, f) => f(result), result);
}

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

/**
* Gulp's output order within a `parallel` block is nondeterministic (and there's no way to configure it to execute in series),
* so we purge as much of the gulp output as we can
*/
function sanitizeUnimportantGulpOutput(result: string): string {
return result.replace(/^.*(\] (Starting)|(Finished)).*$/gm, "") // task start/end messages (nondeterministic order)
.replace(/^.*\] Respawned to PID: \d+.*$/gm, "") // PID of child is OS and system-load dependent (likely stableish in a container but still dangerous)
.replace(/\n+/g, "\n");
}

function sanitizeTimestamps(result: string): string {
return result.replace(/\[\d?\d:\d\d:\d\d (A|P)M\]/g, "[XX:XX:XX XM]")
.replace(/\d+(\.\d+)? seconds?/g, "? seconds")
.replace(/\d+(\.\d+)? minutes?/g, "")
.replace(/\d+(\.\d+)?s/g, "?s");
.replace(/\[\d?\d:\d\d:\d\d\]/g, "[XX:XX:XX]")
.replace(/\d+(\.\d+)? sec(onds?)?/g, "? seconds")
.replace(/\d+(\.\d+)? min(utes?)?/g, "")
.replace(/\d+(\.\d+)?( m)?s/g, "?s");
}

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

/**
Expand Down
12 changes: 0 additions & 12 deletions tests/baselines/reference/docker/azure-sdk.log
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
Exit Code: 1
Standard output:


Rush Multi-Project Build Tool 5.7.3 - https://rushjs.io


Starting "rush rebuild"

Executing a maximum of 1 simultaneous processes...

[@azure/cosmos] started
XX of XX: [@azure/cosmos] completed successfully in ? seconds
[@azure/service-bus] started
Expand Down Expand Up @@ -44,7 +39,6 @@ XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds
[@azure/keyvault-secrets] started
XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds
[@azure/core-amqp] started

SUCCESS (16)
================================
@azure/abort-controller (? seconds)
Expand All @@ -64,18 +58,15 @@ SUCCESS (16)
@azure/template (? seconds)
testhub (? seconds)
================================

SUCCESS WITH WARNINGS (1)
================================
@azure/service-bus (? seconds)
Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md
================================

BLOCKED (1)
================================
@azure/event-hubs
================================

FAILURE (1)
================================
@azure/core-amqp (? seconds)
Expand All @@ -85,8 +76,6 @@ src/errors.ts(586,20): error TS7053: Element implicitly has an 'any' type becaus
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'.
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'.
================================


Error: Project(s) failed to build
rush rebuild - Errors! ( ? seconds)

Expand All @@ -95,7 +84,6 @@ rush rebuild - Errors! ( ? seconds)
Standard error:
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.
XX of XX: [@azure/service-bus] completed with warnings in ? seconds

XX of XX: [@azure/core-amqp] failed to build!
XX of XX: [@azure/event-hubs] blocked by [@azure/core-amqp]!
[@azure/core-amqp] Returned error code: 2
Loading