hacs / integration

HACS gives you a powerful UI to handle downloads of all your custom needs.
https://hacs.xyz
MIT License
4.87k stars 1.22k forks source link

Back in time after Re-Enabling experimental mode #3729

Closed erkr closed 1 month ago

erkr commented 1 month ago

System Health details

System Information

version core-2024.5.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.1.73-haos-raspi
arch aarch64
timezone Europe/Amsterdam
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4994 Installed Version | 1.34.0 Stage | running Available Repositories | 1407 Downloaded Repositories | 40 HACS Data | ok
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.05.1 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 219.4 GB disk_used | 62.2 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | File editor (5.8.0), Mosquitto broker (6.4.0), MariaDB (2.7.1), Network UPS Tools (0.13.0), Home Assistant Google Drive Backup (0.112.1), InfluxDB (5.0.0), FTP (5.0.2), phpMyAdmin (0.9.1), Advanced SSH & Web Terminal (18.0.0), MQTT Explorer (browser-1.0.3), WireGuard (0.10.2), Grafana (10.0.0), Music Assistant (2.0.4)
Dashboards dashboards | 6 -- | -- resources | 29 views | 32 mode | storage
Recorder oldest_recorder_run | May 24, 2024 at 11:03 -- | -- current_recorder_run | May 27, 2024 at 19:40 estimated_db_size | 712.92 MiB database_engine | mysql database_version | 10.11.6

Checklist

Describe the issue

Well I went through the rabbit hole after re-enabling experimental mode today. (Besides the need to clear the brower cache, to get rid of 'not loaded in lovelace' errors, and get rid off a mixed old vs experimental UI), I encountered a configuration bug when switching between these modes! I'm convinced it is related too the fact I had experimental mode enabled before! During me previous attempt to enable the mode, the "not loaded in lovelace" scared me off. So I Quickly decided to disable the experimental mode again. When I re-enabled experimental mode today, I went 'administratively' back in time! HACS loaded the config as it was during my previous attempt: The UI showed the components and versions as present a year ago, instead of my current config. It is purely the administrative side that is wrong, as the right components and versions in the custom folders are still there (so HA kept at least running with the right components) In order to fix the HACS administration, I re-played all installs, update and removes as done after the previous attempt. This is really not nice. The current configuring should be migrated.

Reproduction steps

  1. Enable the mode
  2. Make config changes and likely a restart
  3. Disable the mode
  4. Make More changes and wait for Donnie updates
  5. Re-enable the mode
  6. Enjoy the mess ...

Debug logs

Na

Diagnostics dump

Na

hacs-bot[bot] commented 1 month ago

Make sure you have read the issue guidelines and that you filled out the entire template.

If you have an issue identical to this, do not add comments like "same here", "i have this too", instead add a :+1: reaction to the issue description. Thanks! :+1:

ludeeus commented 1 month ago

The current config is migrated, but not if you switch back and forth, it can not know that.

erkr commented 1 month ago

@ludeeus I'm disapointed. "current config: was NOT migrated! in my case there was a year between switching. That is not a weird scenario, but it horribly fails restoring an ancient config

The fix doesn't need to be complex! Just flush any existing target config before migrating the current config to the new mode. 'No need to know any history' Not perfect but much better then reviving a config of a year ago!