Skip to content

[BUG] supercheck diff does not detect changes to notification provider settings #298

Description

@pausauer

Description

supercheck diff does not detect changes made to notification provider settings (e.g. bodyTemplate), and reports "no changes" even though the stored config and the rendered body template don't match each other.

Steps to Reproduce

  1. Edit the bodyTemplate of a notification provider (e.g. VictorOps webhook) in the supercheck config.
  2. Run supercheck diff.
  3. Run supercheck config --print and supercheck notification get <ID> and compare their output.

Expected Behavior

supercheck diff should detect and report changes to notification provider settings, including config.bodyTemplate, if they differ from what's currently applied/stored.

Actual Behavior

supercheck diff reports everything as unchanged, even though the body template has been edited:

❯ supercheck diff
Change Plan
  = 8 unchanged
✓ No changes detected. Everything is in sync.

supercheck config --print shows:


{
  "notificationProviders": [
    {
      "id": "019efa02-c173-7608-9c9d-7e5bc3661fb8",
      "name": "VictorOps",
      "type": "webhook",
      "config": {
        "url": "https://alert.victorops.com/integrations/generic/20131114/alert/[REST_ENDPOINT_KEY]/[ROUTING_KEY]",
        "method": "POST",
        "bodyTemplate": "{\"abcd\":\"{{alertAction}}\",\"entity_id\":\"{{dedupKey}}\",\"entity_display_name\":\"{{title}}\",\"state_message\":\"{{message}}\",\"monitoring_tool\":\"supercheck\",\"timestamp\":\"{{timestamp}}\"}"
      }
    }
  ]
}

supercheck notification get 019efa02-c173-7608-9c9d-7e5bc3661fb8 --json shows a different body template for the same provider:

{
  "message_type": "{{alertAction}}",
  "entity_id": "{{dedupKey}}",
  "entity_display_name": "{{title}}",
  "state_message": "{{message}}",
  "monitoring_tool": "supercheck",
  "timestamp": "{{timestamp}}"
}

Note the field abcd vs. message_type — the two commands disagree about what the current body template actually is, and diff flags none of it as a change. This makes it impossible to trust diff for drift detection on notification providers

Environment

  • Version:
    • CLI: 0.1.2
    • Server: 1.3.5
  • OS: MacOS 15.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions