In this section, repository refers to a version control system, such as Git or Mercurial.
If you want to manage complexity or divide your work into areas of responsibility, consider isolating your code bases into multiple projects with:
Multiple directories in a single repository, or
Multiple repositories
Refer to the following table for more information, including the pros and cons of each approach.
Approach
Multiple directories in a single repository
Multiple repositories
How it works
You can use a single repository to manage multiple projects by placing each project in a separate directory. Depending on your VCS, you may be able to set code owners to restrict who can modify each project.
For stronger isolation, you can use multiple repositories to manage multiple projects.
Pros
Simple to implement
Facilitates code sharing between projects
Stronger isolation between projects and teams
Each project has its own CI/CD pipeline and be deployed independently
Dependencies between projects can be managed independently
Cons
All projects share the same CI/CD pipeline and cannot be deployed independently
Shared dependencies between projects may cause conflicts and require coordination between teams
Code sharing between projects require additional coordination to publish and reuse packages between projects
Whether you use a single repository or multiple, you can use a dagster_cloud.yaml file to define the code locations to deploy. For each repository, follow the steps appropriate to your CI/CD provider and include only the code locations that are relevant to the repository in your CI/CD workflow.
If you have no specific requirements for isolation beyond the ability to deploy and run multiple projects, you can use a single agent and deployment to manage all your projects as individual code locations.
Pros
Cons
Simplest and most cost-effective solution
User access control can be set at the code location level
Multiple deployments are only available in Dagster+ Pro.
Of the approaches outlined in this guide, multiple deployments are the most isolated solution. The typical motivation for this isolation level is to separate production and non-production environments. It may be considered to satisfy other organization specific requirements.
Pros
Cons
Isolation between assets and execution environments
User access control can be set at the code location and deployment level
No single glass pane to view all assets (requires switching between multiple deployments in the UI)