Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_sw_ver_info() returns only versions for the last board ID #8

Open
afaerber opened this issue Sep 12, 2024 · 0 comments
Open

get_sw_ver_info() returns only versions for the last board ID #8

afaerber opened this issue Sep 12, 2024 · 0 comments
Labels
bug Something isn't working good-first-issue Good for newcomers

Comments

@afaerber
Copy link
Contributor

afaerber commented Sep 12, 2024

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)

@afaerber 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
@milank94 milank94 added the bug Something isn't working label Oct 30, 2024
@milank94 milank94 added the good-first-issue Good for newcomers label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good-first-issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants