https://dagster.io/ logo
Title
m

Matthieu Oliveira

03/31/2023, 5:23 PM
Hi Guys, I'm running into some interesting behavior with dagit. I'm running v1.2.4 and implemented my own ComplexRepositoryData(RepositoryData) to support refresh of new jobs. When I execute dagit on my local, I see this:
AttributeError: 'NoneType' object has no attribute 'items'
  File ".venv/lib/python3.8/site-packages/dagster/_grpc/server.py", line 529, in _get_serialized_external_repository_data
    external_repository_data_from_def(
  File ".venv/lib/python3.8/site-packages/dagster/_core/host_representation/external_data.py", line 1117, in external_repository_data_from_def
    for res_name, res_data in resource_datas.items()
The repo looks like:
@repository
def my_repo() -> ComplexRepositoryData:
    return ComplexRepositoryData()
FWIW, I'm upgrading from 1.0.15 (hoping 1.2.4 solves some dagit refresh behavior I'm encountering with the complex repo) therefore I imagined I would see some breaking changes. Thanks!
:dagster-bot-resolve: 1
d

daniel

03/31/2023, 5:27 PM
Hi Matthieu - RepositoryData now has a get_top_level_resources abstract method, do you konw if your class implements that?
m

Matthieu Oliveira

03/31/2023, 5:38 PM
My class currently implements both
get_env_vars_by_top_level_resource
and
get_top_level_resources
but the functions are not implemented...
ah, returning empty {} solves this. okay will continue to play
d

daniel

03/31/2023, 5:42 PM
return an empty dict from get_top_level_resources and i believe this will go away
yeah
:rainbow-daggy: 1
m

Matthieu Oliveira

03/31/2023, 5:42 PM
lol ty