@datadog/datadog-ci 4.4.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/commands/cli.d.ts +0 -1
- package/dist/commands/cli.js +22 -24
- package/dist/commands/cli.js.map +1 -1
- package/dist/commands/elf-symbols/upload.js +9 -9
- package/dist/commands/elf-symbols/upload.js.map +1 -1
- package/dist/commands/flutter-symbols/upload.js +10 -10
- package/dist/commands/flutter-symbols/upload.js.map +1 -1
- package/dist/commands/unity-symbols/upload.js +16 -16
- package/dist/commands/unity-symbols/upload.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/dist/commands/dsyms/cli.d.ts +0 -2
- package/dist/commands/dsyms/cli.js +0 -6
- package/dist/commands/dsyms/cli.js.map +0 -1
- package/dist/commands/dsyms/interfaces.d.ts +0 -17
- package/dist/commands/dsyms/interfaces.js +0 -34
- package/dist/commands/dsyms/interfaces.js.map +0 -1
- package/dist/commands/dsyms/renderer.d.ts +0 -11
- package/dist/commands/dsyms/renderer.js +0 -93
- package/dist/commands/dsyms/renderer.js.map +0 -1
- package/dist/commands/dsyms/upload.d.ts +0 -51
- package/dist/commands/dsyms/upload.js +0 -338
- package/dist/commands/dsyms/upload.js.map +0 -1
- package/dist/commands/dsyms/utils.d.ts +0 -15
- package/dist/commands/dsyms/utils.js +0 -74
- package/dist/commands/dsyms/utils.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/commands/dsyms/cli.ts"],"names":[],"mappings":";;;AAAA,qCAA2C;AAE9B,QAAA,QAAQ,GAAG,CAAC,2BAAkB,CAAC,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MultipartPayload } from '@datadog/datadog-ci-base/helpers/upload';
|
|
2
|
-
export interface Dsym {
|
|
3
|
-
bundle: string;
|
|
4
|
-
dwarf: DWARF[];
|
|
5
|
-
}
|
|
6
|
-
export interface DWARF {
|
|
7
|
-
object: string;
|
|
8
|
-
uuid: string;
|
|
9
|
-
arch: string;
|
|
10
|
-
}
|
|
11
|
-
export declare class CompressedDsym {
|
|
12
|
-
archivePath: string;
|
|
13
|
-
dsym: Dsym;
|
|
14
|
-
constructor(archivePath: string, dsym: Dsym);
|
|
15
|
-
asMultipartPayload(): MultipartPayload;
|
|
16
|
-
private getMetadataPayload;
|
|
17
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CompressedDsym = void 0;
|
|
4
|
-
class CompressedDsym {
|
|
5
|
-
constructor(archivePath, dsym) {
|
|
6
|
-
this.archivePath = archivePath;
|
|
7
|
-
this.dsym = dsym;
|
|
8
|
-
}
|
|
9
|
-
asMultipartPayload() {
|
|
10
|
-
const content = new Map([
|
|
11
|
-
['symbols_archive', { type: 'file', path: this.archivePath, options: { filename: 'ios_symbols_archive' } }],
|
|
12
|
-
['event', this.getMetadataPayload()],
|
|
13
|
-
]);
|
|
14
|
-
return {
|
|
15
|
-
content,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
getMetadataPayload() {
|
|
19
|
-
const concatUUIDs = this.dsym.dwarf.map((d) => d.uuid).join();
|
|
20
|
-
return {
|
|
21
|
-
type: 'string',
|
|
22
|
-
options: {
|
|
23
|
-
contentType: 'application/json',
|
|
24
|
-
filename: 'event',
|
|
25
|
-
},
|
|
26
|
-
value: JSON.stringify({
|
|
27
|
-
type: 'ios_symbols',
|
|
28
|
-
uuids: concatUUIDs,
|
|
29
|
-
}),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.CompressedDsym = CompressedDsym;
|
|
34
|
-
//# sourceMappingURL=interfaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/commands/dsyms/interfaces.ts"],"names":[],"mappings":";;;AAYA,MAAa,cAAc;IAIzB,YAAY,WAAmB,EAAE,IAAU;QACzC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAEM,kBAAkB;QACvB,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC;YACtB,CAAC,iBAAiB,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,EAAC,QAAQ,EAAE,qBAAqB,EAAC,EAAC,CAAC;YACvG,CAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC;SACrC,CAAC,CAAA;QAEF,OAAO;YACL,OAAO;SACR,CAAA;IACH,CAAC;IAEO,kBAAkB;QACxB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;QAE7D,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,WAAW,EAAE,kBAAkB;gBAC/B,QAAQ,EAAE,OAAO;aAClB;YACD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;gBACpB,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,WAAW;aACnB,CAAC;SACH,CAAA;IACH,CAAC;CACF;AAnCD,wCAmCC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { UploadStatus } from '@datadog/datadog-ci-base/helpers/upload';
|
|
2
|
-
import { CompressedDsym, Dsym, DWARF } from './interfaces';
|
|
3
|
-
export declare const renderConfigurationError: (error: Error) => string;
|
|
4
|
-
export declare const renderInvalidDsymWarning: (dSYMPath: string) => string;
|
|
5
|
-
export declare const renderDSYMSlimmingFailure: (dSYM: Dsym, dwarf: DWARF, error: Error) => string;
|
|
6
|
-
export declare const renderFailedUpload: (dSYM: CompressedDsym, errorMessage: string) => string;
|
|
7
|
-
export declare const renderRetriedUpload: (dSYM: CompressedDsym, errorMessage: string, attempt: number) => string;
|
|
8
|
-
export declare const renderSuccessfulCommand: (statuses: UploadStatus[], duration: number, dryRun: boolean) => string;
|
|
9
|
-
export declare const renderCommandInfo: (basePath: string, poolLimit: number, dryRun: boolean) => string;
|
|
10
|
-
export declare const renderCommandDetail: (intermediateDirectory: string, uploadDirectory: string) => string;
|
|
11
|
-
export declare const renderUpload: (dSYM: CompressedDsym) => string;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.renderUpload = exports.renderCommandDetail = exports.renderCommandInfo = exports.renderSuccessfulCommand = exports.renderRetriedUpload = exports.renderFailedUpload = exports.renderDSYMSlimmingFailure = exports.renderInvalidDsymWarning = exports.renderConfigurationError = void 0;
|
|
7
|
-
const formatting_1 = require("@datadog/datadog-ci-base/helpers/formatting");
|
|
8
|
-
const upload_1 = require("@datadog/datadog-ci-base/helpers/upload");
|
|
9
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
10
|
-
const upath_1 = __importDefault(require("upath"));
|
|
11
|
-
const utils_1 = require("./utils");
|
|
12
|
-
const renderConfigurationError = (error) => chalk_1.default.red(`${formatting_1.ICONS.FAILED} Configuration error: ${error}.\n`);
|
|
13
|
-
exports.renderConfigurationError = renderConfigurationError;
|
|
14
|
-
const renderInvalidDsymWarning = (dSYMPath) => chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} Invalid dSYM file, will be skipped: ${dSYMPath}\n`);
|
|
15
|
-
exports.renderInvalidDsymWarning = renderInvalidDsymWarning;
|
|
16
|
-
const renderDSYMSlimmingFailure = (dSYM, dwarf, error) => chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} Failed to export '${dwarf.arch}' arch (${dwarf.uuid}) from ${dSYM.bundle}: ${error}\n`);
|
|
17
|
-
exports.renderDSYMSlimmingFailure = renderDSYMSlimmingFailure;
|
|
18
|
-
const renderFailedUpload = (dSYM, errorMessage) => {
|
|
19
|
-
const dSYMPathBold = `[${chalk_1.default.bold.dim(dSYM.dsym.bundle)}]`;
|
|
20
|
-
return chalk_1.default.red(`${formatting_1.ICONS.FAILED} Failed upload dSYM for ${dSYMPathBold}: ${errorMessage}\n`);
|
|
21
|
-
};
|
|
22
|
-
exports.renderFailedUpload = renderFailedUpload;
|
|
23
|
-
const renderRetriedUpload = (dSYM, errorMessage, attempt) => {
|
|
24
|
-
const dSYMPathBold = `[${chalk_1.default.bold.dim(dSYM.dsym.bundle)}]`;
|
|
25
|
-
return chalk_1.default.yellow(`[attempt ${attempt}] Retrying dSYM upload ${dSYMPathBold}: ${errorMessage}\n`);
|
|
26
|
-
};
|
|
27
|
-
exports.renderRetriedUpload = renderRetriedUpload;
|
|
28
|
-
const renderSuccessfulCommand = (statuses, duration, dryRun) => {
|
|
29
|
-
const results = new Map();
|
|
30
|
-
statuses.forEach((status) => {
|
|
31
|
-
if (!results.has(status)) {
|
|
32
|
-
results.set(status, 0);
|
|
33
|
-
}
|
|
34
|
-
results.set(status, results.get(status) + 1);
|
|
35
|
-
});
|
|
36
|
-
const output = ['', chalk_1.default.bold('Command summary:')];
|
|
37
|
-
if (results.get(upload_1.UploadStatus.Failure)) {
|
|
38
|
-
output.push(chalk_1.default.red(`${formatting_1.ICONS.FAILED} Some dSYMS have not been uploaded correctly.`));
|
|
39
|
-
}
|
|
40
|
-
else if (results.get(upload_1.UploadStatus.Skipped)) {
|
|
41
|
-
output.push(chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} Some dSYMs have been skipped.`));
|
|
42
|
-
}
|
|
43
|
-
else if (results.get(upload_1.UploadStatus.Success)) {
|
|
44
|
-
if (dryRun) {
|
|
45
|
-
output.push(chalk_1.default.green(`${formatting_1.ICONS.SUCCESS} [DRYRUN] Handled ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Success), 'dSYM', 'dSYMs')} with success in ${duration} seconds.`));
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
output.push(chalk_1.default.green(`${formatting_1.ICONS.SUCCESS} Uploaded ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Success), 'dSYM', 'dSYMs')} in ${duration} seconds.`));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
output.push(chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} No dSYMs detected. Did you specify the correct directory?`));
|
|
53
|
-
}
|
|
54
|
-
if (results.get(upload_1.UploadStatus.Failure) || results.get(upload_1.UploadStatus.Skipped)) {
|
|
55
|
-
output.push(`Details about the found ${(0, utils_1.pluralize)(statuses.length, 'dSYM', 'dSYMs')}:`);
|
|
56
|
-
if (results.get(upload_1.UploadStatus.Success)) {
|
|
57
|
-
output.push(` * ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Success), 'dSYM', 'dSYMs')} successfully uploaded`);
|
|
58
|
-
}
|
|
59
|
-
if (results.get(upload_1.UploadStatus.Skipped)) {
|
|
60
|
-
output.push(chalk_1.default.yellow(` * ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Skipped), 'dSYM was', 'dSYMs were')} skipped`));
|
|
61
|
-
}
|
|
62
|
-
if (results.get(upload_1.UploadStatus.Failure)) {
|
|
63
|
-
output.push(chalk_1.default.red(` * ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Failure), 'dSYM', 'dSYMs')} failed to upload`));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return output.join('\n') + '\n';
|
|
67
|
-
};
|
|
68
|
-
exports.renderSuccessfulCommand = renderSuccessfulCommand;
|
|
69
|
-
const renderCommandInfo = (basePath, poolLimit, dryRun) => {
|
|
70
|
-
let fullStr = '';
|
|
71
|
-
if (dryRun) {
|
|
72
|
-
fullStr += chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} DRY-RUN MODE ENABLED. WILL NOT UPLOAD DSYMS\n`);
|
|
73
|
-
}
|
|
74
|
-
const startStr = chalk_1.default.green(`Starting upload with concurrency ${poolLimit}. \n`);
|
|
75
|
-
fullStr += startStr;
|
|
76
|
-
const basePathStr = chalk_1.default.green(`Will look for dSYMs in ${basePath}\n`);
|
|
77
|
-
fullStr += basePathStr;
|
|
78
|
-
fullStr += chalk_1.default.green(`Once dSYMs upload is successful files will be processed and ready to use within the next 5 minutes.\n`);
|
|
79
|
-
return fullStr;
|
|
80
|
-
};
|
|
81
|
-
exports.renderCommandInfo = renderCommandInfo;
|
|
82
|
-
const renderCommandDetail = (intermediateDirectory, uploadDirectory) => `Will use temporary intermediate directory: ${intermediateDirectory}\n` +
|
|
83
|
-
`Will use temporary upload directory: ${uploadDirectory}\n`;
|
|
84
|
-
exports.renderCommandDetail = renderCommandDetail;
|
|
85
|
-
const renderUpload = (dSYM) => {
|
|
86
|
-
const archiveName = upath_1.default.basename(dSYM.archivePath);
|
|
87
|
-
const objectName = dSYM.dsym.dwarf.map((dwarf) => upath_1.default.basename(dwarf.object))[0];
|
|
88
|
-
const archs = dSYM.dsym.dwarf.map((dwarf) => dwarf.arch).join();
|
|
89
|
-
const uuids = dSYM.dsym.dwarf.map((dwarf) => dwarf.uuid).join();
|
|
90
|
-
return `Uploading ${archiveName} (${objectName}, arch: ${archs}, UUID: ${uuids})\n`;
|
|
91
|
-
};
|
|
92
|
-
exports.renderUpload = renderUpload;
|
|
93
|
-
//# sourceMappingURL=renderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../src/commands/dsyms/renderer.ts"],"names":[],"mappings":";;;;;;AAAA,4EAAiE;AACjE,oEAAoE;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AAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAClF,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;IAC/D,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;IAE/D,OAAO,aAAa,WAAW,KAAK,UAAU,WAAW,KAAK,WAAW,KAAK,KAAK,CAAA;AACrF,CAAC,CAAA;AAPY,QAAA,YAAY,gBAOxB"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { BaseCommand } from '@datadog/datadog-ci-base';
|
|
2
|
-
export declare class DsymsUploadCommand extends BaseCommand {
|
|
3
|
-
static paths: string[][];
|
|
4
|
-
static usage: import("clipanion").Usage;
|
|
5
|
-
private basePath;
|
|
6
|
-
private configPath;
|
|
7
|
-
private dryRun;
|
|
8
|
-
private maxConcurrency;
|
|
9
|
-
private cliVersion;
|
|
10
|
-
private fips;
|
|
11
|
-
private fipsIgnoreError;
|
|
12
|
-
private fipsConfig;
|
|
13
|
-
private config;
|
|
14
|
-
execute(): Promise<1 | 0>;
|
|
15
|
-
private loadConfig;
|
|
16
|
-
private createServices;
|
|
17
|
-
private processAndUploadDsyms;
|
|
18
|
-
private prepareSearchDirectory;
|
|
19
|
-
private findDsyms;
|
|
20
|
-
/**
|
|
21
|
-
* Parses the output of `dwarfdump --uuid` command (ref.: https://www.unix.com/man-page/osx/1/dwarfdump/).
|
|
22
|
-
* It returns one or many DWARF UUID and arch read from the output.
|
|
23
|
-
*
|
|
24
|
-
* Example `dwarfdump --uuid` output:
|
|
25
|
-
* ```
|
|
26
|
-
* $ dwarfdump --uuid DDTest.framework.dSYM
|
|
27
|
-
* UUID: C8469F85-B060-3085-B69D-E46C645560EA (armv7) DDTest.framework.dSYM/Contents/Resources/DWARF/DDTest
|
|
28
|
-
* UUID: 06EE3D68-D605-3E92-B92D-2F48C02A505E (arm64) DDTest.framework.dSYM/Contents/Resources/DWARF/DDTest
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
private parseDwarfdumpOutput;
|
|
32
|
-
/**
|
|
33
|
-
* It takes `N` dSYMs and returns `N` or more dSYMs. If a dSYM includes more than one arch slice,
|
|
34
|
-
* it will be thinned by extracting each arch to a new dSYM in `output`.
|
|
35
|
-
*/
|
|
36
|
-
private processDsyms;
|
|
37
|
-
/**
|
|
38
|
-
* It takes fat dSYM as input and returns multiple dSYMs by extracting **each arch**
|
|
39
|
-
* to separate dSYM file. New files are saved to `output` and named by their object uuid (`<uuid>.dSYM`).
|
|
40
|
-
*
|
|
41
|
-
* For example, given `<source path>/Foo.dSYM/Contents/Resources/DWARF/Foo` dSYM with two arch slices: `arm64` (uuid1)
|
|
42
|
-
* and `x86_64` (uuid2), it will:
|
|
43
|
-
* - create `<intermediate path>/<uuid1>.dSYM/Contents/Resources/DWARF/Foo` for `arm64`,
|
|
44
|
-
* - create `<intermediate path>/<uuid2>.dSYM/Contents/Resources/DWARF/Foo` for `x86_64`.
|
|
45
|
-
*/
|
|
46
|
-
private thinDsym;
|
|
47
|
-
private copyInfoPlist;
|
|
48
|
-
private compressDsyms;
|
|
49
|
-
private createRequestBuilder;
|
|
50
|
-
private createUploadFunction;
|
|
51
|
-
}
|
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.DsymsUploadCommand = void 0;
|
|
39
|
-
const fs_1 = require("fs");
|
|
40
|
-
const datadog_ci_base_1 = require("@datadog/datadog-ci-base");
|
|
41
|
-
const constants_1 = require("@datadog/datadog-ci-base/constants");
|
|
42
|
-
const apikey_1 = require("@datadog/datadog-ci-base/helpers/apikey");
|
|
43
|
-
const concurrency_1 = require("@datadog/datadog-ci-base/helpers/concurrency");
|
|
44
|
-
const env_1 = require("@datadog/datadog-ci-base/helpers/env");
|
|
45
|
-
const errors_1 = require("@datadog/datadog-ci-base/helpers/errors");
|
|
46
|
-
const fips_1 = require("@datadog/datadog-ci-base/helpers/fips");
|
|
47
|
-
const glob_1 = require("@datadog/datadog-ci-base/helpers/glob");
|
|
48
|
-
const metrics_1 = require("@datadog/datadog-ci-base/helpers/metrics");
|
|
49
|
-
const upload_1 = require("@datadog/datadog-ci-base/helpers/upload");
|
|
50
|
-
const utils_1 = require("@datadog/datadog-ci-base/helpers/utils");
|
|
51
|
-
const validation = __importStar(require("@datadog/datadog-ci-base/helpers/validation"));
|
|
52
|
-
const validation_1 = require("@datadog/datadog-ci-base/helpers/validation");
|
|
53
|
-
const version_1 = require("@datadog/datadog-ci-base/version");
|
|
54
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
55
|
-
const clipanion_1 = require("clipanion");
|
|
56
|
-
const upath_1 = __importDefault(require("upath"));
|
|
57
|
-
const interfaces_1 = require("./interfaces");
|
|
58
|
-
const renderer_1 = require("./renderer");
|
|
59
|
-
const utils_2 = require("./utils");
|
|
60
|
-
class DsymsUploadCommand extends datadog_ci_base_1.BaseCommand {
|
|
61
|
-
constructor() {
|
|
62
|
-
var _a, _b;
|
|
63
|
-
super(...arguments);
|
|
64
|
-
this.basePath = clipanion_1.Option.String({ required: true });
|
|
65
|
-
this.configPath = clipanion_1.Option.String('--config');
|
|
66
|
-
this.dryRun = clipanion_1.Option.Boolean('--dry-run', false);
|
|
67
|
-
this.maxConcurrency = clipanion_1.Option.String('--max-concurrency', '20', { validator: validation.isInteger() });
|
|
68
|
-
this.cliVersion = version_1.cliVersion;
|
|
69
|
-
this.fips = clipanion_1.Option.Boolean('--fips', false);
|
|
70
|
-
this.fipsIgnoreError = clipanion_1.Option.Boolean('--fips-ignore-error', false);
|
|
71
|
-
this.fipsConfig = {
|
|
72
|
-
fips: (_a = (0, env_1.toBoolean)(process.env[constants_1.FIPS_ENV_VAR])) !== null && _a !== void 0 ? _a : false,
|
|
73
|
-
fipsIgnoreError: (_b = (0, env_1.toBoolean)(process.env[constants_1.FIPS_IGNORE_ERROR_ENV_VAR])) !== null && _b !== void 0 ? _b : false,
|
|
74
|
-
};
|
|
75
|
-
this.config = {
|
|
76
|
-
datadogSite: 'datadoghq.com',
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
execute() {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
(0, fips_1.enableFips)(this.fips || this.fipsConfig.fips, this.fipsIgnoreError || this.fipsConfig.fipsIgnoreError);
|
|
82
|
-
this.basePath = upath_1.default.normalize(this.basePath);
|
|
83
|
-
this.context.stdout.write((0, renderer_1.renderCommandInfo)(this.basePath, this.maxConcurrency, this.dryRun));
|
|
84
|
-
yield this.loadConfig();
|
|
85
|
-
const { metricsLogger, apiKeyValidator } = this.createServices();
|
|
86
|
-
const initialTime = Date.now();
|
|
87
|
-
try {
|
|
88
|
-
const tmpDirectory = yield (0, utils_2.createUniqueTmpDirectory)();
|
|
89
|
-
try {
|
|
90
|
-
const results = yield this.processAndUploadDsyms(tmpDirectory, metricsLogger, apiKeyValidator);
|
|
91
|
-
const totalTime = (Date.now() - initialTime) / 1000;
|
|
92
|
-
this.context.stdout.write((0, renderer_1.renderSuccessfulCommand)(results, totalTime, this.dryRun));
|
|
93
|
-
metricsLogger.logger.gauge('duration', totalTime);
|
|
94
|
-
return 0;
|
|
95
|
-
}
|
|
96
|
-
finally {
|
|
97
|
-
yield (0, utils_2.deleteDirectory)(tmpDirectory);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
if (error instanceof errors_1.InvalidConfigurationError) {
|
|
102
|
-
this.context.stdout.write((0, renderer_1.renderConfigurationError)(error));
|
|
103
|
-
return 1;
|
|
104
|
-
}
|
|
105
|
-
throw error;
|
|
106
|
-
}
|
|
107
|
-
finally {
|
|
108
|
-
try {
|
|
109
|
-
yield metricsLogger.flush();
|
|
110
|
-
}
|
|
111
|
-
catch (err) {
|
|
112
|
-
this.context.stdout.write(`WARN: ${err}\n`);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
loadConfig() {
|
|
118
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
-
this.config = yield (0, utils_1.resolveConfigFromFileAndEnvironment)(this.config, {
|
|
120
|
-
apiKey: process.env.DATADOG_API_KEY || process.env.DD_API_KEY,
|
|
121
|
-
datadogSite: process.env.DATADOG_SITE || process.env.DD_SITE,
|
|
122
|
-
}, {
|
|
123
|
-
configPath: this.configPath,
|
|
124
|
-
defaultConfigPaths: ['datadog-ci.json', '../datadog-ci.json'],
|
|
125
|
-
configFromFileCallback: (configFromFile) => {
|
|
126
|
-
(0, validation_1.checkAPIKeyOverride)(process.env.DATADOG_API_KEY || process.env.DD_API_KEY, configFromFile.apiKey, this.context.stdout);
|
|
127
|
-
},
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
createServices() {
|
|
132
|
-
const metricsLogger = (0, metrics_1.getMetricsLogger)({
|
|
133
|
-
apiKey: this.config.apiKey,
|
|
134
|
-
datadogSite: this.config.datadogSite,
|
|
135
|
-
defaultTags: [`cli_version:${this.cliVersion}`],
|
|
136
|
-
prefix: 'datadog.ci.dsyms.',
|
|
137
|
-
});
|
|
138
|
-
const apiKeyValidator = (0, apikey_1.newApiKeyValidator)({
|
|
139
|
-
apiKey: this.config.apiKey,
|
|
140
|
-
datadogSite: this.config.datadogSite,
|
|
141
|
-
metricsLogger: metricsLogger.logger,
|
|
142
|
-
});
|
|
143
|
-
return { metricsLogger, apiKeyValidator };
|
|
144
|
-
}
|
|
145
|
-
processAndUploadDsyms(tmpDirectory, metricsLogger, apiKeyValidator) {
|
|
146
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
const intermediateDirectory = (0, utils_1.buildPath)(tmpDirectory, 'datadog-ci', 'dsyms', 'intermediate');
|
|
148
|
-
const uploadDirectory = (0, utils_1.buildPath)(tmpDirectory, 'datadog-ci', 'dsyms', 'upload');
|
|
149
|
-
this.context.stdout.write((0, renderer_1.renderCommandDetail)(intermediateDirectory, uploadDirectory));
|
|
150
|
-
const searchDirectory = yield this.prepareSearchDirectory(tmpDirectory);
|
|
151
|
-
const dsyms = yield this.findDsyms(searchDirectory);
|
|
152
|
-
const thinDsyms = yield this.processDsyms(dsyms, intermediateDirectory);
|
|
153
|
-
const compressedDsyms = yield this.compressDsyms(thinDsyms, uploadDirectory);
|
|
154
|
-
const requestBuilder = this.createRequestBuilder();
|
|
155
|
-
const uploadFunction = this.createUploadFunction(requestBuilder, metricsLogger, apiKeyValidator);
|
|
156
|
-
return (0, concurrency_1.doWithMaxConcurrency)(this.maxConcurrency, compressedDsyms, uploadFunction);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
prepareSearchDirectory(tmpDirectory) {
|
|
160
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
-
if (yield (0, utils_2.isZipFile)(this.basePath)) {
|
|
162
|
-
yield (0, utils_2.unzipArchiveToDirectory)(this.basePath, tmpDirectory);
|
|
163
|
-
return tmpDirectory;
|
|
164
|
-
}
|
|
165
|
-
return this.basePath;
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
findDsyms(directoryPath) {
|
|
169
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
const dsymPaths = (0, glob_1.globSync)((0, utils_1.buildPath)(directoryPath, '**/*.dSYM'));
|
|
171
|
-
const results = yield Promise.all(dsymPaths.map((bundle) => __awaiter(this, void 0, void 0, function* () {
|
|
172
|
-
try {
|
|
173
|
-
const { stdout } = yield (0, utils_2.executeDwarfdump)(bundle);
|
|
174
|
-
const dwarf = this.parseDwarfdumpOutput(stdout);
|
|
175
|
-
return [{ bundle, dwarf }];
|
|
176
|
-
}
|
|
177
|
-
catch (_a) {
|
|
178
|
-
this.context.stdout.write((0, renderer_1.renderInvalidDsymWarning)(bundle));
|
|
179
|
-
return [];
|
|
180
|
-
}
|
|
181
|
-
})));
|
|
182
|
-
return results.flat();
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Parses the output of `dwarfdump --uuid` command (ref.: https://www.unix.com/man-page/osx/1/dwarfdump/).
|
|
187
|
-
* It returns one or many DWARF UUID and arch read from the output.
|
|
188
|
-
*
|
|
189
|
-
* Example `dwarfdump --uuid` output:
|
|
190
|
-
* ```
|
|
191
|
-
* $ dwarfdump --uuid DDTest.framework.dSYM
|
|
192
|
-
* UUID: C8469F85-B060-3085-B69D-E46C645560EA (armv7) DDTest.framework.dSYM/Contents/Resources/DWARF/DDTest
|
|
193
|
-
* UUID: 06EE3D68-D605-3E92-B92D-2F48C02A505E (arm64) DDTest.framework.dSYM/Contents/Resources/DWARF/DDTest
|
|
194
|
-
* ```
|
|
195
|
-
*/
|
|
196
|
-
parseDwarfdumpOutput(output) {
|
|
197
|
-
const lineRegexp = /UUID: ([0-9A-F]{8}-(?:[0-9A-F]{4}-){3}[0-9A-F]{12}) \(([a-z0-9_]+)\) (.+)/;
|
|
198
|
-
return output
|
|
199
|
-
.split('\n')
|
|
200
|
-
.map((line) => {
|
|
201
|
-
const match = line.match(lineRegexp);
|
|
202
|
-
return match ? [{ uuid: match[1], arch: match[2], object: match[3] }] : [];
|
|
203
|
-
})
|
|
204
|
-
.flat();
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* It takes `N` dSYMs and returns `N` or more dSYMs. If a dSYM includes more than one arch slice,
|
|
208
|
-
* it will be thinned by extracting each arch to a new dSYM in `output`.
|
|
209
|
-
*/
|
|
210
|
-
processDsyms(dsyms, output) {
|
|
211
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
-
yield fs_1.promises.mkdir(output, { recursive: true });
|
|
213
|
-
const results = yield Promise.all(dsyms.map((dsym) => __awaiter(this, void 0, void 0, function* () {
|
|
214
|
-
// Reduce dSYMs size by extracting single UUIDs and arch slices from fat dSYMs to separate
|
|
215
|
-
// single-arch dSYMs in intermediate location. This is to avoid exceeding intake limit whenever possible.
|
|
216
|
-
return dsym.dwarf.length > 1 ? this.thinDsym(dsym, output) : [dsym];
|
|
217
|
-
})));
|
|
218
|
-
return results.flat();
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* It takes fat dSYM as input and returns multiple dSYMs by extracting **each arch**
|
|
223
|
-
* to separate dSYM file. New files are saved to `output` and named by their object uuid (`<uuid>.dSYM`).
|
|
224
|
-
*
|
|
225
|
-
* For example, given `<source path>/Foo.dSYM/Contents/Resources/DWARF/Foo` dSYM with two arch slices: `arm64` (uuid1)
|
|
226
|
-
* and `x86_64` (uuid2), it will:
|
|
227
|
-
* - create `<intermediate path>/<uuid1>.dSYM/Contents/Resources/DWARF/Foo` for `arm64`,
|
|
228
|
-
* - create `<intermediate path>/<uuid2>.dSYM/Contents/Resources/DWARF/Foo` for `x86_64`.
|
|
229
|
-
*/
|
|
230
|
-
thinDsym(dsym, output) {
|
|
231
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
-
const results = yield Promise.all(dsym.dwarf.map((dwarf) => __awaiter(this, void 0, void 0, function* () {
|
|
233
|
-
try {
|
|
234
|
-
const bundle = (0, utils_1.buildPath)(output, `${dwarf.uuid}.dSYM`);
|
|
235
|
-
const object = (0, utils_1.buildPath)(bundle, upath_1.default.relative(dsym.bundle, dwarf.object));
|
|
236
|
-
yield fs_1.promises.mkdir(upath_1.default.dirname(object), { recursive: true });
|
|
237
|
-
try {
|
|
238
|
-
// Attempt to extract the single arch object file.
|
|
239
|
-
// We could use the `lipo -archs` command to get the list of archs,
|
|
240
|
-
// but it's more straightforward to just attempt to extract
|
|
241
|
-
// the single arch.
|
|
242
|
-
yield (0, utils_2.executeLipo)(dwarf.object, dwarf.arch, object);
|
|
243
|
-
}
|
|
244
|
-
catch (_a) {
|
|
245
|
-
// The thinning using `lipo` failed, meaning the dSYM is already
|
|
246
|
-
// a single arch dSYM. Copy the object file to the new dSYM.
|
|
247
|
-
yield fs_1.promises.copyFile(dwarf.object, object);
|
|
248
|
-
}
|
|
249
|
-
yield this.copyInfoPlist(dsym.bundle, bundle);
|
|
250
|
-
return [{ bundle, dwarf: [Object.assign(Object.assign({}, dwarf), { object })] }];
|
|
251
|
-
}
|
|
252
|
-
catch (error) {
|
|
253
|
-
this.context.stdout.write((0, renderer_1.renderDSYMSlimmingFailure)(dsym, dwarf, error));
|
|
254
|
-
return [];
|
|
255
|
-
}
|
|
256
|
-
})));
|
|
257
|
-
return results.flat();
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
copyInfoPlist(src, dst) {
|
|
261
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
const infoPlistPaths = (0, glob_1.globSync)((0, utils_1.buildPath)(src, '**/Info.plist'));
|
|
263
|
-
if (infoPlistPaths.length === 0) {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
const infoPlistPath = infoPlistPaths[0];
|
|
267
|
-
const newInfoPlistPath = (0, utils_1.buildPath)(dst, upath_1.default.relative(src, infoPlistPath));
|
|
268
|
-
yield fs_1.promises.mkdir(upath_1.default.dirname(newInfoPlistPath), { recursive: true });
|
|
269
|
-
yield fs_1.promises.copyFile(infoPlistPath, newInfoPlistPath);
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
compressDsyms(dsyms, output) {
|
|
273
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
-
yield fs_1.promises.mkdir(output, { recursive: true });
|
|
275
|
-
return Promise.all(dsyms.map((dsym) => __awaiter(this, void 0, void 0, function* () {
|
|
276
|
-
const archivePath = (0, utils_1.buildPath)(output, `${dsym.dwarf[0].uuid}.zip`);
|
|
277
|
-
yield (0, utils_2.zipDirectoryToArchive)(dsym.bundle, archivePath);
|
|
278
|
-
return new interfaces_1.CompressedDsym(archivePath, dsym);
|
|
279
|
-
})));
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
createRequestBuilder() {
|
|
283
|
-
if (!this.config.apiKey) {
|
|
284
|
-
throw new errors_1.InvalidConfigurationError(`Missing ${chalk_1.default.bold('DATADOG_API_KEY')} or ${chalk_1.default.bold('DD_API_KEY')} in your environment.`);
|
|
285
|
-
}
|
|
286
|
-
return (0, utils_1.getRequestBuilder)({
|
|
287
|
-
apiKey: this.config.apiKey,
|
|
288
|
-
baseUrl: (0, utils_2.getBaseIntakeUrl)(this.config.datadogSite),
|
|
289
|
-
headers: new Map([
|
|
290
|
-
['DD-EVP-ORIGIN', 'datadog-ci_dsyms'],
|
|
291
|
-
['DD-EVP-ORIGIN-VERSION', this.cliVersion],
|
|
292
|
-
]),
|
|
293
|
-
overrideUrl: 'api/v2/srcmap',
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
createUploadFunction(requestBuilder, metricsLogger, apiKeyValidator) {
|
|
297
|
-
return (dsym) => __awaiter(this, void 0, void 0, function* () {
|
|
298
|
-
const payload = dsym.asMultipartPayload();
|
|
299
|
-
if (this.dryRun) {
|
|
300
|
-
this.context.stdout.write(`[DRYRUN] ${(0, renderer_1.renderUpload)(dsym)}`);
|
|
301
|
-
return upload_1.UploadStatus.Success;
|
|
302
|
-
}
|
|
303
|
-
return (0, upload_1.upload)(requestBuilder)(payload, {
|
|
304
|
-
apiKeyValidator,
|
|
305
|
-
onError: (e) => {
|
|
306
|
-
this.context.stdout.write((0, renderer_1.renderFailedUpload)(dsym, e.message));
|
|
307
|
-
metricsLogger.logger.increment('failed', 1);
|
|
308
|
-
},
|
|
309
|
-
onRetry: (e, attempts) => {
|
|
310
|
-
this.context.stdout.write((0, renderer_1.renderRetriedUpload)(dsym, e.message, attempts));
|
|
311
|
-
metricsLogger.logger.increment('retries', 1);
|
|
312
|
-
},
|
|
313
|
-
onUpload: () => {
|
|
314
|
-
this.context.stdout.write((0, renderer_1.renderUpload)(dsym));
|
|
315
|
-
},
|
|
316
|
-
retries: 5,
|
|
317
|
-
});
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
exports.DsymsUploadCommand = DsymsUploadCommand;
|
|
322
|
-
DsymsUploadCommand.paths = [['dsyms', 'upload']];
|
|
323
|
-
DsymsUploadCommand.usage = clipanion_1.Command.Usage({
|
|
324
|
-
category: 'RUM',
|
|
325
|
-
description: 'Upload dSYM files to Datadog.',
|
|
326
|
-
details: `
|
|
327
|
-
This command will upload all dSYM files to Datadog in order to symbolicate crash reports received by Datadog.\n
|
|
328
|
-
See README for details.
|
|
329
|
-
`,
|
|
330
|
-
examples: [
|
|
331
|
-
['Upload all dSYM files in Derived Data path', 'datadog-ci dsyms upload ~/Library/Developer/Xcode/DerivedData'],
|
|
332
|
-
[
|
|
333
|
-
'Upload all dSYM files in a zip file (this is usually the case if your app has Bitcode enabled)',
|
|
334
|
-
'datadog-ci dsyms upload /path/to/folder/my_file.zip',
|
|
335
|
-
],
|
|
336
|
-
],
|
|
337
|
-
});
|
|
338
|
-
//# sourceMappingURL=upload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../src/commands/dsyms/upload.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA2B;AAE3B,8DAAoD;AACpD,kEAA0F;AAC1F,oEAA2F;AAC3F,8EAAiF;AACjF,8DAA8D;AAC9D,oEAAiF;AACjF,gEAAgE;AAChE,gEAA8D;AAE9D,sEAAwF;AACxF,oEAA4E;AAC5E,kEAAwH;AACxH,wFAA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W,EAAE,+BAA+B;IAC5C,OAAO,EAAE;;;KAGR;IACD,QAAQ,EAAE;QACR,CAAC,4CAA4C,EAAE,+DAA+D,CAAC;QAC/G;YACE,gGAAgG;YAChG,qDAAqD;SACtD;KACF;CACF,CAAC,AAdiB,CAcjB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const isZipFile: (filepath: string) => Promise<boolean>;
|
|
2
|
-
export declare const createUniqueTmpDirectory: () => Promise<string>;
|
|
3
|
-
export declare const deleteDirectory: (directoryPath: string) => Promise<void>;
|
|
4
|
-
export declare const zipDirectoryToArchive: (directoryPath: string, archivePath: string) => Promise<void>;
|
|
5
|
-
export declare const unzipArchiveToDirectory: (archivePath: string, directoryPath: string) => Promise<void>;
|
|
6
|
-
export declare const executeDwarfdump: (dSYMPath: string) => Promise<{
|
|
7
|
-
stderr: string;
|
|
8
|
-
stdout: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const executeLipo: (objectPath: string, arch: string, newObjectPath: string) => Promise<{
|
|
11
|
-
stderr: string;
|
|
12
|
-
stdout: string;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const getBaseIntakeUrl: (datadogSite?: string) => string;
|
|
15
|
-
export declare const pluralize: (nb: number, singular: string, plural: string) => string;
|