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

0.13: [Bug]: --skip-dependencies is not working correctly with garden plugins pulumi preview command #6206

Closed
ishantagarwal-x213235 opened this issue Jun 21, 2024 · 4 comments · Fixed by #6226 or #6229
Assignees

Comments

@ishantagarwal-x213235
Copy link
Contributor

--skip-dependencies flag is not working as expected with garden plugins pulumi preview command. Ideally, it should ignore the dependencies and execute the module without any dependencies.

Command
garden plugins pulumi preview --env=dev -- gcs-iam-infra --skip-dependencies

Expected
Command should only preview the gcs-iam-infra module
Actual
It is looking for the dependencies of gcs-iam-infra and running pulumi preview command for it's dependencies first.

workstation:~/thx/workspace/infra/gcs-iam$ garden plugins pulumi preview --env=dev -- gcs-iam-infra --skip-dependencies
Plugins

ℹ garden → Initializing...
Project is configured with apiVersion: garden.io/v0, running with backwards compatibility.
⚠ garden-cloud → You are not logged in. To use Garden Cloud, log in with the garden login command.
ℹ garden → Running in environment dev.default
Running pulumi preview for actions thx-gcs-iam-infra

ℹ providers → Resolving providers...
ℹ pulumi → Configuring provider...
✔ pulumi → Provider configured
✔ pulumi → Provider status cached
✔ providers → Finished resolving providers (took 0 sec)
ℹ providers → All provider statuses were cached. Run with --force-refresh to force a refresh of provider statuses.
ℹ providers → Resolving providers...
ℹ exec → Configuring provider...
✔ exec → Provider configured
✔ exec → Provider status cached
✔ providers → Finished resolving providers (took 0 sec)
ℹ providers → All provider statuses were cached. Run with --force-refresh to force a refresh of provider statuses.
ℹ graph → Resolving actions and modules...
✔ graph → Finished resolving graph (took 0.7 sec)
ℹ garden → Finished initializing Garden (took 2.2 sec)

ℹ deploy.enable-api-infra → Running pulumi preview
✖ deploy.enable-api-infra → Failed (took 30.3 sec)
ℹ deploy.networking-infra → Aborting because upstream dependency failed.
ℹ deploy.gcs-iam-infra → Aborting because upstream dependency failed.
✖ deploy.enable-api-infra → Failed processing Deploy type=pulumi name=enable-api-infra (from module enable-api-infra) (took 30.35 sec). This is what happened:

Render Template

kind: RenderTemplate
template: infrastructure-module-template
name: gcs-iam
inputs:
  dependencies: [networking-infra] 

ConfigTemplate

kind: ConfigTemplate
name: infrastructure-module-template
inputsSchemaPath: rest.schema.json
modules:
  - type: pulumi
    name: ${parent.name}-infra 
    description: common to all infrastructure deployments
    stack: "${environment.name}"

    createStack: true
    cacheStatus: false
    allowDestroy: true
    autoApply: true
    deployFromPreview: false
    dependencies: ${inputs.dependencies}


    pulumiVarfiles: 
      - "../global.yaml"
      - "config/common.yaml"
      - "config/${environment.name}.yaml"

    build:
      dependencies: ["${parent.name}-package"]

    exclude: ["${parent.name}"]

garden version 0.13.31

@ishantagarwal-x213235 ishantagarwal-x213235 changed the title 0.13: [Bug]: Describe here 0.13: [Bug]: --skip-dependencies is not working correctly with garden plugins pulumi preview command Jun 21, 2024
@vvagaytsev vvagaytsev self-assigned this Jun 25, 2024
@vvagaytsev
Copy link
Collaborator

@ishantagarwal-x213235 the fix is now available in the edge-bonsai release. Feel free to try it out. Please let us now if the fix works, and feel free to re-open this issue of the problem persists.

@ishantagarwal-x213235
Copy link
Contributor Author

Thanks @vvagaytsev , for addressing it.

I downloaded edge-bonsai release but it's not working as expected yet. Now, the issue is different which seems like Graph Results Object needed a dependencies that does not populating

Please find the below logs and let me know if require in the format of silly format.

✔ exec → Provider status cached
✔ providers → Finished resolving providers (took 0 sec)
ℹ providers → All provider statuses were cached. Run with --force-refresh to force a refresh of provider statuses.
ℹ graph → Resolving actions and modules...
✔ graph → Finished resolving graph (took 0.3 sec)
ℹ garden → Finished initializing Garden (took 0.9 sec)

ℹ deploy.thx-gcs-iam-infra → Running pulumi preview
✖ deploy.thx-gcs-iam-infra → Failed processing Deploy type=pulumi name=thx-gcs-iam-infra (from module thx-gcs-iam-infra) (took 0.03 sec). This is what happened:

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Encountered an unexpected Garden error. This is likely a bug 🍂

You can help by reporting this on GitHub: https://github.com/garden-io/garden/issues/new?labels=bug,crash&template=CRASH.md&title=Crash%3A%20GraphResults%20object%20does%20not%20have%20task%20resolve-action.deploy.thx-gcs-i...

Please attach the following information to the bug report after making sure that the error message does not contain sensitive information:

Failed processing Deploy type=pulumi name=thx-gcs-iam-infra (from module thx-gcs-iam-infra) (took 0.03 sec). This is what happened:
Error: GraphResults object does not have task resolve-action.deploy.thx-gcs-iam-infra. Available keys: []
at GraphResults.checkKey (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:797226:19)
at GraphResults.getResult (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:797191:14)
at PulumiPluginCommandTask.getResolvedAction (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:369123:42)
at PulumiPluginCommandTask.process (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/index-DisvwPve.mjs:4190:26)
at ProcessTaskNode.execute (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:797545:51)
at GraphSolver.processNode (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:797909:46)
at GraphSolver.loop (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:797872:22)
at GraphSolver. (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:797676:18)
at EventEmitter.emit (file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:226266:20)
at file:///home/workstation/.local/share/garden/1719321134-GkFmceD.r/rollup/garden.mjs:797874:26
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Failed to Deploy type=pulumi name=thx-gcs-iam-infra (from module thx-gcs-iam-infra): Error: Deploy type=pulumi name=thx-gcs-iam-infra (from module thx-gcs-iam-infra) failed: Error: GraphResults object does not have task resolve-action.deploy.thx-gcs-iam-infra. Available keys: []

@vvagaytsev
Copy link
Collaborator

@ishantagarwal-x213235 thanks for the quick testing! I'm re-opening this for further investigation.

@vvagaytsev
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants