-
Notifications
You must be signed in to change notification settings - Fork 213
Improves OTA update reporting and process #838
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
base: dev
Are you sure you want to change the base?
Conversation
@adamshiervani Not actually sure how to go about testing this... |
2389544
to
d71c887
Compare
In the Makefile, you just set a low number and run I'll try that out now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OTA mechanism technically works. I was able to upgrade a device by lowering the version number in the Makefile
. The code cleanup and the more granular state pushes to the client are great, but I have a few usability and robustness concerns.
The updated UI is confusing (I suspect flex-col
is missing 😄). Despite the copy, it’s not immediately clear whether the reboot is automatic or requires the user to click “Reboot,” and it’s not obvious what happens if a reboot is already pending. All valid UX questions from the user’s perspective.
With the current implementation, if the reboot + IP assignment takes longer than the WebSocket reconnect policy allows, the “Reconnect” and “Reboot” buttons can lead the client to stale, lazy-loaded settings routes that break the app.
This PR aside, the only actual problem I noticed with OTA is the client-side state becomes desynchronized after a reboot: the client doesn’t perform a full refresh when the update completes. This is likely not caused by insufficient OTA-status events, but rather, the WebSocket reconnect threshold is being exceeded during the reboot/IP-assignment cycle (for example, DHCP can take a while). You can actually reproduce this by pulling the Ethernet cable during reboot -- the client hits the reconnect timeout and stops trying.
I would simply suggest extending the WebSocket reconnect threshold during updates to infinity. This way, the only thing that I can think of that could break the client-side part of the OTA mechanism is if DHCP assigned a different IP to the JetKVM, but that's fine for now.
Also made the number of reconnect attempts settable Doesn't attempt a reconnection if we intentionally disconnect Make sure the fire-and-forget for TURN activity doesn't result in unhandled promise rejection.
Updated the text about reboot/update and used a smaller button. Ensure we get the correct UI version. Also fixed comment about the system update progress
The isOneDevice and checkAuth can be leveraged from devices.$id.tsx
b97c52c
to
70cd19d
Compare
Improves the OTA (Over-The-Air) update process by adding better reporting and handling of reboot requirements.
rebootNeeded
andrebooting
state to the OTA process.