Skip to content

Commit

Permalink
fix(pulumi): fix dependency resolution when --skip-dependencies is …
Browse files Browse the repository at this point in the history
…on (#6229)

* fix(pulumi): fix process deps resolution

A follow-up fix for #6226.
It returns the current task itself if the deps as skipped.

* refactor: extract local var
  • Loading branch information
vvagaytsev authored Jun 25, 2024
1 parent 8d85a1a commit ece0119
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/pulumi/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ class PulumiPluginCommandTask extends PluginActionTask<PulumiDeploy, PulumiComma
* Override the base method to be sure that `garden plugins pulumi preview` happens in dependency order.
*/
override resolveProcessDependencies() {
const currentTask = this.getResolveTask(this.action)
if (this.skipRuntimeDependencies) {
return []
return [currentTask]
}

const pulumiDeployNames = this.graph
Expand All @@ -290,7 +291,7 @@ class PulumiPluginCommandTask extends PluginActionTask<PulumiDeploy, PulumiComma
})
.filter(isDeployAction)

const tasks = deps.map((action) => {
const depTasks = deps.map((action) => {
return new PulumiPluginCommandTask({
garden: this.garden,
graph: this.graph,
Expand All @@ -305,7 +306,7 @@ class PulumiPluginCommandTask extends PluginActionTask<PulumiDeploy, PulumiComma
})
})

return [this.getResolveTask(this.action), ...tasks]
return [currentTask, ...depTasks]
}

async getStatus() {
Expand Down

0 comments on commit ece0119

Please sign in to comment.