Apply suggestion failures fail supervisor repair#113372
Conversation
|
Hey there @home-assistant/supervisor, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
1cfc2fd to
0d9e10c
Compare
Right, the I am not really sure though if that is a good API 🤔 It is a loss of information in the end. In this particular case, we didn't really do something with the exception information anyways, so your change just fixes things to behave as they should. Now the user actually should get the abort reason But maybe, we should actually consider dropping/changing that annotation and handle exceptions on callee side 🤔 . Then we can do sensible things with the error returned. I guess we can't simply pass the error to the user as we need to translate things. But maybe we can add a few common abort reasons and translate them 🤔 In any case, this should be a follow up PR. This PR fixes things as they are currently intended to work. We should also ship this with the next Core patch release. I see you already added it to the milestone 👍 |
|
@agners Yes I know. But we have no choice but to drop the information right now because this is for the frontend. We cannot just pass along the error message from Supervisor directly into the UI, we need translation strings. We got away with that in the other PR because it was only used for logging. To change this spot we need to iterate out all the possible messages and make translation strings out of them. So that requires follow up and I'd say isn't in scope for a patch fix. |
…to v2024.3.1 (#437) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/home-assistant/home-assistant](https://www.home-assistant.io/) ([source](https://github.com/home-assistant/core)) | patch | `2024.3.0` -> `2024.3.1` | --- ### Release Notes <details> <summary>home-assistant/core (ghcr.io/home-assistant/home-assistant)</summary> ### [`v2024.3.1`](https://github.com/home-assistant/core/releases/tag/2024.3.1) [Compare Source](home-assistant/core@2024.3.0...2024.3.1) - Fix optional Jellyfin RunTimeTicks ([@​j-stienstra] - [#​108254]) ([jellyfin docs]) - Add auto fan mode icon ([@​mattmccormack] - [#​110185]) ([climate docs]) - Ignore AussieBroadband services that don't support usage information ([@​FieldofClay] - [#​110253]) ([aussie_broadband docs]) - Use friendly name for camera media source ([@​OnFreund] - [#​110882]) ([camera docs]) - Improve discovering upnp/igd device by always using the SSDP-discovery for the Unique Device Name ([@​StevenLooman] - [#​111487]) ([upnp docs]) - Update the numato-gpio dependency of the numato integration to v0.12.0 ([@​clssn] - [#​112272]) ([numato docs]) (dependency) - Disable updating ZHA coordinator path from discovery info ([@​puddly] - [#​112415]) ([zha docs]) (breaking-change) - Bump intents to 2024.3.6 ([@​synesthesiam] - [#​112515]) ([conversation docs]) (dependency) - Weatherflow_cloud backing lib bump ([@​jeeftor] - [#​112262]) ([weatherflow_cloud docs]) (dependency) - Bump weatherflow4py to 0.1.14 ([@​jeeftor] - [#​112554]) ([weatherflow_cloud docs]) - Restore the juicenet integration ([@​emontnemery] - [#​112578]) ([juicenet docs]) (new-platform) - Fix incorrect filtering of unsupported locales in bring-api ([@​tr4nt0r] - [#​112589]) ([bring docs]) - Include pytedee_async logger in tedee integration ([@​zweckj] - [#​112590]) ([tedee docs]) - Issue warning modbus configuration when modbus configuration is empty ([@​janiversen] - [#​112618]) ([modbus docs]) - modbus scan_interval: 0 is correct configuration ([@​janiversen] - [#​112619]) ([modbus docs]) - Update frontend to [`2024030`](https://github.com/home-assistant/core/commit/20240307).0 ([@​bramkragten] - [#​112620]) ([frontend docs]) - Make hass-nabucasa a core requirement ([@​emontnemery] - [#​112623]) - Bump aioautomower to 2024.3.0 ([@​Thomas55555] - [#​112627]) ([husqvarna_automower docs]) (dependency) - Bump pymodbus to v3.6.5 ([@​janiversen] - [#​112629]) ([modbus docs]) (dependency) - Bump axis to v52 ([@​Kane610] - [#​112632]) ([axis docs]) (dependency) - Update Loqed helper for more logging ([@​mikewoudenberg] - [#​112646]) ([loqed docs]) (dependency) - Bump weatherflow4py to 0.1.17 ([@​jeeftor] - [#​112661]) ([weatherflow_cloud docs]) - Bump `aionotion` to 2024.03.0 ([@​bachya] - [#​112675]) ([notion docs]) - Make sure Notion saves new refresh token upon startup ([@​bachya] - [#​112676]) ([notion docs]) - Fix tado climate service ([@​alinbalutoiu] - [#​112686]) ([tado docs]) - Downgrade `pysnmp-lextudio` to version `5.0.34` ([@​bieniu] - [#​112696]) ([snmp docs]) (dependency) - Allow duplicate names in different modbus entities ([@​janiversen] - [#​112701]) ([modbus docs]) - Guard against db corruption when renaming entities ([@​bdraco] - [#​112718]) ([recorder docs]) - Fix local calendar handling of empty recurrence ids ([@​allenporter] - [#​112745]) ([calendar docs]) ([local_calendar docs]) - Bump pyenphase to 1.19.2 ([@​catsmanac] - [#​112747]) ([enphase_envoy docs]) (dependency) - Bump bthome-ble to 3.7.0 ([@​thecode] - [#​112783]) ([bthome docs]) (dependency) - Upgrade `pysnmp-lextudio` to version `6.0.9` ([@​lextm] - [#​112795]) ([snmp docs]) (dependency) - Bump openwrt-luci-rpc version to 1.1.17 ([@​mrchi] - [#​112796]) ([luci docs]) (dependency) - Fix google_asssistant sensor state reporting ([@​jbouwh] - [#​112838]) ([google_assistant docs]) - Fix MJPEG fallback when still image URL is missing with basic auth ([@​bdraco] - [#​112861]) ([mjpeg docs]) - Bump boschshcpy to 0.2.82 ([@​FlyingFeng2021] - [#​112890]) ([bosch_shc docs]) - Add missing translation placeholder in Hydrawise ([@​dknowles2] - [#​113007]) ([hydrawise docs]) - Bump bthome-ble to 3.8.0 ([@​Ernst79] - [#​113008]) ([bthome docs]) (dependency) - Bump axis to v53 ([@​Kane610] - [#​113019]) ([axis docs]) (dependency) - Fix availability for GIOS index sensors ([@​bieniu] - [#​113021]) ([gios docs]) - Bump ical to 7.0.1 and always use home assistant timezone for local todo dtstart ([@​allenporter] - [#​113034]) ([google docs]) ([local_calendar docs]) ([local_todo docs]) (dependency) - Fix some handle leaks in rainforest_raven ([@​cottsay] - [#​113035]) ([rainforest_raven docs]) - Fix hvac_mode for viessmann devices with heatingCooling mode ([@​folke] - [#​113054]) ([vicare docs]) - components/gardena_bluetooth: Improve avaliability reliability ([@​alistair23] - [#​113056]) ([gardena_bluetooth docs]) - Fix for controlling Hue switch entities ([@​marcelveldt] - [#​113064]) ([hue docs]) - Bump rova to 0.4.1 ([@​LukasdeBoer] - [#​113066]) ([rova docs]) (dependency) - Fix colormode attribute on grouped Hue light ([@​marcelveldt] - [#​113071]) ([hue docs]) - Bump axis to v54 ([@​Kane610] - [#​113091]) ([axis docs]) - Bump aiodhcpwatcher to 0.8.1 ([@​bdraco] - [#​113096]) ([dhcp docs]) (dependency) - bump pytedee_async to 0.2.16 ([@​zweckj] - [#​113135]) ([tedee docs]) (dependency) - Add message from Bad Request errors to HassioAPIError ([@​agners] - [#​113144]) ([hassio docs]) - Bump intents to 2023.3.12 ([@​synesthesiam] - [#​113160]) ([conversation docs]) (dependency) - Bump airthings_ble to 0.7.1 ([@​LaStrada] - [#​113172]) ([airthings_ble docs]) (dependency) - Bump rokuecp to 0.19.2 ([@​ctalkington] - [#​113198]) ([roku docs]) (dependency) - Bump `brother` library to version `4.0.2` ([@​bieniu] - [#​113235]) ([brother docs]) (dependency) - Hotfix import error in ZHA for 2024.3.1 patch release ([@​frenck] - [#​113250]) ([zha docs]) - Fix Twitch auth token refresh ([@​jonnybergdahl] - [#​112833]) ([twitch docs]) - Fix failing google diagnostics test ([@​bdraco] - [#​113095]) ([google docs]) - Add diagnostics for IPP ([@​ctalkington] - [#​113205]) ([ipp docs]) - Apply suggestion failures fail supervisor repair ([@​mdegat01] - [#​113372]) ([hassio docs]) - Supervisor issues update retries on failure ([@​mdegat01] - [#​113373]) ([hassio docs]) - Add loggers to Husqvarna Automower ([@​Thomas55555] - [#​113381]) ([husqvarna_automower docs]) [#​108254]: home-assistant/core#108254 [#​110185]: home-assistant/core#110185 [#​110253]: home-assistant/core#110253 [#​110882]: home-assistant/core#110882 [#​111133]: home-assistant/core#111133 [#​111441]: home-assistant/core#111441 [#​111487]: home-assistant/core#111487 [#​111648]: home-assistant/core#111648 [#​112262]: home-assistant/core#112262 [#​112272]: home-assistant/core#112272 [#​112415]: home-assistant/core#112415 [#​112515]: home-assistant/core#112515 [#​112516]: home-assistant/core#112516 [#​112554]: home-assistant/core#112554 [#​112578]: home-assistant/core#112578 [#​112589]: home-assistant/core#112589 [#​112590]: home-assistant/core#112590 [#​112618]: home-assistant/core#112618 [#​112619]: home-assistant/core#112619 [#​112620]: home-assistant/core#112620 [#​112623]: home-assistant/core#112623 [#​112627]: home-assistant/core#112627 [#​112629]: home-assistant/core#112629 [#​112632]: home-assistant/core#112632 [#​112646]: home-assistant/core#112646 [#​112661]: home-assistant/core#112661 [#​112675]: home-assistant/core#112675 [#​112676]: home-assistant/core#112676 [#​112686]: home-assistant/core#112686 [#​112696]: home-assistant/core#112696 [#​112701]: home-assistant/core#112701 [#​112718]: home-assistant/core#112718 [#​112745]: home-assistant/core#112745 [#​112747]: home-assistant/core#112747 [#​112783]: home-assistant/core#112783 [#​112795]: home-assistant/core#112795 [#​112796]: home-assistant/core#112796 [#​112833]: home-assistant/core#112833 [#​112838]: home-assistant/core#112838 [#​112861]: home-assistant/core#112861 [#​112890]: home-assistant/core#112890 [#​113007]: home-assistant/core#113007 [#​113008]: home-assistant/core#113008 [#​113019]: home-assistant/core#113019 [#​113021]: home-assistant/core#113021 [#​113034]: home-assistant/core#113034 [#​113035]: home-assistant/core#113035 [#​113054]: home-assistant/core#113054 [#​113056]: home-assistant/core#113056 [#​113064]: home-assistant/core#113064 [#​113066]: home-assistant/core#113066 [#​113071]: home-assistant/core#113071 [#​113091]: home-assistant/core#113091 [#​113095]: home-assistant/core#113095 [#​113096]: home-assistant/core#113096 [#​113135]: home-assistant/core#113135 [#​113144]: home-assistant/core#113144 [#​113160]: home-assistant/core#113160 [#​113172]: home-assistant/core#113172 [#​113198]: home-assistant/core#113198 [#​113205]: home-assistant/core#113205 [#​113235]: home-assistant/core#113235 [#​113250]: home-assistant/core#113250 [#​113372]: home-assistant/core#113372 [#​113373]: home-assistant/core#113373 [#​113381]: home-assistant/core#113381 [@​Ernst79]: https://github.com/Ernst79 [@​FieldofClay]: https://github.com/FieldofClay [@​FlyingFeng2021]: https://github.com/FlyingFeng2021 [@​Kane610]: https://github.com/Kane610 [@​LaStrada]: https://github.com/LaStrada [@​LukasdeBoer]: https://github.com/LukasdeBoer [@​OnFreund]: https://github.com/OnFreund [@​StevenLooman]: https://github.com/StevenLooman [@​Thomas55555]: https://github.com/Thomas55555 [@​agners]: https://github.com/agners [@​alinbalutoiu]: https://github.com/alinbalutoiu [@​alistair23]: https://github.com/alistair23 [@​allenporter]: https://github.com/allenporter [@​bachya]: https://github.com/bachya [@​balloob]: https://github.com/balloob [@​bdraco]: https://github.com/bdraco [@​bieniu]: https://github.com/bieniu [@​bramkragten]: https://github.com/bramkragten [@​catsmanac]: https://github.com/catsmanac [@​clssn]: https://github.com/clssn [@​cottsay]: https://github.com/cottsay [@​ctalkington]: https://github.com/ctalkington [@​dknowles2]: https://github.com/dknowles2 [@​emontnemery]: https://github.com/emontnemery [@​folke]: https://github.com/folke [@​frenck]: https://github.com/frenck [@​j-stienstra]: https://github.com/j-stienstra [@​janiversen]: https://github.com/janiversen [@​jbouwh]: https://github.com/jbouwh [@​jeeftor]: https://github.com/jeeftor [@​jonnybergdahl]: https://github.com/jonnybergdahl [@​lextm]: https://github.com/lextm [@​marcelveldt]: https://github.com/marcelveldt [@​mattmccormack]: https://github.com/mattmccormack [@​mdegat01]: https://github.com/mdegat01 [@​mikewoudenberg]: https://github.com/mikewoudenberg [@​mrchi]: https://github.com/mrchi [@​puddly]: https://github.com/puddly [@​synesthesiam]: https://github.com/synesthesiam [@​thecode]: https://github.com/thecode [@​tr4nt0r]: https://github.com/tr4nt0r [@​zweckj]: https://github.com/zweckj [airthings_ble docs]: https://www.home-assistant.io/integrations/airthings_ble/ [aussie_broadband docs]: https://www.home-assistant.io/integrations/aussie_broadband/ [axis docs]: https://www.home-assistant.io/integrations/axis/ [bosch_shc docs]: https://www.home-assistant.io/integrations/bosch_shc/ [bring docs]: https://www.home-assistant.io/integrations/bring/ [brother docs]: https://www.home-assistant.io/integrations/brother/ [bthome docs]: https://www.home-assistant.io/integrations/bthome/ [calendar docs]: https://www.home-assistant.io/integrations/calendar/ [camera docs]: https://www.home-assistant.io/integrations/camera/ [climate docs]: https://www.home-assistant.io/integrations/climate/ [conversation docs]: https://www.home-assistant.io/integrations/conversation/ [dhcp docs]: https://www.home-assistant.io/integrations/dhcp/ [enphase_envoy docs]: https://www.home-assistant.io/integrations/enphase_envoy/ [frontend docs]: https://www.home-assistant.io/integrations/frontend/ [gardena_bluetooth docs]: https://www.home-assistant.io/integrations/gardena_bluetooth/ [gios docs]: https://www.home-assistant.io/integrations/gios/ [google docs]: https://www.home-assistant.io/integrations/google/ [google_assistant docs]: https://www.home-assistant.io/integrations/google_assistant/ [hassio docs]: https://www.home-assistant.io/integrations/hassio/ [hue docs]: https://www.home-assistant.io/integrations/hue/ [husqvarna_automower docs]: https://www.home-assistant.io/integrations/husqvarna_automower/ [hydrawise docs]: https://www.home-assistant.io/integrations/hydrawise/ [ipp docs]: https://www.home-assistant.io/integrations/ipp/ [jellyfin docs]: https://www.home-assistant.io/integrations/jellyfin/ [juicenet docs]: https://www.home-assistant.io/integrations/juicenet/ [kitchen_sink docs]: https://www.home-assistant.io/integrations/kitchen_sink/ [local_calendar docs]: https://www.home-assistant.io/integrations/local_calendar/ [local_todo docs]: https://www.home-assistant.io/integrations/local_todo/ [loqed docs]: https://www.home-assistant.io/integrations/loqed/ [luci docs]: https://www.home-assistant.io/integrations/luci/ [mjpeg docs]: https://www.home-assistant.io/integrations/mjpeg/ [modbus docs]: https://www.home-assistant.io/integrations/modbus/ [notion docs]: https://www.home-assistant.io/integrations/notion/ [numato docs]: https://www.home-assistant.io/integrations/numato/ [rainforest_raven docs]: https://www.home-assistant.io/integrations/rainforest_raven/ [recorder docs]: https://www.home-assistant.io/integrations/recorder/ [roku docs]: https://www.home-assistant.io/integrations/roku/ [rova docs]: https://www.home-assistant.io/integrations/rova/ [snmp docs]: https://www.home-assistant.io/integrations/snmp/ [tado docs]: https://www.home-assistant.io/integrations/tado/ [tedee docs]: https://www.home-assistant.io/integrations/tedee/ [twitch docs]: https://www.home-assistant.io/integrations/twitch/ [upnp docs]: https://www.home-assistant.io/integrations/upnp/ [vicare docs]: https://www.home-assistant.io/integrations/vicare/ [weatherflow_cloud docs]: https://www.home-assistant.io/integrations/weatherflow_cloud/ [zha docs]: https://www.home-assistant.io/integrations/zha/ </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Reviewed-on: https://git.internal/nrdufour/home-ops/pulls/437 Co-authored-by: Renovate <renovate@ptinem.io> Co-committed-by: Renovate <renovate@ptinem.io>
Proposed change
Applying a suggestion in supervisor via repair is still always succeeding even if it failed behind the scenes after #111162 . Appears that is because the apply suggestion API in handler only returns
TrueorFalse, it never raises. Adjusted code to treatFalseresponse as failure and correctly abort the repair when the suggestion fails to apply.Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.To help with the load of incoming pull requests: