Uninett / zinolib

Python library for zino
Apache License 2.0
1 stars 3 forks source link

Improve clear_flapping #50

Closed hmpf closed 6 months ago

hmpf commented 6 months ago

Partially closes #48

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

github-actions[bot] commented 6 months ago

Test results

    3 files      3 suites   41s :stopwatch:   63 tests   63 :heavy_check_mark: 0 :zzz: 0 :x: 189 runs  189 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit cf5b6792.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 71.23%. Comparing base (d97de03) to head (cf5b679). Report is 6 commits behind head on main.

Files Patch % Lines
src/zinolib/controllers/zino1.py 50.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #50 +/- ## ========================================== - Coverage 71.52% 71.23% -0.30% ========================================== Files 13 13 Lines 1366 1373 +7 ========================================== + Hits 977 978 +1 - Misses 389 395 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

hmpf commented 6 months ago

Came up with another nice-to-have during testing: should we throw an error if clear_flapping receives an event that is not PORTSTATE?

If the clear_flapping button is only available on portstates, only ppl with bad intentions would attempt to clear_flapping anything else. I think the old ritz code does raise an error but this is of no use to a proper user. We could log it though, and not where javascript can get to it.

I don't like the idea of actual errors only being raised when testing/developing.