rectalogic
04/05/2023, 6:03 PMpyproject.yaml
has:
[tool.dagster]
package_name = "cureatr"
When I run dagster dev
I don't see any jobs etc. in the UI. If I change that to module_name = "<http://cureatr.jobs|cureatr.jobs>"
then I see my jobs. So how does package_name
work, it doesn't enumerate jobs/assets etc. in modules in that package?daniel
04/05/2023, 6:23 PMpython -m cureatr
and include any Dagster definitions that are defined as part of that load)rectalogic
04/05/2023, 6:33 PM__init__.py
loads my jobs from .jobs import *
so the jobs should be defined in the packagedaniel
04/05/2023, 6:34 PMdaniel
04/05/2023, 6:34 PMrectalogic
04/05/2023, 6:36 PM@job
- if my pyproject.yaml uses module_name = "<http://cureatr.jobs|cureatr.jobs>"
I see them , but if it uses package_name = "cureatr"
it does notrectalogic
04/05/2023, 6:38 PM>>> import cureatr
>>> dir(cureatr)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'hello_redshift', 'hello_redshift_job', 'job', 'jobs', 'ops']
daniel
04/05/2023, 6:38 PMError loading repository location hi.py:dagster._core.errors.DagsterInvariantViolationError: No repository and more than one job found in "hi". If you load a file or module directly it must have only one job in scope. Found jobs defined in variables or decorated functions: ['job1', 'job2'].
daniel
04/05/2023, 6:38 PMrectalogic
04/05/2023, 6:40 PMrectalogic
04/05/2023, 6:43 PMdaniel
04/05/2023, 6:43 PMrectalogic
04/05/2023, 6:50 PMDefinitions
I still don't see my job. Do I have to add a code location when using package_name
instead of module_name
?rectalogic
04/05/2023, 6:54 PMNo definitions
When you add a code location, your definitions will appear here
with module_name
I did not have to add a code location, it found my jobdaniel
04/05/2023, 6:58 PMdaniel
04/05/2023, 7:00 PMrectalogic
04/05/2023, 7:01 PMdaniel
04/05/2023, 7:01 PMdaniel
04/05/2023, 7:02 PMrectalogic
04/05/2023, 7:02 PMrectalogic
04/05/2023, 7:04 PMdaniel
04/05/2023, 7:04 PMdaniel
04/05/2023, 7:05 PMrectalogic
04/05/2023, 7:06 PM