jdaviz
jdaviz copied to clipboard
Fix memory cleanup crashing loader selection in UI
Looks like some of the recent work cleaning up memory in tests is causing the loader in the UI to crash in some cases:
This checks for the existence of the spectrum attribute before trying to delete it.
#3864 replaces this with
self._clear_cache('spectrum')- can you check if that also fixes this or if that PR needs to be changed to adopt this instead?
I can try to check but I don't actually know a good way to consistently reproduce the crash, just that it happens sometimes.
That does seem to fix this as well, since that is in draft do you want me to just copy that logic here?
ok, I think _clear_cache is safer (since it isn't trying to delete a property), so we can get this in now and replace it with that in the other PR (or change this to use clear cache now). @MatthewPortman - do you see any memory implications to del vs _clear_cache?
ok, I think
_clear_cacheis safer (since it isn't trying to delete a property), so we can get this in now and replace it with that in the other PR (or change this to use clear cache now). @MatthewPortman - do you see any memory implications todelvs_clear_cache?
None that I'm aware of, it should be fine
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 87.51%. Comparing base (905b99a) to head (d0e5481).
:warning: Report is 6 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3872 +/- ##
==========================================
- Coverage 87.52% 87.51% -0.01%
==========================================
Files 191 191
Lines 26115 26124 +9
==========================================
+ Hits 22857 22863 +6
- Misses 3258 3261 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
So what's the verdict? Go ahead and merge this to fix the bug for now and let the Roman PR change it to clearing cache?
that's fine with me