mycroft-core icon indicating copy to clipboard operation
mycroft-core copied to clipboard

Discussion: Remove need for connectivity checks

Open krisgesling opened this issue 2 years ago • 4 comments

Discussion started in #2962 about whether network connectivity checks are always needed.

If an install is intended to operate fully offline then clearly it doesn't need to be connected. However even if Mycroft is used in its standard configuration there may be less checks required than we currently have, or they could be made optional.

Skills loading

eg https://github.com/HelloChatterbox/HolmesV/commit/7e40469a897ad8a3509a5e9677de492de6f457a7 This commit makes connectivity during Skill service loading optional via a config flag. I'm wondering if we can drop the requirement completely. The Skill updater itself checks if it has internet and exits if not.

My assumption is that the check is done so that Skills can be fully updated before the device is considered ready for use. But the Skills on the device before they're updated should be working 99% of the time, with new features getting added by the update. Occasionally there might be an API change or something that makes the old version of a Skill not usable but this should be rare occurrence. :crossed_fingers:

On this point I'd also consider removing the install / update of default Skills during the Skills Service loading too. To me this should happen during distribution or in a setup script. It's not necessary every time you load the service.

Other?

Are there other places where an internet connection may be optional?

If we remove them all and a user is expecting the internet to be available for their device to be usable, where does this check live? The enclosure / HAL?

krisgesling avatar Aug 02 '21 22:08 krisgesling

i think the rationale for the wait was no internet -> no pairing

JarbasAl avatar Aug 02 '21 22:08 JarbasAl

Yeah right, this partly goes back to the final question - if an internet connection is expected we do want that to live somewhere. Currently Mycroft won't report ready until an internet connection exists, and the Pairing Skill won't try to pair until Mycroft reports ready.

But there are probably two questions:

  1. Am I expecting an internet connection
  2. Am I expecting a backend - which may be local or remote

Also going to drop in the optional backend PR here for reference: https://github.com/HelloChatterbox/HolmesV/pull/9/files

krisgesling avatar Aug 02 '21 23:08 krisgesling

Yes this is desirable to make registration optional I am thinking about running smoke tests that could be automated in oflline environment

rzr avatar Aug 11 '21 17:08 rzr

+1 on this. I like this implementation in ovos-core because it lets the user decide; by default I think it makes sense to wait, but there are cases where you don't need to wait (i.e. if using local stt/tts).

Regarding the readiness checks, I also like the configuration option in ovos-core

NeonDaniel avatar Jun 03 '22 20:06 NeonDaniel