NeonGeckoCom / skill-update

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

[BUG] "I'm already working on updates" locking doesn't work before the user confirms with "yes" #75

Open strugee opened 1 year ago

strugee commented 1 year ago

Description

From Matrix:

I can't reproduce atm since I can't cancel my ongoing update, but I think I found a bug in the "I am already working on updates" locking - if you manage to issue the "check for updates" command to the device twice before confirming, you get two confirmation prompts, say yes twice, and then Neon says something went wrong. assuming this is actually what just happened to me, it occurred because there was a little delay somewhere and I thought the device didn't hear me.

Thread: https://matrix.to/#/!XeBSsfCqDoWgGMihCz:matrix.org/$uVcNfxjrz8z6gh31U40QjKeLuVI8K-5sAFUMIYHtTq8?via=matrix.org&via=strugee.net&via=matrix.freyachat.eu

Steps to Reproduce

No response

Relevant Code

No response

Other Notes

Logs which seem to confirm the behavior described:

2023-08-31 20:15:03.835 - skills - neon_core.skills.intent_service:handle_utterance:248 - INFO - lang=en-us ['check for updates']
2023-08-31 20:15:06.022 - skills - skill_update:_check_initramfs_update:409 - INFO - Initramfs update available
2023-08-31 20:15:06.027 - skills - skill_update:handle_update_device:297 - INFO - initramfs_available=True
2023-08-31 20:15:06.796 - skills - skill_update:_check_squashfs_update:424 - INFO - Squashfs update available
2023-08-31 20:15:06.804 - skills - skill_update:handle_update_device:306 - INFO - squashfs_available=True
2023-08-31 20:15:06.879 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:273. Use `_resources.render_dialog`
2023-08-31 20:15:06.975 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:275. Use `_resources.render_dialog`
2023-08-31 20:15:08.969 - skills - neon_core.skills.intent_service:handle_utterance:248 - INFO - lang=en-us ['check for updates']
2023-08-31 20:15:10.041 - skills - skill_update:_check_initramfs_update:409 - INFO - Initramfs update available
2023-08-31 20:15:10.052 - skills - skill_update:handle_update_device:297 - INFO - initramfs_available=True
2023-08-31 20:15:11.609 - skills - skill_update:_check_squashfs_update:424 - INFO - Squashfs update available
2023-08-31 20:15:11.610 - skills - skill_update:handle_update_device:306 - INFO - squashfs_available=True
2023-08-31 20:15:11.612 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:273. Use `_resources.render_dialog`
2023-08-31 20:15:11.621 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:275. Use `_resources.render_dialog`
2023-08-31 20:15:25.806 - skills - neon_core.skills.intent_service:handle_utterance:248 - INFO - lang=en-us ['yes', 'yes']
2023-08-31 20:15:25.905 - skills - neon_utils.skills.mycroft_skill:converse:350 - INFO - Got response: yes
2023-08-31 20:15:25.977 - skills - ovos_workshop.resource_files:resolve_resource_file:124 - WARNING - This method has moved to `ovos_utils.file_utils` and will beremoved in a future release.
2023-08-31 20:15:30.198 - skills - neon_utils.skills.mycroft_skill:__get_response:362 - WARNING - Timed out waiting for user response
2023-08-31 20:15:31.937 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:329. Use `_resources.render_dialog`
2023-08-31 20:15:31.954 - skills - skill_update:handle_update_device:332 - INFO - Updating initramfs
2023-08-31 20:15:42.977 - skills - neon_core.skills.intent_service:handle_utterance:248 - INFO - lang=en-us ['yes']
2023-08-31 20:15:43.047 - skills - neon_utils.skills.mycroft_skill:converse:350 - INFO - Got response: yes
2023-08-31 20:15:43.635 - skills - skill_update:handle_update_device:339 - INFO - initramfs updated
2023-08-31 20:15:43.720 - skills - skill_update:handle_update_device:360 - INFO - Updating squashfs
2023-08-31 20:15:49.425 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:329. Use `_resources.render_dialog`
2023-08-31 20:15:49.452 - skills - skill_update:handle_update_device:332 - INFO - Updating initramfs
2023-08-31 20:16:03.969 - skills - skill_update:handle_update_device:350 - ERROR - initramfs update failed: None
2023-08-31 20:16:03.971 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:353. Use `_resources.render_dialog`
2023-08-31 20:16:26.708 - skills - neon_core.skills.intent_service:handle_utterance:248 - INFO - lang=en-us ['for updates']
2023-08-31 20:16:28.950 - skills - skill_update:handle_update_device:297 - INFO - initramfs_available=False
2023-08-31 20:16:29.906 - skills - skill_update:_check_squashfs_update:424 - INFO - Squashfs update available
2023-08-31 20:16:29.911 - skills - skill_update:handle_update_device:306 - INFO - squashfs_available=True
2023-08-31 20:16:29.915 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:273. Use `_resources.render_dialog`
2023-08-31 20:16:29.936 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:275. Use `_resources.render_dialog`
2023-08-31 20:16:43.873 - skills - neon_core.skills.intent_service:handle_utterance:248 - INFO - lang=en-us ['yes']
2023-08-31 20:16:43.948 - skills - neon_utils.skills.mycroft_skill:converse:350 - INFO - Got response: yes
2023-08-31 20:16:49.701 - skills - ovos_workshop.skills.mycroft_skill:translate:230 - WARNING - Deprecation version=0.1.0. Caller=skill_update:329. Use `_resources.render_dialog`