Fix Slack and MS Teams notifiers not reading URL from dashboard config#37
Open
Fix Slack and MS Teams notifiers not reading URL from dashboard config#37
Conversation
Same config key mismatch as #34 (webhook). Both notifiers read self.config.get('webhook_url') but notifications.yaml defines param names as 'slack_webhook_url' and 'msteams_webhook_url'. Dashboard config values were silently dropped. Also adds missing MS Teams auto-enablement block in NotificationManager.load_from_config(), which prevented the notifier from loading via dashboard config or env var at all. Env var fallback paths (INPUT_SLACK_WEBHOOK_URL, INPUT_MSTEAMS_WEBHOOK_URL) were unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SlackNotifierandMSTeamsNotifierboth readself.config.get('webhook_url')butnotifications.yamldefines param names asslack_webhook_urlandmsteams_webhook_url. Same class of bug as Fix webhook notifier not reading URL from dashboard config #34.NotificationManager.load_from_config(), so it couldn't load via dashboard config or env var at all.Root cause
self.config.get('webhook_url')slack_webhook_urlself.config.get('webhook_url')msteams_webhook_urlAdditionally, the manager's
load_from_config()had enablement blocks for slack, webhook, ms_sentinel, jira, sumologic, and github_pr, but none for msteams.Changes
slack_notifier.py:self.config.get('webhook_url')->self.config.get('slack_webhook_url')ms_teams_notifier.py:self.config.get('webhook_url')->self.config.get('msteams_webhook_url')manager.py: Added msteams auto-enablement block + importedget_msteams_webhook_urlReproduction
Testing
tests/test_slack_notifier_params.py(direct params, env var, precedence, manager flow)tests/test_msteams_notifier_params.py(direct params, env var, precedence, manager flow)Context
Found while testing v1.1.1 for a customer. The webhook version of this bug was fixed in #34. This PR completes the fix across all webhook-based notifiers.