#What is the recommended way to use dagger in feature-specific architecture like VSA

1 messages · Page 1 of 1 (latest)

cunning flame
#

We are trying to implement dagger in one project where we have feature-specific architecture. example: api, docs, test, ui components everything is inside its specific feature folder. and like wise we have multiple features folders. Now if we need to use dagger then what is the recommended approach?

  1. Should we create dagger module for each feature to run tests and build? and have one common dagger at root level which orchestrate all features modules in monorepo way?
  2. How can we use dagger for features which are interdependent? Should we call the feature's module from another feature's module first and then proceed?
vapid yoke
# cunning flame We are trying to implement dagger in one project where we have feature-specific ...

Hi Aditi!

  1. Yes, our advise is to model your pipeline architecture based on its artifacts and then create a Dagger Module for all those artifacts that are related by some domain that makes sense in your organization.

  2. Yes, you can follow the approach you've described by interconnecting modules.

The general rule is that you should be able to model your pipelines the same way your organization uses to model its applications. If your teams are already used to VSA, I'd say that it makes sense in this case to think about applying similar concepts on how you design your Dagger Modules also.

cc @spiral ruin and @unborn mirage since you have some advise here and have been playing with this model recently.

spiral ruin
#

Yup that seems right. One module per feature, then modules can import each other. This works best in combination with constructors and default directories (defaultPath and ignore on your directory arguments) so that modules can import each other without having to pass redundant arguments. Eg. if test imports docs, it should haven't have to pass the docs source code explicitly.

and have one common dagger at root level which orchestrate all features modules in monorepo way?

Yes that's the idea. There is an open question on what is the ideal contents of that root module. It's kind of an index page for a website. How much should be manually edited vs. generated? This is one area where we're all exploring the patterns together. It's possible that in the future, the Dagger CLI will add conveniences to more easily find and call sub-modules directly. But at the moment, a manually developped root module is the way to go

cunning flame
#

Great..thanks a lot @vapid yoke and @spiral ruin for clarity..

vapid yoke