Skip to content

Commit

Permalink
Merge pull request #1368 from garden-io/truncated-logs
Browse files Browse the repository at this point in the history
fix(k8s): don't truncate container build logs
  • Loading branch information
eysi09 authored Dec 3, 2019
2 parents 629330f + 23f03af commit 7ad6365
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 7ad6365

Please sign in to comment.