Skip to content

Comments

Remove unused Grafana compatibility code#492

Merged
yuri-tceretian merged 5 commits intomainfrom
yuri-tseretyan/use-load-compat
Feb 23, 2026
Merged

Remove unused Grafana compatibility code#492
yuri-tceretian merged 5 commits intomainfrom
yuri-tseretyan/use-load-compat

Conversation

@yuri-tceretian
Copy link
Collaborator

@yuri-tceretian yuri-tceretian commented Feb 23, 2026

Description

This pull request removes unused Grafana compatibility code that is no longer relevant and updates related tests accordingly. Additionally, it modifies tests to utilize LoadCompat for improved test consistency.

Changes Made

  • Removed obsolete Grafana compatibility code.
  • Deleted related tests for the removed code.
  • Updated existing tests to use LoadCompat.

Checklist

  • Unit tests added/updated
  • Documentation updated if necessary
  • Code changes reviewed and approved

Note

Low Risk
Primarily removes dead code and updates unit tests to use LoadCompat; runtime behavior should be unchanged aside from test fixtures/validation paths.

Overview
Removes unused Alertmanager/Grafana compatibility helpers, including the standalone Load parser and GrafanaToUpstreamConfig converter, and deletes the associated unit test.

Updates alerting config tests to consistently go through LoadCompat and adjusts fixtures to satisfy the stricter receiver validation/defaulting logic (notably fuller EmailConfig fields and switching complex-route fixtures to webhook receivers).

Written by Cursor Bugbot for commit fb82038. This will update automatically on new commits. Configure here.

@yuri-tceretian yuri-tceretian requested a review from a team as a code owner February 23, 2026 14:19
@github-project-automation github-project-automation bot moved this to In review in Alerting Feb 23, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

@cursor
Copy link

cursor bot commented Feb 23, 2026

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: Invalid YAML key breaks route test
    • Changed webhook_configs:: (double colon) to webhook_configs: (single colon) on line 352, fixing the invalid YAML syntax that was causing the test to fail during parsing instead of testing route conversion logic.

Create PR

Or push these changes by commenting:

@cursor push 2c3eb15e14
Preview (2c3eb15e14)
diff --git a/definition/compat_test.go b/definition/compat_test.go
--- a/definition/compat_test.go
+++ b/definition/compat_test.go
@@ -349,6 +349,6 @@
     webhook_configs:
       - url: http://localhost:8080/alert
   - name: recv2
-    webhook_configs::
+    webhook_configs:
       - url: http://localhost:8080/alert
 `

@yuri-tceretian yuri-tceretian enabled auto-merge (squash) February 23, 2026 17:37
@yuri-tceretian yuri-tceretian merged commit 7038b39 into main Feb 23, 2026
9 checks passed
@yuri-tceretian yuri-tceretian deleted the yuri-tseretyan/use-load-compat branch February 23, 2026 17:39
@github-project-automation github-project-automation bot moved this from In review to Done in Alerting Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants