bulletin-deploy 0.7.10 → 0.7.11-rc.2
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/dist/bug-report.js +4 -4
- package/dist/{chunk-PGCTJF2J.js → chunk-5CLZQA7J.js} +3 -3
- package/dist/{chunk-B2MLOHKF.js → chunk-JS54GLCG.js} +1 -1
- package/dist/{chunk-E2ZOGJ5R.js → chunk-NEVV3FCX.js} +2 -2
- package/dist/{chunk-DFD2WF67.js → chunk-O56TCT3R.js} +1 -1
- package/dist/{chunk-TOFKHL4S.js → chunk-P7IBAWMN.js} +1 -1
- package/dist/{chunk-IXUFM7P6.js → chunk-X7VEHFJA.js} +62 -3
- package/dist/deploy.js +6 -6
- package/dist/dotns.js +3 -3
- package/dist/index.js +6 -6
- package/dist/memory-report.js +2 -2
- package/dist/run-state.js +1 -1
- package/dist/telemetry.d.ts +5 -1
- package/dist/telemetry.js +8 -2
- package/dist/version-check.js +3 -3
- package/package.json +1 -1
package/dist/bug-report.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
offerBugReport,
|
|
10
10
|
scrubSecrets,
|
|
11
11
|
setDeployContext
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-NEVV3FCX.js";
|
|
13
|
+
import "./chunk-O56TCT3R.js";
|
|
14
|
+
import "./chunk-X7VEHFJA.js";
|
|
15
|
+
import "./chunk-JS54GLCG.js";
|
|
16
16
|
import "./chunk-QGM4M3NI.js";
|
|
17
17
|
export {
|
|
18
18
|
buildCliFlagsSummary,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setDeployContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NEVV3FCX.js";
|
|
4
4
|
import {
|
|
5
5
|
DotNS,
|
|
6
6
|
TX_TIMEOUT_MS,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
parseDomainName,
|
|
9
9
|
popStatusName,
|
|
10
10
|
verifyNonceAdvanced
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-P7IBAWMN.js";
|
|
12
12
|
import {
|
|
13
13
|
MirrorSkipped,
|
|
14
14
|
mirrorToGitHubPages,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
truncateAddress,
|
|
28
28
|
withDeploySpan,
|
|
29
29
|
withSpan
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-X7VEHFJA.js";
|
|
31
31
|
import {
|
|
32
32
|
merkleizeJS
|
|
33
33
|
} from "./chunk-B7GUYYAN.js";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
classifyErrorArea,
|
|
3
3
|
isInteractive,
|
|
4
4
|
promptYesNo
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O56TCT3R.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
getCurrentSentryTraceId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X7VEHFJA.js";
|
|
10
10
|
|
|
11
11
|
// src/bug-report.ts
|
|
12
12
|
import { execSync, execFileSync } from "child_process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default,
|
|
3
3
|
writeRunState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JS54GLCG.js";
|
|
5
5
|
|
|
6
6
|
// src/memory-report.ts
|
|
7
7
|
import * as fs2 from "fs";
|
|
@@ -214,7 +214,29 @@ function getDeployAttributes(domain) {
|
|
|
214
214
|
return attrs;
|
|
215
215
|
}
|
|
216
216
|
function isExpectedError(msg) {
|
|
217
|
-
return /personhood|owned by|owner mismatch|reserved for original|invalid domain label|not authorized for bulletin|insufficient balance|quota exhausted|insufficient .* authorization/i.test(msg);
|
|
217
|
+
return /personhood|owned by|owner mismatch|reserved for original|invalid domain label|not authorized for bulletin|insufficient balance|insufficient funds|quota exhausted|insufficient .* authorization|bip39 mnemonic|ipfs cli not installed|base name is \d+ chars|NameNotAvailable|name must be lowercase/i.test(msg);
|
|
218
|
+
}
|
|
219
|
+
function classifyDeployError(msg) {
|
|
220
|
+
if (isExpectedError(msg)) return "user";
|
|
221
|
+
if (/chunk.*failed after.*retr|tx dropped from best chain|timed out after \d+s waiting for block|Contract reverted|Contract execution would revert|dotns register failed|All promises were rejected|"type"\s*:\s*"Invalid"|Commitment still too new/i.test(msg)) return "environment";
|
|
222
|
+
if (/javascript heap out of memory|allocation failed.*heap|External signer mode is not supported with dotns-cli/i.test(msg)) return "internal";
|
|
223
|
+
return "unknown";
|
|
224
|
+
}
|
|
225
|
+
function classifySadReason(message) {
|
|
226
|
+
if (/process terminated: SIG/i.test(message)) return "killed";
|
|
227
|
+
if (/memory threshold/i.test(message)) return "memory";
|
|
228
|
+
if (/spektr injection|account map failed/i.test(message)) return "signer";
|
|
229
|
+
if (/chunk upload failed|chunk retry failed/i.test(message)) return "chain_storage";
|
|
230
|
+
if (/websocket connection lost|rpc.*endpoint failed|rpc failover/i.test(message)) return "rpc";
|
|
231
|
+
return "other";
|
|
232
|
+
}
|
|
233
|
+
function computeDeployOutcome(errorCategory, isSad, sadReason) {
|
|
234
|
+
if (errorCategory === "user") return "user_error";
|
|
235
|
+
if (errorCategory === "environment") return "env_error";
|
|
236
|
+
if (errorCategory === "internal") return "internal_error";
|
|
237
|
+
if (errorCategory === "unknown") return "unknown_error";
|
|
238
|
+
if (isSad) return `sad_${sadReason}`;
|
|
239
|
+
return "clean";
|
|
218
240
|
}
|
|
219
241
|
async function withSpan(op, description, attributes, fn) {
|
|
220
242
|
if (!Sentry) return fn();
|
|
@@ -232,6 +254,18 @@ var memoryPeak = null;
|
|
|
232
254
|
var deployRootSpan = null;
|
|
233
255
|
var stageSamples = {};
|
|
234
256
|
var reportContext = {};
|
|
257
|
+
var currentErrorCategory = null;
|
|
258
|
+
var currentDeploySad = false;
|
|
259
|
+
var currentSadReason = "other";
|
|
260
|
+
var currentSadReasonPriority = 0;
|
|
261
|
+
var SAD_REASON_PRIORITY = {
|
|
262
|
+
killed: 5,
|
|
263
|
+
memory: 4,
|
|
264
|
+
signer: 3,
|
|
265
|
+
chain_storage: 2,
|
|
266
|
+
rpc: 1,
|
|
267
|
+
other: 0
|
|
268
|
+
};
|
|
235
269
|
function toMb(bytes) {
|
|
236
270
|
return Math.round(bytes / 1024 / 1024 * 100) / 100;
|
|
237
271
|
}
|
|
@@ -275,6 +309,10 @@ async function withDeploySpan(domain, fn) {
|
|
|
275
309
|
memoryPeak = { rss: m0.rss, heapUsed: m0.heapUsed, external: m0.external, arrayBuffers: m0.arrayBuffers };
|
|
276
310
|
stageSamples = {};
|
|
277
311
|
reportContext = {};
|
|
312
|
+
currentErrorCategory = null;
|
|
313
|
+
currentDeploySad = false;
|
|
314
|
+
currentSadReason = "other";
|
|
315
|
+
currentSadReasonPriority = 0;
|
|
278
316
|
const deployStartMs = Date.now();
|
|
279
317
|
try {
|
|
280
318
|
return await Sentry.startSpan({ op: "deploy", name: `deploy ${domain}`, attributes: attrs }, async (span) => {
|
|
@@ -299,7 +337,10 @@ async function withDeploySpan(domain, fn) {
|
|
|
299
337
|
} catch (error) {
|
|
300
338
|
const msg = error.message;
|
|
301
339
|
span.setAttribute("deploy.status", "error");
|
|
302
|
-
span.setAttribute("deploy.error", msg.slice(0,
|
|
340
|
+
span.setAttribute("deploy.error", msg.slice(0, 500));
|
|
341
|
+
const errorCategory = classifyDeployError(msg);
|
|
342
|
+
span.setAttribute("deploy.error_category", errorCategory);
|
|
343
|
+
currentErrorCategory = errorCategory;
|
|
303
344
|
const isExpected = isExpectedError(msg);
|
|
304
345
|
span.setAttribute("deploy.expected", isExpected ? "true" : "false");
|
|
305
346
|
span.setAttribute("deploy.sad", isExpected ? "false" : "true");
|
|
@@ -309,6 +350,10 @@ async function withDeploySpan(domain, fn) {
|
|
|
309
350
|
throw error;
|
|
310
351
|
} finally {
|
|
311
352
|
sampleMemory("end");
|
|
353
|
+
span.setAttribute(
|
|
354
|
+
"deploy.outcome",
|
|
355
|
+
computeDeployOutcome(currentErrorCategory, currentDeploySad, currentSadReason)
|
|
356
|
+
);
|
|
312
357
|
if (memoryPeak) {
|
|
313
358
|
try {
|
|
314
359
|
const report = maybeWriteMemoryReport({
|
|
@@ -354,6 +399,10 @@ async function withDeploySpan(domain, fn) {
|
|
|
354
399
|
deployRootSpan = null;
|
|
355
400
|
stageSamples = {};
|
|
356
401
|
reportContext = {};
|
|
402
|
+
currentErrorCategory = null;
|
|
403
|
+
currentDeploySad = false;
|
|
404
|
+
currentSadReason = "other";
|
|
405
|
+
currentSadReasonPriority = 0;
|
|
357
406
|
await Sentry.flush(5e3);
|
|
358
407
|
}
|
|
359
408
|
}
|
|
@@ -382,6 +431,13 @@ function captureWarning(message, context) {
|
|
|
382
431
|
Sentry.captureMessage(message, { level: "warning", extra: context });
|
|
383
432
|
const root = Sentry.getRootSpan(Sentry.getActiveSpan());
|
|
384
433
|
if (root) root.setAttribute("deploy.sad", "true");
|
|
434
|
+
const reason = classifySadReason(message);
|
|
435
|
+
const priority = SAD_REASON_PRIORITY[reason] ?? 0;
|
|
436
|
+
if (priority >= currentSadReasonPriority) {
|
|
437
|
+
currentSadReason = reason;
|
|
438
|
+
currentSadReasonPriority = priority;
|
|
439
|
+
}
|
|
440
|
+
currentDeploySad = true;
|
|
385
441
|
} catch {
|
|
386
442
|
}
|
|
387
443
|
}
|
|
@@ -527,6 +583,9 @@ export {
|
|
|
527
583
|
resolveRunnerType,
|
|
528
584
|
getDeployAttributes,
|
|
529
585
|
isExpectedError,
|
|
586
|
+
classifyDeployError,
|
|
587
|
+
classifySadReason,
|
|
588
|
+
computeDeployOutcome,
|
|
530
589
|
withSpan,
|
|
531
590
|
sampleMemory,
|
|
532
591
|
withDeploySpan,
|
package/dist/deploy.js
CHANGED
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
storeChunkedContent,
|
|
27
27
|
storeDirectory,
|
|
28
28
|
storeFile
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-5CLZQA7J.js";
|
|
30
|
+
import "./chunk-NEVV3FCX.js";
|
|
31
|
+
import "./chunk-O56TCT3R.js";
|
|
32
|
+
import "./chunk-P7IBAWMN.js";
|
|
33
33
|
import "./chunk-HOTQDYHD.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-X7VEHFJA.js";
|
|
35
|
+
import "./chunk-JS54GLCG.js";
|
|
36
36
|
import "./chunk-B7GUYYAN.js";
|
|
37
37
|
import "./chunk-RP4YJYNB.js";
|
|
38
38
|
import "./chunk-QGM4M3NI.js";
|
package/dist/dotns.js
CHANGED
|
@@ -35,9 +35,9 @@ import {
|
|
|
35
35
|
stripTrailingDigits,
|
|
36
36
|
validateDomainLabel,
|
|
37
37
|
verifyNonceAdvanced
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-P7IBAWMN.js";
|
|
39
|
+
import "./chunk-X7VEHFJA.js";
|
|
40
|
+
import "./chunk-JS54GLCG.js";
|
|
41
41
|
import "./chunk-RP4YJYNB.js";
|
|
42
42
|
import "./chunk-QGM4M3NI.js";
|
|
43
43
|
export {
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deploy
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5CLZQA7J.js";
|
|
4
|
+
import "./chunk-NEVV3FCX.js";
|
|
5
|
+
import "./chunk-O56TCT3R.js";
|
|
6
6
|
import {
|
|
7
7
|
DotNS,
|
|
8
8
|
parseDomainName
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-P7IBAWMN.js";
|
|
10
10
|
import "./chunk-HOTQDYHD.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-X7VEHFJA.js";
|
|
12
12
|
import {
|
|
13
13
|
VERSION,
|
|
14
14
|
loadRunState,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
shouldSkipStaleWarning,
|
|
19
19
|
stateFilePath,
|
|
20
20
|
writeRunState
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JS54GLCG.js";
|
|
22
22
|
import {
|
|
23
23
|
merkleizeJS
|
|
24
24
|
} from "./chunk-B7GUYYAN.js";
|
package/dist/memory-report.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
maybeWriteMemoryReport,
|
|
6
6
|
safeHeap,
|
|
7
7
|
sampleFromBytes
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-X7VEHFJA.js";
|
|
9
|
+
import "./chunk-JS54GLCG.js";
|
|
10
10
|
import "./chunk-QGM4M3NI.js";
|
|
11
11
|
export {
|
|
12
12
|
DEFAULT_THRESHOLD_MB,
|
package/dist/run-state.js
CHANGED
package/dist/telemetry.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ declare function resolveRunner(): string;
|
|
|
23
23
|
declare function resolveRunnerType(): string;
|
|
24
24
|
declare function getDeployAttributes(domain: string): Record<string, string | number | boolean | undefined>;
|
|
25
25
|
declare function isExpectedError(msg: string): boolean;
|
|
26
|
+
type DeployErrorCategory = 'user' | 'environment' | 'internal' | 'unknown';
|
|
27
|
+
declare function classifyDeployError(msg: string): DeployErrorCategory;
|
|
28
|
+
declare function classifySadReason(message: string): string;
|
|
29
|
+
declare function computeDeployOutcome(errorCategory: DeployErrorCategory | null, isSad: boolean, sadReason: string): string;
|
|
26
30
|
declare function withSpan<T>(op: string, description: string, attributes: Record<string, string | number | boolean | undefined>, fn: () => T | Promise<T>): Promise<T>;
|
|
27
31
|
declare function sampleMemory(stage: string): void;
|
|
28
32
|
declare function withDeploySpan<T>(domain: string, fn: () => T | Promise<T>): Promise<T>;
|
|
@@ -35,4 +39,4 @@ declare function setDeploySentryTag(key: string, value: string): void;
|
|
|
35
39
|
declare function captureWarning(message: string, context?: Record<string, unknown>): void;
|
|
36
40
|
declare function flush(): Promise<void>;
|
|
37
41
|
|
|
38
|
-
export { type InternalContextSignals, VERSION, captureWarning, closeTelemetry, flush, getCurrentSentryTraceId, getDeployAttributes, initTelemetry, isExpectedError, isInternalContext, isInternalContextFromSignals, markRelaunchOomHintShown, resolveRepo, resolveRunner, resolveRunnerType, sampleMemory, sanitizeBranch, sanitizeRepo, scrubPaths, setDeployAttribute, setDeployReportContext, setDeploySentryTag, setRunStateActive, truncateAddress, withDeploySpan, withSpan };
|
|
42
|
+
export { type DeployErrorCategory, type InternalContextSignals, VERSION, captureWarning, classifyDeployError, classifySadReason, closeTelemetry, computeDeployOutcome, flush, getCurrentSentryTraceId, getDeployAttributes, initTelemetry, isExpectedError, isInternalContext, isInternalContextFromSignals, markRelaunchOomHintShown, resolveRepo, resolveRunner, resolveRunnerType, sampleMemory, sanitizeBranch, sanitizeRepo, scrubPaths, setDeployAttribute, setDeployReportContext, setDeploySentryTag, setRunStateActive, truncateAddress, withDeploySpan, withSpan };
|
package/dist/telemetry.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION,
|
|
3
3
|
captureWarning,
|
|
4
|
+
classifyDeployError,
|
|
5
|
+
classifySadReason,
|
|
4
6
|
closeTelemetry,
|
|
7
|
+
computeDeployOutcome,
|
|
5
8
|
flush,
|
|
6
9
|
getCurrentSentryTraceId,
|
|
7
10
|
getDeployAttributes,
|
|
@@ -24,13 +27,16 @@ import {
|
|
|
24
27
|
truncateAddress,
|
|
25
28
|
withDeploySpan,
|
|
26
29
|
withSpan
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-X7VEHFJA.js";
|
|
31
|
+
import "./chunk-JS54GLCG.js";
|
|
29
32
|
import "./chunk-QGM4M3NI.js";
|
|
30
33
|
export {
|
|
31
34
|
VERSION,
|
|
32
35
|
captureWarning,
|
|
36
|
+
classifyDeployError,
|
|
37
|
+
classifySadReason,
|
|
33
38
|
closeTelemetry,
|
|
39
|
+
computeDeployOutcome,
|
|
34
40
|
flush,
|
|
35
41
|
getCurrentSentryTraceId,
|
|
36
42
|
getDeployAttributes,
|
package/dist/version-check.js
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
isPreReleaseVersion,
|
|
9
9
|
preReleaseWarning,
|
|
10
10
|
promptYesNo
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-O56TCT3R.js";
|
|
12
|
+
import "./chunk-X7VEHFJA.js";
|
|
13
|
+
import "./chunk-JS54GLCG.js";
|
|
14
14
|
import "./chunk-QGM4M3NI.js";
|
|
15
15
|
export {
|
|
16
16
|
assessVersion,
|