https://pulumi.com logo
Title
a

ancient-eve-13947

02/09/2022, 9:41 AM
I'm trying to build docker images using an intermediary builder image. But even though I make the builder image a
dependsOn
dependency of the other images, Pulumi doesn't wait to build the other images until the builder is done, instead tries to run them in parallel and of course fails for the other images. I can't see what I'm doing wrong - anyone any idea? I'll attach code-snippets of the relevant pulumi code passage and the dockerfiles in the thread
now I can move creating the builder outside of Pulumi to workaround this, but I'd really rather not.
q

quiet-wolf-18467

02/09/2022, 10:43 AM
Can you run
pulumi stack graph stack.dot
to save a graphviz visualisation of your dependency graph
This may help you debug this
a

ancient-eve-13947

02/09/2022, 10:45 AM
q

quiet-wolf-18467

02/09/2022, 10:46 AM
Yeah, there's no dependencies here.
Are you open to jumping on a Zoom and sharing your screen?
a

ancient-eve-13947

02/09/2022, 10:47 AM
yeah, just let me get zoom
Whenever you're ready, no rush
a

ancient-eve-13947

02/09/2022, 10:51 AM
now I got zoom, what is your email so I can invite you?
q

quiet-wolf-18467

02/09/2022, 10:51 AM
Click the link ^^
a

ancient-eve-13947

02/09/2022, 10:52 AM
ah
q

quiet-wolf-18467

02/09/2022, 11:00 AM
I think your connection dropped
a

ancient-eve-13947

02/09/2022, 11:01 AM
aha, I got some network issues, slack doesn't send either
aha,back, but I gotta go into my daily for a few minutes, I'll call you bakc
q

quiet-wolf-18467

02/09/2022, 11:02 AM
OK. We can pick up when you have time 👍
a

ancient-eve-13947

02/09/2022, 11:19 AM
back
please send me a new meeting, the old one seems to have ended/timeouted
I think I found another workaround. Lemme just see whether it runs through, if it does, I'll explain.
yes, that works.
here's what I do: before, the service images depended on the image via dependsOn. now I changed the dockerfiles of the services to take the builder image as an argument. in pulumi, I removed the dependsOn, but added an arg that takes the builder image's imageName output and splits away the auto-generated tag (because with it, docker build fails). now pulumi waits until the builder image is done before starting to build the service images.
for reference, I'll attach the relevant code portions again
I still don't get why the other way didn't work - it seems like the much more straightforward strategy -, but this one does and lets me keep things inside Pulumi.
the dependency graph now looks correct, too, btw.
q

quiet-wolf-18467

02/09/2022, 12:10 PM
Sorry, I was on a call with another community member. I'm glad you got it working 🎉
a

ancient-eve-13947

02/09/2022, 12:10 PM
no worries 🙂
you are a very helpful guy, btw
❤️ 1
q

quiet-wolf-18467

02/09/2022, 12:11 PM
Always happy to help. Ping me anytime you get stuck 💯
a

ancient-eve-13947

02/09/2022, 12:13 PM
another, unrelated question: does Pulumi offer something like a sort of code-review session? the idea would be that we'd show you how we've setup our pipelines with Pulumi and, in our case, Azure DevOps, you look at it and then tell us if you find anything that could be done better, be that runtime-faster, be that refactoring away some boilerplate etc. and if there is such a possibility, what would be the price range and how would we get in touch with you guys about this?
q

quiet-wolf-18467

02/09/2022, 12:14 PM
I believe you can reach out to our sales team and they would put you in touch with a customer engineer
a

ancient-eve-13947

02/09/2022, 12:15 PM
ah, so this kind of service does exist! perfect! thank you!