Skip to content

Commit

Permalink
fix(k8s): don't truncate container build logs
Browse files Browse the repository at this point in the history
The truncate was previously added to improve appearance in the fancy
logger, but we no longer use the fancy logger for verbose+ log levels.
  • Loading branch information
edvald committed Nov 29, 2019
1 parent 7f74a46 commit d31aa8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions garden-service/src/plugins/kubernetes/container/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ import { getRegistryHostname } from "../init"
import { getManifestFromRegistry } from "./util"
import { normalizeLocalRsyncPath } from "../../../util/fs"
import { getPortForward } from "../port-forward"
import chalk from "chalk"
import { Writable } from "stream"
import { LogLevel } from "../../../logger/log-node"
import { exec } from "../../../util/util"
import { exec, renderOutputStream } from "../../../util/util"

const dockerDaemonDeploymentName = "garden-docker-daemon"
const dockerDaemonContainerName = "docker-daemon"
Expand Down Expand Up @@ -187,7 +186,7 @@ const remoteBuild: BuildHandler = async (params) => {

stdout.on("error", () => {})
stdout.on("data", (line: Buffer) => {
statusLine.setState(chalk.gray(" → " + line.toString().slice(0, 80)))
statusLine.setState(renderOutputStream(line.toString()))
})

if (provider.config.buildMode === "cluster-docker") {
Expand Down
2 changes: 1 addition & 1 deletion garden-service/src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export async function sleep(msec) {
* Extracting to a separate function so that we can test output streams
*/
export function renderOutputStream(msg: string) {
return chalk.gray(" → " + msg.toString().slice(0, 80))
return chalk.gray(" → " + msg)
}

/**
Expand Down

0 comments on commit d31aa8e

Please sign in to comment.