Fix: Jira dashboard config params not reaching notifier#22
Open
Fix: Jira dashboard config params not reaching notifier#22
Conversation
Two bugs were preventing Jira settings configured in the Socket dashboard
from being used by the Jira notifier:
1. Parameter name mismatch in notifications.yaml
- Dashboard API returns `jiraUrl` -> normalized to `jira_url`
- But notifications.yaml defined param as `name: server`
- Manager looks up params by name, so `jira_url` was never found
- Fixed by renaming params to match dashboard keys: `jira_url`, `jira_project`
2. Priority bug in manager param resolution
- Comment said "app_config -> env var -> default" (app_config highest)
- But code would set val from app_config, then overwrite with default
if env var wasn't set
- Fixed by restructuring: start with default, apply env var, then app_config
Also updated jira_notifier.py to look for the correct param names
(`jira_url`, `jira_project`, `jira_email`, `jira_api_token`) and fall back
to the `auth` dict for backwards compatibility.
Tested locally with simulated dashboard config - all four Jira params now
resolve correctly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Author
Manual Testing CompletedTested the fix locally against a real Jira instance with dashboard-configured credentials. Setup
Before Fix (v1.0.26)After Fix (this branch)ResultJira issue KAN-4 created successfully with the Trivy scan results attached as a comment. The fix correctly resolves the parameter name mismatch and priority bug described in the PR. |
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
Fixes two bugs preventing Jira settings configured in the Socket dashboard from being used by the Jira notifier:
jiraUrl(normalized tojira_url), butnotifications.yamldefined the param asname: server. The manager looks up params by name, sojira_urlwas never found.valfromapp_config, then overwrite it withp_defaultif the env var wasn't set, despite the comment saying app_config should have highest priority.Customer Impact
A customer reported that Jira integration configured via the dashboard wasn't working. Logs showed:
The notifier was enabled (because the manager saw
jira_urlin app_config), but the actual URL value wasn't passed through.Changes
notifications.yaml: Renamed Jira params fromserver/projecttojira_url/jira_projectto match dashboard config keysmanager.py: Fixed param resolution order (default → env var → app_config, with app_config having highest priority)jira_notifier.py: Updated to look for the correct param names with fallback toauthdict for backwards compatibilityTest plan
jira_url,jira_project,jira_email,jira_api_token) now resolve correctly from simulated dashboard config🤖 Generated with Claude Code