-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE]: Monorepo support #1944
Comments
We have similar setup where we use a monorepo and have different directories holding groups of related services. There is also a helm chart there that packages stuff up for k8s deployment. I've not had great luck finding a way to get garden.io to work. |
Allowing smoother coupling of projects is definitely on our roadmap. For example via project inputs and project dependencies as mentioned in the GitHub issue you referenced. This will allow user to compose projects into even larger ones. That being said, it looks what you're describing should be solved by just using This how we structure our own projects and what most our users do as well. As for code sharing between modules, that's e.g. possible by using build dependencies. Here's one example of that. All that being said, there are currently some "inconveniences" with respect to code sharing. In fact, I just opened #1954 to mitigate those. The issue also discusses the currently recommended workarounds, such as using build dependencies as mentioned above. This is also related #853, the comments there provide more background context. Does this help your respective use cases? |
Hi @eysi09 With this setup I don't think we'd be able to use modules in multiple applications, right? Here's a (hopefully understandable) semi-concrete example (not using the structure from my original post, sorry):
We'd like to develop, test, and deploy |
This issue has been automatically marked as stale because it hasn't had any activity in 60 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product! |
Feature Request
Hi there, I was going to add this as a comment to #1477 but I'm not positive that they are related so I figured I'd add it as a separate request. I think, more or less, this would ask that we can have multiple garden projects in a single repository, and that projects can reference modules which are not subdirectories of the projects. I'm going to go into maybe too much detail to make sure there's no crossed wires!
For example, given this structure:
I'd want to be able to make
some_app
have aProject
definition which referencesModule
definitions inpython_web_service
andfrontend_service
or something like that.Background / Motivation
I honestly don't know if we are just organizing our repo in a terrible way because nothing seems to support it, but here's how we do it right now:
src
is considered a "project". I'm putting our idea of "project" in quotes to avoid confusing it with the Garden idea of aproject
.some_app
would be a Kubernetes application which uses containers defined infrontend_service
andpython_web_service
shared
(or something like that) andtest
.test.sh
script as the entrypoint)We want to have a consistent process across all of the "projects" in the monorepo. We especially want to be able to do this because in the future we will be providing applications which are just Argo workflows, and multiple workflows will reference the same container images.
What should the user be able to do?
I think I'd like to be able to have multiple garden
Project
s as subdirectories in a git repository, and I'd like multipleProject
s to reference the sameModule
s.Module
s andProject
s are at the same directory level.As I'm writing this I realize that the way we run tests in Docker might not be the best way to do it moving forward so I'm sure we can change that if need be. The only issue I can picture right now is that we don't want the deployment image to have testing software and stuff included.
Why do they want to do this? What problem does it solve?
It would allow us to use Garden, and so far Garden looks like the only tool that does anything close to what we want a tool like it to do.
Suggested Implementation(s)
I honestly don't know, but naively I'd say that maybe having some kind of concept of a subproject, or maybe make the root config be a
Repository
and then eachRepository
can containModule
s andProject
s? Importantly, eachProject
still has its own stack graph. I don't know enough about Garden's internals so I can't really speak too intelligently about this.How important is this feature for you/your team?
🥀 Crucial, Garden is unusable for us without it
Hope this makes sense, thanks!
The text was updated successfully, but these errors were encountered: