When the channel answered a start with something that is not JSON, such
as a block page or "404: Not Found", get_data() returned {} and the
startup cache update wrote that {} to the cache, over a list cached by
an earlier start. As an installed package the Manager reads a channel
file from the cache whenever the cache file exists, so the custom node
list and the model list of the legacy UI ended in HTTP 500 and the map
of nodes to node packs came back empty, until a later start got the
lists from the channel. "cm-cli update-cache" wrote the same {} and
then stopped with KeyError: 'custom_nodes'.
- Re-raise the parse error in get_data() when the text came from an
HTTP response, so such a response is handled like a failed
connection: both startup cache updates and cm-cli skip the file and
leave the cache as it is, and without a cached list the one bundled
with the Manager is used. A local file or cache file that is not
JSON still reads as {}
- Add tests that run the real get_data(), and the real startup cache
update and get_data_by_mode() of both servers, against a local HTTP
server
- Add a CHANGELOG entry
The same change for main is #3518. Refs #3480.