Skip to content

Commit 0e95bb2

Browse files
committed
fix(cli): keep docker login output out of build logs
The registry login step's output was collected into the shared build log buffer, so build logs on self-hosted and local builds always carried docker's unencrypted-credentials warning — most confusingly right next to the real error on failed builds. Route login output to debug logging only, push a single 'Logged in to <registry>' marker into the build log on success, and keep returning the full login output when the login itself fails.
1 parent 83af2d2 commit 0e95bb2

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

.changeset/dry-mirrors-shake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Registry login output no longer appears in build logs on self-hosted and local builds — most notably docker's credential-storage warning next to real errors on failed builds. A single "Logged in to <registry>" line is kept, and the full login output remains available at debug log level.

packages/cli-v3/src/deploy/buildImage.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,19 +514,24 @@ async function localBuildImage(options: SelfHostedBuildImageOptions): Promise<Bu
514514
loginProcess.process?.stdin?.write(credentials.password);
515515
loginProcess.process?.stdin?.end();
516516

517+
// Login output (incl. docker's credential-storage warning) stays out of the build
518+
// logs; it is fully visible at debug level and returned when the login itself fails.
519+
const loginLogs: string[] = [];
520+
517521
for await (const line of loginProcess) {
518-
errors.push(line);
522+
loginLogs.push(line);
519523
logger.debug(line);
520524
}
521525

522526
if (loginProcess.exitCode !== 0) {
523527
return {
524528
ok: false as const,
525529
error: `Failed to login to registry: ${cloudRegistryHost}`,
526-
logs: extractLogs(errors),
530+
logs: extractLogs(loginLogs),
527531
};
528532
}
529533

534+
errors.push(`Logged in to ${cloudRegistryHost}`);
530535
options.onLog?.(`Successfully logged in to the remote registry`);
531536
}
532537

0 commit comments

Comments
 (0)