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

Hendy Irawan

06/04/2022, 9:33 PM
dagsterApiGrpcArgs
in Kubernetes configuration is unable to load multiple repositories or from
workspace.yaml
. How do I solve this? I tried doing this:
Copy code
dagsterApiGrpcArgs:
        - "-p"
        - "3030"
but no repository is loaded. If I do this:
Copy code
dagsterApiGrpcArgs: []
throws error due to extra args (). If I do this:
Copy code
- "-m"
        - "team_checkpoint.repo"
        - "-m"
        - "leanpd_notion.repo"
only the last repo is loaded. Additionally:
Copy code
Try 'dagster api grpc -h' for help.
But if I run that, I get:
Copy code
Error: Option '-h' requires an argument.
Dagster version: 0.14.19
d

daniel

06/04/2022, 9:50 PM
Hi Hendy - each server takes in a single entry point that can either be a file or a module. That entry point can absolutely import repositories from other modules though. So you could have a single module that imports from both team_checkpoint.repo and leanpd_notion.repo and use that module as the one that you pass in
🎉 1
h

Hendy Irawan

06/04/2022, 9:55 PM
Thank you @daniel, so that means
workspace.yaml
is not used at all by
grpc api
?
d

daniel

06/05/2022, 12:22 AM
that's right - workspace.yaml can point at a gRPC server if it has a
grpc_server
key in it: https://docs.dagster.io/concepts/repositories-workspaces/workspaces#running-your-own-grpc-server
🎉 1
h

Hendy Irawan

06/05/2022, 6:38 AM
Thank you @daniel . I have to say that Dagster itself as software is awesome . However, navigating the docs is still challenging, and there are patterns that are still unclear. I hope this benefits other people: my current pattern that works and structured well, is having a `workspace.py`:
Copy code
from team_checkpoint.repo import *
from leanpd_notion.repo import *
Then putting this in the Helm config:
Copy code
dagsterApiGrpcArgs:
        - "-m"
        - "workspace"
      port: 3030
IMHO
workspace.yaml
is “useless” now as I can use:
Copy code
dagit -m workspace
which is similar to the arguments used during Kubernetes user code deployment.
d

daniel

06/05/2022, 5:29 PM
totally hear you on the docs front! Adding more examples and clarifying things is a big focus for us right now. The main reason you would want to have more than one entry in your workspace.yaml is if there are two different images or Python environments, or you want to update and deploy things separately
10 Views