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 F1 for help in Python #5405

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Fix F1 for help in Python #5405

merged 1 commit into from
Nov 19, 2024

Conversation

seeM
Copy link
Contributor

@seeM seeM commented Nov 18, 2024

Addresses #5290. The issue was a deadlock when handling the show_help_topic request when it tries to send the show_help event, since both PositronComm.on_msg and send_event acquire the same lock.

@wesm IIUC the purpose was to allow delaying a send_event call in a separate thread until after the message handler completes. I think both cases are solved by using a reentrant lock (RLock()).

QA Notes

F1 should work again in Python.

@seeM seeM requested review from wesm and isabelizimm November 18, 2024 18:03
@@ -87,7 +87,7 @@ class PositronComm:

def __init__(self, comm: comm.base_comm.BaseComm) -> None:
self.comm = comm
self.send_lock = threading.Lock()
self.send_lock = threading.RLock()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual fix. The rest is to update the help tests to use the PositronComm instead of the base comm to be able to catch bugs like this one.

isabelizimm
isabelizimm previously approved these changes Nov 18, 2024
Copy link
Contributor

@isabelizimm isabelizimm left a comment

Choose a reason for hiding this comment

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

LGTM pending green CI! Works locally as expected 👍

@isabelizimm
Copy link
Contributor

isabelizimm commented Nov 18, 2024

Ah, looks like macos-12 in our GHA is deprecated for the Typescript tests. We are using macos-13 in nightly tests, and macos-latest elsewhere, so maybe we can move to one of those?

@seeM seeM force-pushed the 5290-fix-f1-for-python branch from f699e89 to 31c0410 Compare November 18, 2024 18:33
Copy link
Contributor

@wesm wesm left a comment

Choose a reason for hiding this comment

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

+1

wesm pushed a commit that referenced this pull request Nov 19, 2024
from errors noted in #5405 ; macos-12 has been deprecated
actions/runner-images#10721
@wesm wesm merged commit 73297e7 into main Nov 19, 2024
23 checks passed
@wesm wesm deleted the 5290-fix-f1-for-python branch November 19, 2024 01:56
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2024
@seeM
Copy link
Contributor Author

seeM commented Nov 19, 2024

Thanks for getting this merged @wesm & @isabelizimm!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants