https://dagster.io/ logo
#ask-community
Title
# ask-community
v

vinesh nukala

02/22/2023, 1:28 AM
Hello, does anyone know how I can translate multiple repositories to multiple code locations while still pointing to one location? For Example, suppose we have a repository.py file that contains 3 repo’s:
Copy code
@repository
def repo1():
    pass
@repository
def repo2():
    pass
@repository
def repo3():
    pass
We would then want to create 3 code locations, but since we can only have 1 definitions object in a file we would have to create 3 python files each with there own definitions object. However due the way our infrastructure code is setup, we want to be able onboard new code locations without being aware of the file names. Right now, with repository’s we just run:
Copy code
dagster api grpc -- package-name dagster_user_code.repositories
and every time someone adds a new repo in the repository.py Dagster automatically detects it . Is there analogous way to this with code locations?
plus1 4
dagster bot responded by community 1
m

Mykola Palamarchuk

02/22/2023, 8:18 AM
I actually asked the similar question before. And I agree with the team that "location" is a better abstraction for isolation than repository. But here is the thing: repositories were used for grouping jobs and you was able to make a single file with all the repos as an entry point. So the idea to have a location as an entry point looks correct, but grouping functionality is missing.
v

vinesh nukala

02/22/2023, 6:01 PM
Thanks for responding, I found you slack question and it looks like it makes sense to continue with repositories. relevant slack thread incase anyone else sees this question : https://dagster.slack.com/archives/C01U954MEER/p1673442412332639
8 Views