Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected GraphQL error encountered in Dagit Configuration tab #3955

Closed
lynma01 opened this issue Mar 26, 2021 · 3 comments
Closed

unexpected GraphQL error encountered in Dagit Configuration tab #3955

lynma01 opened this issue Mar 26, 2021 · 3 comments
Labels
type: bug Something isn't working

Comments

@lynma01
Copy link

lynma01 commented Mar 26, 2021

Summary

Created pipeline's first mode_defs by setting name without setting any other args. While the repo is recognized by Dagit, and loads without issue, when I try to reach the Configuration tab, I get the error: "unexpected GraphQL error"

I'm unsure whether this has to do with the mode_defs directly. I vaguely remember encountering this issue once before but not the steps I took to produce it that first time.

Expected Behvaior: set pipeline mode_defs and then configure logger_defs from Dagit Configuration

Actual Behavior: "unexpected GraphQL error"

Reproduction

@pipeline(
    mode_defs=[
        ModeDefinition(name="local"),
        ModeDefinition(name="prod")
    ]
)

-> Open Dagit -> Status -> Configuration Tab -> unexpected GraphQL error

Error Log

Operation name: InstanceConfigQuery

Message: dump_all() got an unexpected keyword argument 'sort_keys'

Path: ["instance","info"]

Locations: [{"line":4,"column":5}]

Stack Trace:
File "/home/matt/.local/lib/python3.9/site-packages/graphql/execution/executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "/home/matt/.local/lib/python3.9/site-packages/graphql/execution/executors/sync.py", line 16, in execute
return fn(*args, **kwargs)
File "/home/matt/.local/lib/python3.9/site-packages/dagster_graphql/schema/instance.py", line 102, in resolve_info
return self._instance.info_str()
File "/home/matt/.local/lib/python3.9/site-packages/dagster/core/instance/init.py", line 485, in info_str
return yaml.dump(self.info_dict(), default_flow_style=False, sort_keys=False)
File "/usr/lib/python3/dist-packages/yaml/init.py", line 200, in dump
return dump_all([data], stream, Dumper=Dumper, **kwds)


Dagit UI/UX Issue Screenshots

Error Screen

image

Loaded Repo

image

Additional Info about Your Environment

Linux matt-VirtualBox 5.4.0-70-generic #78~18.04.1-Ubuntu SMP Sat Mar 20 14:10:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Message from the maintainers:

Impacted by this bug? Give it a 👍. We factor engagement into prioritization.

@lynma01 lynma01 added the type: bug Something isn't working label Mar 26, 2021
@alangenfeld
Copy link
Member

odd - can you run pip list | grep -i yaml? I wonder if some old (or new?) version of pyyaml doesnt have sort_keys in dumps

@lynma01
Copy link
Author

lynma01 commented Mar 28, 2021

@alangenfeld I fixed the issue from your conjecture about pyyaml- you were exactly right.

Long story short, I needed to re-pip install requirements.txt after a series of dependa-bot alerts updating me from pyYAML 3.12 -> 5.4 among other things. I had set Github Actions to auto-merge those medium/high security PR's, but I neglected to actually update my python venv.

PyYAML 3.12 I think is the version that was giving me the GraphQL Error since that was the one I was unwittingly operating on this whole time.

image

And then, after updating from 3.12 -> 5.4

image

@alangenfeld
Copy link
Member

cool - looks like we need to update our pyyaml requirement to be >= 5.1 since thats when the sort_keys arg got added
https://github.com/yaml/pyyaml/blob/master/CHANGES
yaml/pyyaml#254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants