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

Fix a race condition for notebooks #2073

Merged
merged 2 commits into from
May 9, 2023
Merged

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented May 9, 2023

This avoids a race-condition where the generated html is missing some (or all) of the logged messages.

Checklist

PR Build Summary: https://build.rerun.io/pr/2073

@jleibs jleibs added the 🐍 Python API Python logging API label May 9, 2023
@jleibs jleibs marked this pull request as ready for review May 9, 2023 14:57
@@ -48,6 +48,11 @@ def as_html(
# Use a random presentation ID to avoid collisions when multiple recordings are shown in the same notebook.
presentation_id = "".join(random.choice(string.ascii_letters) for i in range(6))

# TODO(jleibs): flush the specific recording instead of all recordings
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dare I say TODO(#1903) even

@jleibs jleibs merged commit ec4afdc into main May 9, 2023
15 checks passed
@jleibs jleibs deleted the jleibs/flush_when_building_html branch May 9, 2023 15:31
jprochazk pushed a commit that referenced this pull request May 11, 2023
* Flush before generating the html

* Link to PR for recording handle
@emilk emilk changed the title Flush before generating the html Fix a race condition for notebooks May 25, 2023
@emilk emilk added the notebook Jupyter notebooks etc label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notebook Jupyter notebooks etc 🐍 Python API Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants