Workflows calling other workflows
# 🌱|help-and-getting-started
Is there a reason why workflows can't have the command
run workflow XXX
We have one workflow specifically designed for BuildKite and it could use calling other workflow instead of having to duplicate the steps there and copying them over... I think we can all agree copying is bad, will break the single source of truth concept. Thank you.
Hey @aloof-lamp-69262 let me give this a try today and come back to you! Hope you have a great day!
I know this can't be done now, for the time being.
Yes, tested it and sadly you are right, however this feature definitely would be a NICE to have.
Would you like to push a Feature request for it and then we can add this in the RoadMap after our Bonsai release goes live?❤️
It would also be lovely if you could describe the use case that requires Workflows to call other workflows. I am curious to know what you are trying to achieve.
Definitely, thanks a lot for using Garden in such a beautiful way, you are always out there discovering new features and fixes that help massively Garden! @aloof-lamp-69262
Sure, I will explain that shortly.
Alright sorry for the delay, so this is our use case. We have a project/library called
that has a set of kafka consumers. Each module that is a consumer has a predefined set of env variables, so a template here makes sense. Let's call this template
. Now when we want to get a project into garden based on rules engine, let's take an example and call it
will use the base template
but will define some of needed env variables specific for
So we will have a new template, more specialized for project-x, let's call that
which we will use for project-x consumers. Without this feature, we are now copying the generic template into a new one (the project specific one) instead of inheriting from it. It's a nice to have feature, not a blocker. @chilly-gigabyte-83853 @bright-policeman-43626 If you have any questions let me know!
Hey @aloof-lamp-69262 thanks a lot for the clear explanation! I think this workflow you are trying to achieve is valid and makes sense, I can feel that is definitely going to reduce a lot of code duplication. This feature could open a lot of opportunities for more complex use cases. I'd say we should convert this into a Feature request and see if it makes sense for the Core team to introduce this in later versions as a really nice to have. Thanks a lot for being so active!
Thank you so much
Please don't hesitate to reach out if you need help creating the feature request @aloof-lamp-69262 thanks a lot!