https://garden.io logo
#💻|dev
Title
# 💻|dev
b

big-spring-14945

05/04/2023, 12:49 PM
One problem we noticed in the morning is that the breaking change of the
garden run workflow
command (now
run-workflow
) can be quite confusing. E.g. with the following config,
run workflow
fails with a very cryptic error message, and
run-workflow
succeeds:
Copy code
kind: Project
name: repro
environments:
 - name: default
providers:
 - name: exec
   initScript: exit 1

---

kind: Workflow
name: test
steps:
  - script: echo FOO
    name: setup
a

ancient-diamond-80011

05/04/2023, 12:50 PM
b

big-spring-14945

05/04/2023, 12:51 PM
Also wrote in the self-empathy doc about it as it cost me a couple of hours to figure out together with anna and veeti: https://www.notion.so/gardendev/Self-Empathy-Session-0-13-8641930898f345019ab1cc63dcb930aa?pvs=4#9f4163c7337345dab4999c55149a19f7
The biggest problem here is that people will accidentally update to 0.13, once it's out, and we need to avoid cryptic messages like this if possible
a

ancient-diamond-80011

05/04/2023, 12:52 PM
we have a specific check and warning in case users are trying to do
garden run workflow
in bonsai, here at https://github.com/garden-io/garden/blob/f99db5321ce1eb0927b13b918b50c3a8f4aa0398/core/src/commands/run.ts#L211-L223 but the issue is that the check for it is below the getConfigGraph call here, which initializes providers https://github.com/garden-io/garden/blob/f99db5321ce1eb0927b13b918b50c3a8f4aa0398/core/src/commands/run.ts#L113
b

big-spring-14945

05/04/2023, 12:52 PM
I personally have to say that I dislike that most commands work with a space between words, and this command is with a dash. IMO this is a foot gun!
a

ancient-diamond-80011

05/04/2023, 12:53 PM
the big issue here is that in bonsai, we have a completely new action type which is also called
run
, and in bonsai,
garden run
is intended for those so there's a new, separate command
run-workflow
for those
b

big-spring-14945

05/04/2023, 12:54 PM
I know, still a foot gun 🙂 we need to find a solution for this IMO
a

ancient-diamond-80011

05/04/2023, 12:54 PM
yep, agreed! just spelling out the reason why it is like it is
b

big-spring-14945

05/04/2023, 12:54 PM
We could even disallow naming Runs "workflow" and continue using the "run workflow" command
s

swift-garage-61180

05/04/2023, 2:33 PM
I've been thinking that maybe we should call it
garden workflow
rather than
garden run-workflow
. Feels more consistent with the new CLI in general.
... and we should totally show a warning if you try to run a Run called
workflow
when none is found ("Note: The
garden run workflow
command has been renamed to
garden run-workflow
in 0.13").
Ah, just read the rest of the thread—Veeti had already addressed the part about detecting accidental invocations of
run workflow
in Bonsai
a

alert-helicopter-61082

05/04/2023, 6:32 PM
I think we need to-to some degree at least-accept that this is a footgun and just make sure we're super clear in messages. We can't just stick endlessly with past design choices as we iterate 😛 So yeah, I think we should just fix the warning in the new run command to start.
a

ancient-diamond-80011

05/05/2023, 7:45 AM
👍 i'll move the check earlier in the code (above the graph init) and do the rename in the same pr
5 Views