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

Handle ValueError on setstate on closed event #43

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

hmpf
Copy link
Contributor

@hmpf hmpf commented Dec 6, 2023

zinolib.ritz raises a ValueError if setstate does not respond with (200 , 'Ok'). We know that on setting a state on a closed event we get (500, 'Cannot reopen closed event {event_id}') in the exception message so if we get that, reraise as an EventClosedError. Other potential errors from setstate are let through.

@hmpf hmpf added bug Something isn't working uncaught exception Subtype of bug labels Dec 6, 2023
@hmpf hmpf requested a review from podliashanyk December 6, 2023 14:10
@hmpf hmpf self-assigned this Dec 6, 2023
@hmpf hmpf force-pushed the valueerror-setstate branch from 77021e4 to 30b7cb1 Compare December 6, 2023 14:12
Copy link

github-actions bot commented Dec 6, 2023

Test results

    3 files      3 suites   41s ⏱️
  63 tests   63 ✔️ 0 💤 0
189 runs  189 ✔️ 0 💤 0

Results for commit 6188784.

♻️ This comment has been updated with latest results.

@hmpf hmpf force-pushed the valueerror-setstate branch from dd85799 to 6188784 Compare December 6, 2023 14:16
Copy link

sonarqubecloud bot commented Dec 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 50 lines in your changes are missing coverage. Please review.

Comparison is base (f066d26) 71.51% compared to head (6188784) 71.56%.
Report is 11 commits behind head on main.

Files Patch % Lines
src/zinolib/controllers/zino1.py 53.70% 25 Missing ⚠️
src/zinolib/ritz.py 27.77% 13 Missing ⚠️
src/zinolib/config/zino1.py 57.89% 8 Missing ⚠️
src/zinolib/event_types.py 82.35% 3 Missing ⚠️
src/zinolib/utils.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   71.51%   71.56%   +0.04%     
==========================================
  Files          13       13              
  Lines        1271     1361      +90     
==========================================
+ Hits          909      974      +65     
- Misses        362      387      +25     

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

Copy link
Contributor

@podliashanyk podliashanyk left a comment

Choose a reason for hiding this comment

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

Nice!

@hmpf hmpf merged commit eeef0ff into Uninett:main Jan 10, 2024
8 of 9 checks passed
@hmpf hmpf deleted the valueerror-setstate branch January 11, 2024 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working uncaught exception Subtype of bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants