Dependency is ignored. Not sure if it is a bug
# 🌱|help-and-getting-started
s
Hi! I am using docker image build action and it depends on exec deploy action that deploys registry credentials. When I run
garden deploy <my_docker_build_action>
it goes right away to building an image without even checking the status of exec deploy action. As a result image build fails as there are no creds deployed. In 0.12 it worked, but after upgrade to 0.13 dependency resolution seems broken. I've checked everything, but couldn't find anything to solve this issue. My actions are defined as in the following example:
Copy code
yaml
kind: Deploy
type: exec
name: example-registry-creds
spec:
  deployCommand: [example, deploy, command]
  statusCommand: [example, status, command]
  cleanupCommand: [example, cleanup, command]
Copy code
yaml
kind: Build
type: container
name: my-docker-image
dependencies:
  - deploy.example-registry-creds
include:
  - Dockerfile
Maybe these logs can be related
Copy code
Found 0 files in Deploy action example-registry-creds root /path/to/example-registry-creds
Is this a bug? Please ping me if you need additional info. I am using garden
v0.13.9
on Ubuntu 20.04
I see also this in the end of the logs
Copy code
resolve Deploy type=exec name=example-registry-creds is ready.
Sorry, forgot to mention an important detail. When I deploy separately
example-registry-creds
, it is deployed normally, but
my-docker-image
anyway ignores it when building.
garden delete ns --dependants-first
is also removing services in a wrong order.
example-registry-creds
exec deploy is removed the very first instead of being removed the last. The whole delete operation fails as there are no registry creds available on the cluster and garden for some reason tries to build docker images of these services on delete (I think it is another bug. Why whould I want to build docker images when I am removing services?).
q
@silly-accountant-45583 can I ask you to provide a reproducible example for our team? I'm on vacation but this could be helpful to members of our support rotation cc @ancient-diamond-80011 @chilly-gigabyte-83853 @big-spring-14945
s
Sure, but it will take time. I will share as soon as it's ready.
@ancient-diamond-80011 pinging you as @quaint-dress-831 is on vacation. Here is reproducible example project - https://github.com/xdvpser/bonsai-bug-repro. Please contact me, if I missed something.
cc @chilly-gigabyte-83853 @big-spring-14945
c
Thanks for providing the repro @silly-accountant-45583, I'll make sure someone takes a look asap. Is there an issue already? I can create one for you otherwise
s
Not yet. Yeah, It would be nice đź‘Ť
@chilly-gigabyte-83853 if you are not having enough time I can create issue for you. Unless this bug is fixed,
v0.13
is unusable for us, so we are just stuck with
v0.12
.
c
Hi @silly-accountant-45583 sorry if it took me so long, I just created the issue, you can track it here: https://github.com/garden-io/garden/issues/4918! Thanks again for reporting, we'll take a look soon!
a
Hi @silly-accountant-45583 , one question I had: could you please give it a try with v0.13.6 of garden instead of v0.13.10 which is a slightly older version of Garden Bonsai (0.13). This might be due to a regression introduced in 0.13.7. More details in this comment: https://github.com/garden-io/garden/issues/4918#issuecomment-1663998537
s
@astonishing-tomato-18259 nope, the same behavior with
0.13.6
. Logs:
Copy code
$ ./bin/garden build my-container
Build 

Garden v0.13 (Bonsai) is a major release with significant changes. Please help us improve it by reporting any issues/bugs here:
https://go.garden.io/report-bonsai
→ Run garden util hide-warning 0.13-bonsai to disable this warning.
ℹ garden               → Running in Garden environment local.default
ℹ providers            → Getting status...
✔ providers            → Done (took 1.8 sec)
ℹ graph                → Resolving actions and modules...
✔ graph                → Done (took 0.1 sec)
ℹ build.my-container   → -> Updating Docker auth secret in namespace root-default
ℹ build.my-container   → -> Deploying garden-buildkit daemon in root-default namespace (was missing)
ℹ build.my-container   → Waiting for resources to be ready...
ℹ build.my-container   → Deployment/garden-buildkit: Started container util
ℹ build.my-container   → Resources ready
ℹ build.my-container   → Done!
a
@silly-accountant-45583 Thanks for trying it out and sharing logs. Definitely not the expected behavior. We'll investigate this further
s
@astonishing-tomato-18259 I noticed that dependency is respected when there are some unstaged changes in the same folder as the garden action.
at both times when there are changes and no changes I see following line in logs:```Found 6 files in Deploy action exec root /path/to/bonsai-repro/actions```