nwithan8 / tauticord

A Discord bot that displays live data from Tautulli
GNU General Public License v3.0
107 stars 22 forks source link

[BUG] - Tauticord tries to create a migration file when there are no environment variables #194

Closed vember31 closed 6 months ago

vember31 commented 6 months ago

This bug has not been reported already

You have tried to fix the bug yourself

Current Behavior

Upon upgrading to 4.2.1, even if no environment variables are present in the deployment, it looks like Tauticord is trying to perform a migration to a config file. I recently transitioned everything to the config file manually (a couple of Tauticord versions ago), so don't need Tauticord to perform the migration. The main issue though is it's running into an issue trying to perform a migration.

After upgrading to 4.2.1 I'm running into the errors below, and the container continues to restart itself. Rolling back to 4.2.0 has solved the issue and Tauticord is able to launch.

2024-03-31 02:17:54,302 - [INFO]: Migration 001: Copying environment variables to /config/migration_data/001_env_var_to_config_yaml.yaml
2024-03-31 02:17:54,303 - [INFO]: WARNING: Environment variable configuration is going away soon! Please use a config file instead.
2024-03-31 02:17:54,307 - [ERROR]: Migration 001 failed: [Errno 2] No such file or directory: '/config/migration_data/001_env_var_to_config_yaml.yaml'
2024-03-31 02:17:54,307 - [CRITICAL]: Migrations failed. Exiting...

Let me know if I can provide any other info about my deployment, etc. Thank you for all of the work on Tauticord!

Expected Behavior

No migration is needed if no env variables are present, and shouldn't see a warning about env variables being deprecated if they're not in use too.

Steps to Reproduce

Be on v4.2.1 without env vars and (I think) you'll get the same error as above.

Supporting Information

I deploy this in a kubernetes cluster and can share the helmrelease.yaml if it's needed.

nwithan8 commented 6 months ago

I'm unable to immediately recreate the issue on my end. Could you share the logs in /logs/Tauticord.logs, it should have more information.

Just to confirm, is your /config folder read-write or read-only?

nwithan8 commented 6 months ago

I was able to recreate the issue and patch the issue in v4.2.2