NeonGeckoCom / skill-update

Skill to handle updates to neon-core
Other
2 stars 1 forks source link

[BUG] Updater claims the device is restarting before asking about the version to update to #73

Closed strugee closed 7 months ago

strugee commented 1 year ago

Description

Basically what the description says - see the speech logs in "Other notes" for clarification. This combination of utterances is confusing; it's not clear if saying "yes" to the "update from version" question will trigger a reboot or interrupt the apparently-imminent reboot.

Additionally, when the normal GUI (with clock/weather/etc.) came back up I received a notification about an update being available, this time (IIRC) with a version number. Tapping this notification gave the following utterance:

Would you like to update from version 23 point 8 point 25 alpha 13 to 23 point 8 point 25 alpha 13?

Note that the version numbers are exactly the same. Responding "yes" to this utterance triggered a device reboot. It's unclear to me whether or not this is a separate issue.

Steps to Reproduce

Relevant Code

No response

Other Notes

Some logs I pulled from neon-cli before the device rebooted (the hotwords problem is a known, unrelated problem on my network; see NeonGeckoCom/neon_debos#21):

08:20:39.947 - voice - ovos_dinkum_listener.service:_shutdown:359 - ERROR - Shutdown failed with: Timed out waiting for Hotwords load
Traceback (most recent call last):
  File "/home/neon/venv/lib/python3.10/site-packages/ovos_dinkum_listener/service.py", line 352, in _shutdown
    self.hotwords.shutdown()
  File "/home/neon/venv/lib/python3.10/site-packages/ovos_dinkum_listener/voice_loop/hotwords.py", line 330, in shutdown
    for engine in self.plugins:
  File "/home/neon/venv/lib/python3.10/site-packages/ovos_dinkum_listener/voice_loop/hotwords.py", line 79, in wrapped
    raise TimeoutError("Timed out waiting for Hotwords load")
TimeoutError: Timed out waiting for Hotwords load
 08:21:56.030 - skills - skill_update:handle_update_device:279 - INFO - squashfs updated
 08:21:56.626 - audio - mycroft.audio.service:execute_tts:309 - INFO - Speak: Download completed; I will now restart to continue updating. This may take several minutes.
 08:21:56.677 - audio - neon_audio.tts.neon:get_requested_tts_languages:108 - ERROR - No profile information with request
 08:21:56.728 - audio - neon_audio.tts.neon:_get_tts:198 - INFO - Legacy Neon TTS signature found
 08:21:56.739 - audio - neon_audio.tts.neon:_get_tts:207 - INFO - Using cached TTS audio
 08:21:59.587 - voice - ovos_dinkum_listener.service:__init__:123 - INFO - Starting Voice Service
 08:21:59.592 - voice - ovos_dinkum_listener.service:_before_start:280 - INFO - Starting service...
 08:21:59.634 - voice - ovos_bus_client.session:reset_default_session:531 - INFO - New Default Session Start: c1642ec0-8d3a-4052-890a-614927d7feaf
 08:21:59.639 - voice - ovos_config.utils:__init__:21 - WARNING - Deprecation version=0.1.0. Caller=ovos_config.config:283. Import from ovos_utils.file_utils directly
 08:22:04.815 - audio - neon_audio.tts.neon:_play:139 - INFO - Played 1693236116.201043
 08:22:04.818 - audio - ovos_bus_client.session:update_history:421 - WARNING - Deprecation version=0.0.4. Caller=neon_audio.tts.neon:140. mycroft-bus-client has been deprecated, please update your imports to use ovos-bus-client
 08:22:05.992 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:211. Use `_resources.render_dialog`
 08:22:06.001 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:213. Use `_resources.render_dialog`
 08:22:06.006 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:211. Use `_resources.render_dialog`
 08:22:06.012 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:213. Use `_resources.render_dialog`
 08:22:06.154 - audio - mycroft.audio.service:execute_tts:309 - INFO - Speak: Would you like to update from version 23 point 8 point 18 alpha 7 to 23 point 8 point 25 alpha 13?
 08:22:06.230 - audio - neon_audio.tts.neon:get_requested_tts_languages:108 - ERROR - No profile information with request
 08:22:06.249 - audio - neon_audio.tts.neon:_get_tts:198 - INFO - Legacy Neon TTS signature found
 08:22:19.291 - audio - neon_audio.tts.neon:_play:139 - INFO - Played 1693236126.028829
 08:22:19.293 - audio - ovos_bus_client.session:update_history:421 - WARNING - Deprecation version=0.0.4. Caller=neon_audio.tts.neon:140. mycroft-bus-client has been deprecated, please update your imports to use ovos-bus-client
 08:22:34.344 - skills - neon_utils.skills.mycroft_skill:__get_response:362 - WARNING - Timed out waiting for user response
 08:22:34.830 - audio - mycroft.audio.service:execute_tts:309 - INFO - Speak: Would you like to update from version 23 point 8 point 18 alpha 7 to 23 point 8 point 25 alpha 13?
 08:22:34.887 - audio - neon_audio.tts.neon:get_requested_tts_languages:108 - ERROR - No profile information with request
 08:22:34.930 - audio - neon_audio.tts.neon:_get_tts:198 - INFO - Legacy Neon TTS signature found
 08:22:34.932 - audio - neon_audio.tts.neon:_get_tts:207 - INFO - Using cached TTS audio
 08:22:45.753 - audio - neon_audio.tts.neon:_play:139 - INFO - Played 1693236154.4077892
 08:22:45.755 - audio - ovos_bus_client.session:update_history:421 - WARNING - Deprecation version=0.0.4. Caller=neon_audio.tts.neon:140. mycroft-bus-client has been deprecated, please update your imports to use ovos-bus-client
 08:22:57.490 - skills - neon_core.skills.intent_service:handle_utterance:248 - INFO - lang=en-us ['yes']
 08:22:57.558 - skills - neon_utils.skills.mycroft_skill:converse:350 - INFO - Got response: yes
 08:22:58.171 - audio - mycroft.audio.service:execute_tts:309 - INFO - Speak: Initiating update. This will take several minutes.
 08:22:58.251 - audio - neon_audio.tts.neon:get_requested_tts_languages:108 - ERROR - No profile information with request
 08:22:58.271 - audio - neon_audio.tts.neon:_get_tts:198 - INFO - Legacy Neon TTS signature found
 08:22:58.274 - audio - neon_audio.tts.neon:_get_tts:207 - INFO - Using cached TTS audio
 08:23:03.078 - audio - neon_audio.tts.neon:_play:139 - INFO - Played 1693236177.788258
 08:23:03.081 - audio - ovos_bus_client.session:update_history:421 - WARNING - Deprecation version=0.0.4. Caller=neon_audio.tts.neon:140. mycroft-bus-client has been deprecated, please update your imports to use ovos-bus-client
 08:23:11.112 - skills - neon_core.skills.service:shutdown:197 - INFO - Shutting down Skills service
 08:23:11.116 - skills - ovos_bus_client.util.scheduler:run:143 - INFO - Stopped
 08:23:11.200 - skill-icanhazdadjokes.jarbasskills - ERROR - Failed to shutdown gui for skill-icanhazdadjokes.jarbasskills: <bound method GUIInterface.gui_set of <ovos_workshop.skills.base.SkillGUI object at 0x7f48308220>>
 08:23:11.214 - skills - mycroft.skills.skill_manager:_unload_plugin_skill:685 - INFO - Unloading plugin skill: neon_homeassistant_skill.mikejgray
 08:23:11.272 - neon_homeassistant_skill.mikejgray - ERROR - Failed to shutdown gui for neon-homeassistant-skill: <bound method GUIInterface.gui_set of <ovos_workshop.skills.base.SkillGUI object at 0x7f6373e0e0>>
 08:23:11.275 - skills - mycroft.skills.skill_manager:_unload_plugin_skill:685 - INFO - Unloading plugin skill: skill-about.neongeckocom

And the end of the speech logs (just the end since neon-cli cuts these off):

 >> Download completed; I will now restart to continue updating. This may take several minutes.
 >> Would you like to update from version 23 point 8 point 18 alpha 7 to 23 point 8 point 25 alpha 13?
 >> Would you like to update from version 23 point 8 point 18 alpha 7 to 23 point 8 point 25 alpha 13?
 yes
 >> Initiating update. This will take several minutes

I'm also happy to pull more log context if folks want - I pulled from neon-cli simply because it was convenient that it interleaves all the logfiles and because I already had it open.

NeonDaniel commented 1 year ago

To provide some context here:

My idea to make this better is something like:

if new_core_ver != current_core_ver:
    # "Would you like to update from core version {{current}} to {{new}}?"
else:
    # "Would you like to install Operating System updates?"
NeonDaniel commented 7 months ago

85 should resolve the version questions as releases now are guaranteed to have unique version numbers.