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

cache hub programs #92

Closed
Novakasa opened this issue Mar 28, 2023 · 4 comments
Closed

cache hub programs #92

Novakasa opened this issue Mar 28, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Novakasa
Copy link
Owner

As pybricks/support#284 seems to be theoretically possible or might be possible in the future, we can use the automatic program storage to not have to download everytime.

Maybe have a "first time download" process that automatically restarts the hub so the program is guaranteed to be stored?

@Novakasa Novakasa self-assigned this Mar 28, 2023
@Novakasa Novakasa added the enhancement New feature or request label Mar 28, 2023
@Novakasa
Copy link
Owner Author

We have the program start API now with newest pybricksdev

@Novakasa
Copy link
Owner Author

we also need a mechanism to force downloading the program again in case somehow it is lost or outdated.
For new brickrail version on the system probably always download new pogram

Novakasa added a commit that referenced this issue May 2, 2023
this is possible now that pybricksdev has an API for this

implements #92, but in the future we should be smarter about
when to automatically assume we can skip the download.
@Novakasa
Copy link
Owner Author

Novakasa commented May 2, 2023

we can locally store for each known hub a hash of the program that we last downloaded. When it is different, force download again.

Also if program start fails for some reason, assume wrong or no program is on the hub, and force download.

Novakasa added a commit that referenced this issue May 2, 2023
if the hashes don't match, force downloading the program

this doesn't detect if the hub has new firmware, thus no program, no
idea how to somehow detect that.

issue #92
Novakasa added a commit that referenced this issue May 3, 2023
since we seem to be able to run with dynamic module without problems, and
download speed is not a concern anymore since #92
@Novakasa
Copy link
Owner Author

Novakasa commented Oct 1, 2023

think we can close this now

@Novakasa Novakasa closed this as completed Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant