Fix python get_tlm_values and queries with all None - #3861
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3861 +/- ##
==========================================
+ Coverage 79.58% 79.61% +0.03%
==========================================
Files 901 901
Lines 68067 68084 +17
Branches 2633 2633
==========================================
+ Hits 54171 54208 +37
+ Misses 13222 13204 -18
+ Partials 674 672 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| # If a start_time is passed we're doing a QuestDB lookup and directly return the results | ||
| # TODO: This currently does NOT support the override values | ||
| if start_time is not None: | ||
| return cls.tsdb_lookup(items, start_time=start_time, end_time=end_time) |
| # get_tlm_available returns None for items which don't exist and its result is | ||
| # passed directly here, so None is a placeholder which returns a None value | ||
| if item is None: | ||
| cvt_items.append([None, None, None, None, None]) |
There was a problem hiding this comment.
This doesn't match ruby's tlm_api.rb at line 335. I think this is correct and Ruby should be fixed. Note that tlm_api.rb 335 is currently a noop because line 344 over writes it each time. Add tests for Ruby and make it match implementation.
| calculated_items = {} | ||
| needed_timestamps = {} | ||
| current_position = 0 | ||
|
|
There was a problem hiding this comment.
Why doesn't this method have any sharding logic? The Ruby version has db_shard_groups with a bunch of logic.



What changed
Update to python get_tlm_values to pass limits to the CvtModel to remove errors. Also adds missing tests.
Why it changed
Using get_tlm_values with a start_time was crashing
Testing strategy
Unit tests added