Set firing to toJson#587
Conversation
|
Skipping CI for Draft Pull Request. |
WalkthroughThe PagerDuty configuration's detailsMap in createPagerdutyConfig was updated to include a JSON-rendered firing field and to change the resolved field from a templated instance string to JSON-rendered Alerts.Resolved data, while num_firing and num_resolved counts remain unchanged. ChangesPagerDuty Details Payload
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: AlexSmithGH The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
controllers/secret_controller.go (1)
584-587: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd PagerDuty details assertions
controllers/secret_controller_test.go:206-265— the receiver tests cover routing key, severity, proxy, and send-resolved, but notPagerdutyConfig.Details; add checks forfiringandresolvedso template regressions are caught.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@controllers/secret_controller.go` around lines 584 - 587, The receiver tests in SecretController should also validate PagerdutyConfig.Details, since the template now exposes firing and resolved alert payloads. Update the relevant assertions in secret_controller_test.go around the existing PagerDuty receiver checks to verify the details map includes the firing and resolved template entries, alongside the current routing key, severity, proxy, and send-resolved assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@controllers/secret_controller.go`:
- Around line 584-587: The receiver tests in SecretController should also
validate PagerdutyConfig.Details, since the template now exposes firing and
resolved alert payloads. Update the relevant assertions in
secret_controller_test.go around the existing PagerDuty receiver checks to
verify the details map includes the firing and resolved template entries,
alongside the current routing key, severity, proxy, and send-resolved
assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 150b4b9e-ff02-447e-a5b4-ea47eaa0442b
📒 Files selected for processing (1)
controllers/secret_controller.go
Summary by CodeRabbit