-
Notifications
You must be signed in to change notification settings - Fork 94
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
data_store: fix traceback #6607
base: 8.4.x
Are you sure you want to change the base?
Conversation
workflow.tree_depth = max( | ||
len(val) | ||
for val in config.get_first_parent_ancestors(pruned=True).values() | ||
]) - 1 | ||
for val in ( | ||
config.get_first_parent_ancestors(pruned=True).values() | ||
or (1,) | ||
) | ||
) - 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default to a tree_depth
of 0
.
@dwsutherland does this make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how
config.get_first_parent_ancestors(pruned=True).values()
could be no value..
Maybe some sort of inheritance error:
def get_first_parent_ancestors(self, pruned=False):
if pruned:
# prune non-task namespaces from ancestors dict
pruned_ancestors = {}
for key, val in self.runtime['first-parent ancestors'].items():
if key not in self.taskdefs:
continue
pruned_ancestors[key] = val
return pruned_ancestors
else:
return self.runtime['first-parent ancestors']
for name in self.cfg['runtime']:
try:
self.runtime['linearized ancestors'][name] = c3.mro(name)
self.runtime['first-parent ancestors'][name] = (
c3_single.mro(name))
except RecursionError:
raise WorkflowConfigError(
"circular [runtime] inheritance?"
) from None
except Exception as exc:
# catch inheritance errors
# TODO - specialise MRO exceptions
raise WorkflowConfigError(str(exc)) from None
I assume it's always 1 minimum otherwise (root
)...
This fix makes sense as a workaround...
Ok, we don't know why this is happening, but it's easy enough to defend against. |
Traceback spotted in the wild.
Found this traceback in a scheduler log. It happened immediately after workflow restart.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).?.?.x
branch.