-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
Unique Spans #7882
Unique Spans #7882
Conversation
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 20 files ± 0 20 suites ±0 11h 30m 17s ⏱️ - 18m 10s For more details on these failures, see this check. Results for commit b474c16. ± Comparison against base commit 129b7cb. ♻️ This comment has been updated with latest results. |
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.
Thanks, @crusaderky!
ts.annotations.pop("span", None) | ||
|
||
def _ensure_default_span(self) -> Span: | ||
"""Return the currently active default span, or create one if the previous one |
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.
Out-of-scope: I'm not a huge fan of this as it's not very reproducible. Let's keep thinking about a better way to reproduce the progress/code-tracking behavior from computations.
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.
I don't know; I don't hate it now.
If you don't explicitly use spans, you get something that somehow makes sense, at the cost of some mild non-determinism.
If you do use spans, everything is deterministic.
Change spans so that, if a user opens and reopens a span context manager with the same tag, it counts as separate spans - e.g. in case of repeated calsl to the same high-level library.
The 'default' span now automatically closes and reopens itself into a new 'default' span when the cluster is idle, save for all tasks not explicitly annotated with
span
. This effectively replicates 1:1 the behaviour of computations.CC @hendrikmakait @mrocklin @ntabris