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

Dagster perform_mongo_updates op fails with TypeError #631

Closed
eecavanna opened this issue Aug 9, 2024 · 1 comment · Fixed by #635
Closed

Dagster perform_mongo_updates op fails with TypeError #631

eecavanna opened this issue Aug 9, 2024 · 1 comment · Fixed by #635
Assignees
Labels
cleanup 🧹 Related to cleaning up code, documentation, etc. X SMALL Less than 1 day

Comments

@eecavanna
Copy link
Collaborator

A bug was introduced in commit #620 that is leading to Dagster reporting the following error when the perform_mongo_updates op runs.

TypeError: _add_schema_docs_with_or_without_replacement() missing 2 required positional arguments: 'mongo' and 'docs'

This was originally reported by @pkalita-lbl here.

I think the error stems from line 531 in nmdc_runtime/site/ops.py lacking the two arguments that the function being called normally tries to use.

add_docs_result = _add_schema_docs_with_or_without_replacement()

def _add_schema_docs_with_or_without_replacement(
mongo: MongoDBResource, docs: Dict[str, list]
):

Based upon the surrounding code, I suspect the fix will look like this.

-     add_docs_result = _add_schema_docs_with_or_without_replacement()
+     add_docs_result = _add_schema_docs_with_or_without_replacement(mongo, docs)

CC: @aclum

@dwinston
Copy link
Collaborator

Oy. I will fix and add test coverage for the body of perform_mongo_updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup 🧹 Related to cleaning up code, documentation, etc. X SMALL Less than 1 day
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants