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 latest release instead of list of all releases in version checker #2124

Merged

Conversation

bfmvsa
Copy link
Contributor

@bfmvsa bfmvsa commented Jun 23, 2024

It is possible to retrieve the desired release directly instead of the approach when you get a whole list of releases and then get the latest one from the sorted list.

Currently, the number of releases retrieved from /repos/iNavFlight/inav-configurator/releases equals to 29. That's approximately 600KB of data retrieved every check in json.
After this update the size of loaded json through /repos/iNavFlight/inav-configurator/releases/latest is about 24KB

@bfmvsa
Copy link
Contributor Author

bfmvsa commented Jun 23, 2024

Sorry guys for the random pull requests, but I'm starting to research the repo and as a side effect trying to be useful if it is possible. In this specific PR I figured out that we don't need to retrieve all list of inav releases to check if current version is outdated. After this fix we will save to inav users about half of megabyte every check.

@mmosca
Copy link
Collaborator

mmosca commented Jun 23, 2024

I am not sure this particular one is a good idea. Sometimes INAV has bugs, or someone wants to check if an issues happened on an older release. Fetching only the latest release, while faster, does not allow for these use cases. It also breaks showing pre-release versions.

Edit:

Oh wait... that is the version checker... :)

Thay should be ok. We just need to remember to mark the release as latest.

@bfmvsa bfmvsa changed the title Get latest release instead of list of all releases Get latest release instead of list of all releases in version checker Jun 23, 2024
@bfmvsa
Copy link
Contributor Author

bfmvsa commented Jun 23, 2024

Yes I agree, the title of the pr without checking the changed files is unclear. Changed a little bit the title.

@mmosca mmosca merged commit ebdb20b into iNavFlight:master Jun 23, 2024
3 checks passed
@bfmvsa bfmvsa deleted the decrease-retrieved-releases-in-app-updater branch June 24, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants