You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
system_utils.py function get_sw_ver_info loops over a list of board IDs but only returns a flat dictionary.
In effect, mostly the info for the last board ID queried gets returned, since it overwrites the versions for any previous board IDs without any version comparison.
Further, exception handling is done per loop iteration, so we could end up in a situation where the first call succeeds and stores versions but the next call fails and adds the error message, while retaining the versions from the previous iteration. Or where timeouts occur for each single card.
Also, versions for Buda and Metallium (cf. #14) are overwritten for each loop iteration, while this could be done after the loop then.
The only practical difference would be that those versions would then also show when fetching the data failed (cf. above).
Anyway, wouldn't it be safer to return the right numbers from your server rather than depending on the installed version of tt-tools-common to downgrade them?
Finally, since this is indicating the latest software versions rather than minimum versions and they appear to be the same components and versions for at least Grayskull and Wormhole, couldn't this loop sending board IDs be replaced by a single board-ID-independent call? That would then also alleviate any privacy concerns. (compare #7)
The text was updated successfully, but these errors were encountered:
afaerber
changed the title
get_sw_ver_info returns only versions for the last board ID
get_sw_ver_info() returns only versions for the last board ID
Sep 14, 2024
system_utils.py
functionget_sw_ver_info
loops over a list of board IDs but only returns a flat dictionary.In effect, mostly the info for the last board ID queried gets returned, since it overwrites the versions for any previous board IDs without any version comparison.
Further, exception handling is done per loop iteration, so we could end up in a situation where the first call succeeds and stores versions but the next call fails and adds the error message, while retaining the versions from the previous iteration. Or where timeouts occur for each single card.
Also, versions for
Buda
andMetallium
(cf. #14) are overwritten for each loop iteration, while this could be done after the loop then.The only practical difference would be that those versions would then also show when fetching the data failed (cf. above).
Anyway, wouldn't it be safer to return the right numbers from your server rather than depending on the installed version of tt-tools-common to downgrade them?
Finally, since this is indicating the latest software versions rather than minimum versions and they appear to be the same components and versions for at least Grayskull and Wormhole, couldn't this loop sending board IDs be replaced by a single board-ID-independent call? That would then also alleviate any privacy concerns. (compare #7)
The text was updated successfully, but these errors were encountered: