Skip to content

Strip more kinds of timestamps and versions from dockerfile output #32519

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 11 commits into from
Jul 24, 2019
8 changes: 6 additions & 2 deletions src/testRunner/externalCompileRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,26 @@ function stripRushStageNumbers(result: string): string {
* 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)
return result.replace(/^.*(\] (Starting)|(Finished)).*$/gm, "") // "gulp" task start/end messages (nondeterministic order)
.replace(/^.*(\] . (finished)|(started)).*$/gm, "") // "just" 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:\d\d:\d\d\]/g, "[XX:XX:XX]")
.replace(/\/\d+-\d+-[\d_TZ]+-debug.log/g, "\/XXXX-XX-XXXXXXXXX-debug.log")
.replace(/\d+(\.\d+)? sec(onds?)?/g, "? seconds")
.replace(/\d+(\.\d+)? min(utes?)?/g, "")
.replace(/\d+(\.\d+)?( m)?s/g, "?s");
.replace(/\d+(\.\d+)? ?m?s/g, "?s")
.replace(/ \(\?s\)/g, "");
}

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(/Rush Multi-Project Build Tool (\d+)\.\d+\.\d+/g, "Rush Multi-Project Build Tool $1.X.X")
.replace(/([@v\()])\d+\.\d+\.\d+/g, "$1X.X.X");
}

Expand Down
53 changes: 20 additions & 33 deletions tests/baselines/reference/docker/azure-sdk.log
Original file line number Diff line number Diff line change
@@ -1,54 +1,41 @@
Exit Code: 1
Standard output:

Rush Multi-Project Build Tool 5.10.1 - https://rushjs.io
Rush Multi-Project Build Tool 5.X.X - https://rushjs.io
Starting "rush rebuild"
Executing a maximum of 1 simultaneous processes...
[@azure/cosmos] started
Executing a maximum of ?simultaneous processes...
XX of XX: [@azure/abort-controller] completed successfully in ? seconds
XX of XX: [@azure/core-asynciterator-polyfill] completed successfully in ? seconds
XX of XX: [@azure/core-paging] completed successfully in ? seconds
XX of XX: [@azure/cosmos] completed successfully in ? seconds
[@azure/event-processor-host] started
XX of XX: [@azure/event-processor-host] completed successfully in ? seconds
[@azure/service-bus] started
Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md
[@azure/storage-blob] started
XX of XX: [@azure/storage-blob] completed successfully in ? seconds
[@azure/storage-file] started
XX of XX: [@azure/storage-file] completed successfully in ? seconds
[@azure/storage-queue] started
XX of XX: [@azure/storage-queue] completed successfully in ? seconds
[@azure/template] started
XX of XX: [@azure/template] completed successfully in ? seconds
[testhub] started
XX of XX: [testhub] completed successfully in ? seconds
[@azure/abort-controller] started
XX of XX: [@azure/abort-controller] completed successfully in ? seconds
[@azure/core-asynciterator-polyfill] started
XX of XX: [@azure/core-asynciterator-polyfill] completed successfully in ? seconds
[@azure/core-auth] started
XX of XX: [@azure/core-auth] completed successfully in ? seconds
[@azure/core-http] started
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @azure/core-http@X.X.X-preview.1 build:tsc: `tsc -p tsconfig.es.json`
npm ERR! @azure/core-http@X.X.X-preview.2 build:tsc: `tsc -p tsconfig.es.json`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @azure/core-http@X.X.X-preview.1 build:tsc script.
npm ERR! Failed at the @azure/core-http@X.X.X-preview.2 build:tsc script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-07-19T13_40_31_496Z-debug.log
npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log
ERROR: "build:tsc" exited with 2.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @azure/core-http@X.X.X-preview.1 build:lib: `run-s build:tsc build:rollup build:minify-browser`
npm ERR! @azure/core-http@X.X.X-preview.2 build:lib: `run-s build:tsc build:rollup build:minify-browser`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @azure/core-http@X.X.X-preview.1 build:lib script.
npm ERR! Failed at the @azure/core-http@X.X.X-preview.2 build:lib script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-07-19T13_40_31_533Z-debug.log
npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log
ERROR: "build:lib" exited with 1.
[@azure/core-paging] started
XX of XX: [@azure/core-paging] completed successfully in ? seconds
SUCCESS (11)
================================
@azure/abort-controller (? seconds)
Expand Down Expand Up @@ -83,23 +70,23 @@ FAILURE (1)
@azure/core-http (? seconds)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @azure/core-http@X.X.X-preview.1 build:tsc: `tsc -p tsconfig.es.json`
npm ERR! @azure/core-http@X.X.X-preview.2 build:tsc: `tsc -p tsconfig.es.json`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @azure/core-http@X.X.X-preview.1 build:tsc script.
npm ERR! Failed at the @azure/core-http@X.X.X-preview.2 build:tsc script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-07-19T13_40_31_496Z-debug.log
npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log
ERROR: "build:tsc" exited with 2.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @azure/core-http@X.X.X-preview.1 build:lib: `run-s build:tsc build:rollup build:minify-browser`
npm ERR! @azure/core-http@X.X.X-preview.2 build:lib: `run-s build:tsc build:rollup build:minify-browser`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @azure/core-http@X.X.X-preview.1 build:lib script.
npm ERR! Failed at the @azure/core-http@X.X.X-preview.2 build:lib script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-07-19T13_40_31_533Z-debug.log
npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log
ERROR: "build:lib" exited with 1.
================================
Error: Project(s) failed to build
Expand All @@ -112,10 +99,10 @@ Your version of Node.js (X.X.X) has not been tested with this release of Rush. T
XX of XX: [@azure/service-bus] completed with warnings in ? seconds
XX of XX: [@azure/core-http] failed to build!
XX of XX: [@azure/core-arm] blocked by [@azure/core-http]!
XX of XX: [@azure/identity] blocked by [@azure/core-http]!
XX of XX: [@azure/core-amqp] blocked by [@azure/core-http]!
XX of XX: [@azure/event-hubs] blocked by [@azure/core-http]!
XX of XX: [@azure/keyvault-certificates] blocked by [@azure/core-http]!
XX of XX: [@azure/keyvault-keys] blocked by [@azure/core-http]!
XX of XX: [@azure/keyvault-secrets] blocked by [@azure/core-http]!
XX of XX: [@azure/identity] blocked by [@azure/core-http]!
XX of XX: [@azure/core-amqp] blocked by [@azure/core-http]!
XX of XX: [@azure/event-hubs] blocked by [@azure/core-http]!
[@azure/core-http] Returned error code: 1
Loading