Skip to content

Commit

Permalink
fix(commands): use statusOnly provider resolution for several read-on…
Browse files Browse the repository at this point in the history
…ly commands (#6063)
  • Loading branch information
twelvemo committed May 21, 2024
1 parent 2321ae8 commit c6bc3d7
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/src/commands/get/get-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class GetActionsCommand extends Command {
actionsFilter = [opts.kind + ".*"]
}

const graph = await garden.getResolvedConfigGraph({ log, emit: false, actionsFilter })
const graph = await garden.getResolvedConfigGraph({ log, emit: false, actionsFilter, statusOnly: true })

const kindOpt = opts["kind"]?.toLowerCase()
let actions: ResolvedActionWithState[] = []
Expand Down
2 changes: 1 addition & 1 deletion core/src/commands/get/get-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class GetFilesCommand extends Command<Args, Opts> {
}

async action({ garden, log, args }: CommandParams<Args, Opts>): Promise<CommandResult<Result>> {
const graph = await garden.getConfigGraph({ log, emit: false })
const graph = await garden.getConfigGraph({ log, emit: false, statusOnly: true })
const actions = graph.getActions({ refs: args.keys?.length ? args.keys : undefined })

const result = fromPairs(
Expand Down
2 changes: 1 addition & 1 deletion core/src/commands/get/get-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class GetGraphCommand extends Command {
}

async action({ garden, log }: CommandParams): Promise<CommandResult<GraphOutput>> {
const graph = await garden.getConfigGraph({ log, emit: false })
const graph = await garden.getConfigGraph({ log, emit: false, statusOnly: true })
const renderedGraph = graph.render()
const output: GraphOutput = {
nodes: renderedGraph.nodes,
Expand Down
2 changes: 1 addition & 1 deletion core/src/commands/get/get-modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class GetModulesCommand extends Command {
actionsFilter = args.modules.map((name) => `build.${name}`)
}

const graph = await garden.getConfigGraph({ log, emit: false, actionsFilter })
const graph = await garden.getConfigGraph({ log, emit: false, actionsFilter, statusOnly: true })

const modules = sortBy(
graph.getModules({ names: args.modules, includeDisabled: !opts["exclude-disabled"] }),
Expand Down
2 changes: 1 addition & 1 deletion core/src/commands/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class LogsCommand extends Command<Args, Opts> {
}
}

const graph = await garden.getConfigGraph({ log, emit: false })
const graph = await garden.getConfigGraph({ log, emit: false, statusOnly: true })
const allDeploys = graph.getDeploys()
const actions = args.names ? allDeploys.filter((s) => args.names?.includes(s.name)) : allDeploys

Expand Down
2 changes: 1 addition & 1 deletion core/src/commands/update-remote/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export async function updateRemoteActions({
opts: ParameterValues<Opts>
}) {
const { actions: keys } = args
const graph = await garden.getConfigGraph({ log, emit: false })
const graph = await garden.getConfigGraph({ log, emit: false, statusOnly: true })
const actions = graph.getActions({ refs: keys })

const actionSources = <SourceConfig[]>actions
Expand Down
2 changes: 1 addition & 1 deletion core/src/commands/update-remote/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export async function updateRemoteModules({
opts: ParameterValues<Opts>
}) {
const { modules: moduleNames } = args
const graph = await garden.getConfigGraph({ log, emit: false })
const graph = await garden.getConfigGraph({ log, emit: false, statusOnly: true })
const modules = graph.getModules({ names: moduleNames })

const moduleSources = <SourceConfig[]>modules
Expand Down
2 changes: 1 addition & 1 deletion core/src/commands/util/profile-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ProfileProjectCommand extends Command {
}

async action({ garden, log }: CommandParams): Promise<CommandResult> {
const graph = await garden.getConfigGraph({ log, emit: false })
const graph = await garden.getConfigGraph({ log, emit: false, statusOnly: true })
summarizeGraph(log, garden, graph)

log.info(renderDivider())
Expand Down

0 comments on commit c6bc3d7

Please sign in to comment.