Skip to content

Commit

Permalink
fix: print action version in logs while status check (#6257)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev authored Jul 5, 2024
1 parent 7bc1512 commit 42e046b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
14 changes: 6 additions & 8 deletions core/src/actions/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,26 @@
*/

import titleize from "titleize"
import type { ConfigGraph, GetActionOpts, ResolvedConfigGraph } from "../graph/config-graph.js"
import type { ConfigGraph, GetActionOpts, PickTypeByKind, ResolvedConfigGraph } from "../graph/config-graph.js"
import type { ActionReference, DeepPrimitiveMap } from "../config/common.js"
import {
createSchema,
includeGuideLink,
joi,
joiArray,
joiIdentifier,
joiRepositoryUrl,
joiSparseArray,
joiUserIdentifier,
joiVarfile,
joiVariables,
parseActionReference,
createSchema,
unusedApiVersionSchema,
joiArray,
joiVarfile,
} from "../config/common.js"
import { DOCS_BASE_URL } from "../constants.js"
import { dedent, naturalList, stableStringify } from "../util/string.js"
import type { ModuleVersion, TreeVersion, ActionVersion } from "../vcs/vcs.js"
import { getActionSourcePath } from "../vcs/vcs.js"
import { hashStrings, versionStringPrefix } from "../vcs/vcs.js"
import type { ActionVersion, ModuleVersion, TreeVersion } from "../vcs/vcs.js"
import { getActionSourcePath, hashStrings, versionStringPrefix } from "../vcs/vcs.js"
import type { BuildAction, ResolvedBuildAction } from "./build.js"
import type { ActionKind } from "../plugin/action-types.js"
import pathIsInside from "path-is-inside"
Expand Down Expand Up @@ -58,7 +57,6 @@ import type {
} from "./types.js"
import { actionKinds, actionStateTypes } from "./types.js"
import { baseInternalFieldsSchema, varfileDescription } from "../config/base.js"
import type { PickTypeByKind } from "../graph/config-graph.js"
import type { DeployAction } from "./deploy.js"
import type { TestAction } from "./test.js"
import type { RunAction } from "./run.js"
Expand Down
5 changes: 4 additions & 1 deletion core/src/tasks/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ interface TaskEvents<O extends ValidResultType> {
processed: TaskEventPayload<O>
ready: { result: O }
}

@Profile()
export abstract class BaseTask<O extends ValidResultType = ValidResultType> extends TypedEventEmitter<TaskEvents<O>> {
abstract readonly type: string
Expand Down Expand Up @@ -472,7 +473,9 @@ export function logAndEmitGetStatusEvents<
const styledName = styles.highlight(this.action.name)
const logStrings = actionLogStrings[this.action.kind]

log.info(`Getting status for ${this.action.kind} ${styledName} (type ${styles.highlight(this.action.type)})...`)
log.info(
`Getting status for ${this.action.kind} ${styledName} (type ${styles.highlight(this.action.type)}) at version ${this.action.versionString()}...`
)

// First we emit the "getting-status" event
this.garden.events.emit(
Expand Down

0 comments on commit 42e046b

Please sign in to comment.