-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate configuration handling to the confuse lib, take 2 #364
Conversation
I've tested and verified the following to function: - Telegram - Pushover
This ensures the backwards compatibility is still carried forward of enabling misconfigured handlers.
This prevents it getting interpreted as a valid notifier and causing a warning.
Now only the showcases are run where other tokens are also present
Also, switch SMTP testing to verify SMTP_HOST, not SMTP_USERNAME as username is not a mandatory param for smtp to work, but a host is.
Also amend SMTP testing to allow setting SMTP auth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work, thanks!
SMTP_ENABLE_AUTH=true \ | ||
SMTP_USERNAME=username \ | ||
SMTP_PASSWORD=password \ | ||
python3 -m unittest tests.notifier.test_smtp_notifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing these!
@@ -141,8 +141,6 @@ git pull | |||
./install.sh | |||
``` | |||
|
|||
> Important: Automated migration of config is not supported. Please check that your `config.yaml` has all new fields introduced in `config-example.yaml` and add anything missing. If correctly migrated, you shouldn't get any ERROR logs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
@@ -29,7 +31,7 @@ keep_alive_monitor: | |||
# Enable this and you'll receive a daily summary notification | |||
# on your farm performance at the specified time of the day. | |||
daily_stats: | |||
enable: true | |||
enable: true # default: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent comment! In a future iteration (e.g. when we bump the major version to 1.0) we can switch to more optimistic defaults but as discussed in the previous PR, now we’re keeping the conservative defaults from the code.
"remote_host": str, | ||
"remote_user": str, | ||
"remote_port": int, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
@Artanicus sorry, I might have merged while you’re still in WIP (just read the updated PR description). Feel free to finish the rest in a separate PR, as this one was already looking good and was quite large so I wanted to have it in master as a base for other changes :-) |
No worries, all in all it's fairly solid. Slack I haven't tested yet (slightly more complex integration) but will, Grafana I know fails because it violates a few notifier conventions (have a WIP fix I'll PR separately since it's a bit opinionated), and Pushcut I can't test since they support such a limited set of platforms. |
This enables:
src/default_config.yaml
, which leads to smaller and leaner custom configs.This change touches all integrations and has minor potential for subtle breakage.
The following notifiers have been thoroughly tested:
Notifiers not tested:
Notifiers with known issues:
Notifiers I cannot test myself:
Groundwork for fixing #361