spine-tools / Spine-Database-API

Database interface to Spine generic data model
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Fix subtle timing issue when fetching database references #237

Closed soininen closed 1 year ago

soininen commented 1 year ago

This PR fixes a bug where database items got occasionally lost between fetching and accessing them.

Fixes spine-tools/Spine-Toolbox#2066

Checklist before merging

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 16.66% and project coverage change: -0.02 :warning:

Comparison is base (2b257fb) 75.26% compared to head (3b3822a) 75.25%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #237 +/- ## ========================================== - Coverage 75.26% 75.25% -0.02% ========================================== Files 76 76 Lines 10894 10897 +3 Branches 2367 2368 +1 ========================================== + Hits 8199 8200 +1 - Misses 2258 2260 +2 Partials 437 437 ``` | [Impacted Files](https://codecov.io/gh/spine-tools/Spine-Database-API/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools) | Coverage Δ | | |---|---|---| | [spinedb\_api/db\_cache.py](https://codecov.io/gh/spine-tools/Spine-Database-API/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools#diff-c3BpbmVkYl9hcGkvZGJfY2FjaGUucHk=) | `74.31% <16.66%> (-0.31%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spine-tools)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.