diff --git a/garden-service/src/logger/log-entry.ts b/garden-service/src/logger/log-entry.ts index 974c012c1c..38540d785c 100644 --- a/garden-service/src/logger/log-entry.ts +++ b/garden-service/src/logger/log-entry.ts @@ -30,7 +30,7 @@ export interface UpdateOpts { showDuration?: boolean error?: GardenError status?: EntryStatus - indentationLevel?: number + indent?: number } export interface CreateOpts extends UpdateOpts { @@ -103,12 +103,12 @@ export class LogEntry extends LogNode { createNode(level: LogLevel, parent: LogNode, param?: CreateParam) { // Empty entries inherit their parent's indentation level - let { indentationLevel } = this.opts + let { indent } = this.opts if (param) { - indentationLevel = (indentationLevel || 0) + 1 + indent = (indent || 0) + 1 } const opts = { - indentationLevel, + indent, ...resolveParam(param), } return new LogEntry({ level, opts, parent }) diff --git a/garden-service/src/logger/renderers.ts b/garden-service/src/logger/renderers.ts index 51768896c0..0d23b55a3e 100644 --- a/garden-service/src/logger/renderers.ts +++ b/garden-service/src/logger/renderers.ts @@ -72,7 +72,7 @@ export function printEmoji(emoji: EmojiName) { /*** RENDERERS ***/ export function leftPad(entry: LogEntry): string { - return padStart("", (entry.opts.indentationLevel || 0) * 3) + return padStart("", (entry.opts.indent || 0) * 3) } export function renderEmoji(entry: LogEntry): string { diff --git a/garden-service/src/plugins/kubernetes/init.ts b/garden-service/src/plugins/kubernetes/init.ts index da0a4ae3e1..ec36913a62 100644 --- a/garden-service/src/plugins/kubernetes/init.ts +++ b/garden-service/src/plugins/kubernetes/init.ts @@ -152,6 +152,8 @@ export async function cleanupEnvironment({ ctx, logEntry }: CleanupEnvironmentPa throw new NotFoundError(err, { namespace, availableNamespaces }) } + entry && entry.setSuccess() + await logout({ ctx, logEntry }) // Wait until namespace has been deleted diff --git a/garden-service/test/src/logger.ts b/garden-service/test/src/logger.ts index 09bb0532f2..12edc538bd 100644 --- a/garden-service/test/src/logger.ts +++ b/garden-service/test/src/logger.ts @@ -192,10 +192,10 @@ describe("LogEntry", () => { const deepDeepNested = deepNested.info("deep deep inside") const deepDeepEmpty = deepDeepNested.info() const indentations = [ - nested.opts.indentationLevel, - deepNested.opts.indentationLevel, - deepDeepNested.opts.indentationLevel, - deepDeepEmpty.opts.indentationLevel, + nested.opts.indent, + deepNested.opts.indent, + deepDeepNested.opts.indent, + deepDeepEmpty.opts.indent, ] expect(indentations).to.eql([1, 2, 3, 3]) })