nycmeshnet / meshdb

A convenient, stable, and sane database for tracking Members and Nodes for use with robots and humans
https://db.nycmesh.net
MIT License
8 stars 13 forks source link

Fix: NN assignment race condition for nodes created in admin UI #444

Closed Andrew-Dickinson closed 1 month ago

Andrew-Dickinson commented 1 month ago

We were assigning NNs for nodes created in the admin UI without grabbing the lock which protects duplicate NN assignment. This fixes that :)

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.

Project coverage is 94.96%. Comparing base (af5d6f8) to head (af4bba5). Report is 6 commits behind head on main.

Files Patch % Lines
src/meshapi/tests/test_nn.py 90.62% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #444 +/- ## ========================================== + Coverage 94.76% 94.96% +0.20% ========================================== Files 101 105 +4 Lines 5025 5246 +221 ========================================== + Hits 4762 4982 +220 - Misses 263 264 +1 ```

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