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

Ensure errors in sync periodic callbacks are logged. #7665

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

ceball
Copy link
Contributor

@ceball ceball commented Jan 24, 2025

Also: Do not duplicate tracebacks in logs for async periodic callbacks.

But: I don't really know what I'm doing :)

While I'm not yet a user of any recent version of Panel ( 😭 ), I tried to test the latest and found the current default situation seems to be:

I don't know if the desired (default) behavior is to have logging of errors in periodic callbacks come from panel, or bokeh, or both. I'll be happy to change this PR with guidance on the desired behavior!

Before this PR's change in panel/io/callbacks.py, the results of the tests added in this PR are:

  • async: FAILED [...] assert 6 == 3 (because the error traceback appears twice per call)
  • sync: FAILED [...] assert 0 == 3 (because the error never appears)

Note: I haven't yet gotten myself set up to be able to run all current Panel's tests successfully; I have not yet run tests beyond test_server, nor have I run test_server with fastapi.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.79%. Comparing base (8062670) to head (060a742).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7665      +/-   ##
==========================================
+ Coverage   86.29%   86.79%   +0.49%     
==========================================
  Files         346      346              
  Lines       52325    52349      +24     
==========================================
+ Hits        45153    45435     +282     
+ Misses       7172     6914     -258     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

… tracebacks in logs for async periodic callbacks.
@philippjfr
Copy link
Member

Yay, great to hear from you!

But: I don't really know what I'm doing :)

Could have fooled me :)

While I'm not yet a user of any recent version of Panel

I'm sorry!

I don't know if the desired (default) behavior is to have logging of errors in periodic callbacks come from panel, or bokeh, or both. I'll be happy to change this PR with guidance on the desired behavior!

You're not missing anything, this is definitely the desired behavior.

@philippjfr philippjfr added this to the v1.6.1 milestone Jan 25, 2025
@philippjfr philippjfr merged commit ad35f88 into holoviz:main Jan 25, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants