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

[Bug]: Custom Commands Not Working #6362

Closed
haljac opened this issue Aug 8, 2024 · 2 comments
Closed

[Bug]: Custom Commands Not Working #6362

haljac opened this issue Aug 8, 2024 · 2 comments
Labels

Comments

@haljac
Copy link

haljac commented Aug 8, 2024

Bug

The below custom command is directly taken from the documentation (https://docs.garden.io/advanced/custom-commands):

kind: Command
name: api-dev
description:
  short: Start garden with preconfigured options for API development
exec:
  command:
    - sh
    - -c
    - git submodule update --recursive --remote  # Because we keep forgetting to update these, amirite?
gardenCommand:
  - deploy
  - --sync
  - api,worker
  - --log-level
  - debug
  - $concat: ${args.$all}  # Allow any arguments/options on top of the fixed ones above

Placing this in commands.garden.yml in the project root directory and running api-dev in the garden console produces the following error:

┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ Running api-dev command... ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
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%20Missing%20cli%20argument%20in%20custom%20command%20wrapper.

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

Error: Missing cli argument in custom command wrapper.
    at CustomCommandWrapper.action (file:///Users/jackhall/Library/Application%20Support/io.garden.garden/1718885103-PRoGXub.r/rollup/garden.mjs:430730:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///Users/jackhall/Library/Application%20Support/io.garden.garden/1718885103-PRoGXub.r/rollup/garden.mjs:366623:30
    at async file:///Users/jackhall/Library/Application%20Support/io.garden.garden/1718885103-PRoGXub.r/rollup/garden.mjs:366411:20

Your environment

  • OS: MacOS
  • How I'm running Kubernetes: GKE
    Garden version: 0.13.31
@haljac haljac added the bug label Aug 8, 2024
@eysi09
Copy link
Collaborator

eysi09 commented Aug 9, 2024

Can you try on the latest Garden version (you an update with garden self-update)?

We recently released a fix related to custom commands: #6341

cc @thsig in case you have more context.

@10ko 10ko closed this as completed Aug 13, 2024
@haljac
Copy link
Author

haljac commented Aug 15, 2024

Thanks. Coming back to this now. I will give it a try.

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

No branches or pull requests

3 participants