I'm getting `dagster.core.errors.DagsterInvariantV...
# dagster-plus
c
I'm getting
dagster.core.errors.DagsterInvariantViolationError: No jobs, pipelines, graphs, asset collections, or repositories found
for my docker code location. I have a
repository.py
file in the package folder with a
@repository
decorated function. Am I forgetting to do something else?
this is the contents of
~/app
:
Copy code
.
├── Dockerfile
├── LICENSE
├── README.md
├── dagster.yaml
├── pdm.lock
├── pyproject.toml
└── teamster
    ├── README.md
    ├── common
    │   ├── graphs
    │   │   └── powerschool.py
    │   ├── ops
    │   │   └── powerschool.py
    │   └── resources
    │       ├── google.py
    │       └── powerschool.py
    ├── common_tests
    └── repository.py
and my workspace yaml on dagster cloud:
Copy code
location_name: teamster-core
image: us-central1-docker.pkg.dev/teamster-332318/teamster-core/teamster-core:latest
code_source:
  package_name: teamster
it's definitely pulling the image and launching the pods properly because I can see it on my GKE dashboard
d
Hey Charlie - Dagster imports the teamster package, but importing a package in Python doesn't automatically import all the code within its folder - to include repository.py you'd need to reference that file within an init.py file in the teamster folder. You could have something like
from .repository import *
c
ahh that's what I was missing, thanks!