@steve31415/baselib 2.4.1 → 2.4.3
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/deploy/deploy.js +8 -3
- package/dist/deploy/plan.js +2 -1
- package/package.json +1 -1
package/dist/deploy/deploy.js
CHANGED
|
@@ -209,7 +209,10 @@ export async function runDeploy(options) {
|
|
|
209
209
|
await evidence.save(`gate-${index}.log`, result.stdout + result.stderr);
|
|
210
210
|
timer.record(`gate:${gate}`, Date.now() - gateStart);
|
|
211
211
|
if (result.code !== 0) {
|
|
212
|
-
|
|
212
|
+
// Quote the tail of BOTH streams: test runners put the failing spec on
|
|
213
|
+
// stdout and only build/server noise on stderr, so stderr alone can
|
|
214
|
+
// hide which test failed. stderr last, so it survives the cut.
|
|
215
|
+
const tail = [result.stdout.trim(), result.stderr.trim()].filter(Boolean).join('\n').slice(-1500);
|
|
213
216
|
throw new Error(`gate failed: ${gate}\n${tail}`);
|
|
214
217
|
}
|
|
215
218
|
log(`gate passed: ${gate}`);
|
|
@@ -397,9 +400,11 @@ export async function runDeploy(options) {
|
|
|
397
400
|
})),
|
|
398
401
|
timingsMs: timer.timings,
|
|
399
402
|
});
|
|
400
|
-
if (hold
|
|
403
|
+
if (hold) {
|
|
404
|
+
// A successful deploy clears any hold: either a different SHA shipped
|
|
405
|
+
// (the fix landed) or the operator deliberately overrode the hold.
|
|
401
406
|
await clearHold(runner, holdUri);
|
|
402
|
-
log('cleared rollback hold
|
|
407
|
+
log('cleared rollback hold');
|
|
403
408
|
}
|
|
404
409
|
log(`deployed ${sha.slice(0, 12)} (${record})`);
|
|
405
410
|
log(`timings:\n${timer.table()}`);
|
package/dist/deploy/plan.js
CHANGED
|
@@ -141,7 +141,8 @@ export function releaseEntriesFrom(rows, prefix) {
|
|
|
141
141
|
return [];
|
|
142
142
|
return rows.flatMap((row) => {
|
|
143
143
|
const r = row;
|
|
144
|
-
|
|
144
|
+
// `gcloud storage ls --json` appends `#<generation>` to object URLs.
|
|
145
|
+
const url = (r.url ?? '').replace(/#\d+$/, '');
|
|
145
146
|
const name = url.slice(url.lastIndexOf('/') + 1);
|
|
146
147
|
const sha = name.endsWith('.json') ? name.slice(0, -5) : '';
|
|
147
148
|
if (!SHA40.test(sha) || !url.includes(prefix))
|
package/package.json
CHANGED