Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(commands): use statusOnly provider resolution for several read-only commands #6063

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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