Electric Eel app migration failures

Both Syncthing and Emby apps failed to migrate successfully even though I updated them all the way before updating to EE.

Here is the relevant content of the upgrade log:

[2024/11/24 18:20:03] (DEBUG) app_migrations.migrate():241 - 'syncthing' app failed to migrate successfully: 'Failed to migrate config: Failed to migrate config: Traceback (most recent call last):\n  File "/mnt/.ix-apps/truenas_catalog/trains/stable/syncthing/1.0.31/migrations/migrate_from_kubernetes", line 51, in <module>\n    print(yaml.dump(migrate(yaml.safe_load(f.read()))))\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/mnt/.ix-apps/truenas_catalog/trains/stable/syncthing/1.0.31/migrations/migrate_from_kubernetes", line 19, in migrate\n    "additional_envs": config["syncthingConfig"].get("additionalEnvs", []),\n                       ~~~~~~^^^^^^^^^^^^^^^^^^^\nKeyError: \'syncthingConfig\'\n'

[2024/11/24 18:20:03] (DEBUG) app_migrations.migrate():241 - 'emby' app failed to migrate successfully: 'Failed to migrate config: Failed to migrate config: Traceback (most recent call last):\n  File "/mnt/.ix-apps/truenas_catalog/trains/stable/emby/1.2.2/migrations/migrate_from_kubernetes", line 49, in <module>\n    print(yaml.dump(migrate(yaml.safe_load(f.read()))))\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/mnt/.ix-apps/truenas_catalog/trains/stable/emby/1.2.2/migrations/migrate_from_kubernetes", line 18, in migrate\n    "additional_envs": config["embyConfig"].get("additionalEnvs", []),\n                       ~~~~~~^^^^^^^^^^^^^^\nKeyError: \'embyConfig\'\n'

I have downgraded back to Dragonfish, for now. It seems like it is a simple coding mistake in the upgrade script… if the key is not present then it should just use an empty array instead of raising KeyError. Is there some way to fix this issue?

Here’s the same log output but with newlines in the Python stack traces to make it more readable:

[2024/11/24 18:20:03] (DEBUG) app_migrations.migrate():241 - 'syncthing' app failed to migrate successfully: 'Failed to migrate config: Failed to migrate config: Traceback (most recent call last):
  File "/mnt/.ix-apps/truenas_catalog/trains/stable/syncthing/1.0.31/migrations/migrate_from_kubernetes", line 51, in <module>
    print(yaml.dump(migrate(yaml.safe_load(f.read()))))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/.ix-apps/truenas_catalog/trains/stable/syncthing/1.0.31/migrations/migrate_from_kubernetes", line 19, in migrate
    "additional_envs": config["syncthingConfig"].get("additionalEnvs", []),
                       ~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: \'syncthingConfig\'
'

[2024/11/24 18:20:03] (DEBUG) app_migrations.migrate():241 - 'emby' app failed to migrate successfully: 'Failed to migrate config: Failed to migrate config: Traceback (most recent call last):
  File "/mnt/.ix-apps/truenas_catalog/trains/stable/emby/1.2.2/migrations/migrate_from_kubernetes", line 49, in <module>
    print(yaml.dump(migrate(yaml.safe_load(f.read()))))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/.ix-apps/truenas_catalog/trains/stable/emby/1.2.2/migrations/migrate_from_kubernetes", line 18, in migrate
    "additional_envs": config["embyConfig"].get("additionalEnvs", []),
                       ~~~~~~^^^^^^^^^^^^^^
KeyError: \'embyConfig\'
'

Upgrading the apps may not upgrade the config files that you created way-back-when.

Editing and saving the app configs might help ensure that the config files are also up to date.

Can you also post the contents of /var/log/app_lifecycle.log?

And if you have not yet done so, please gather a debug file from the system and submit a bug report with it.