Skip to content

fix(site24x7): resolve status always firing and tags never forwarded#6201

Open
Spirax-M1 wants to merge 1 commit intokeephq:mainfrom
Spirax-M1:fix/site24x7-status-and-tags
Open

fix(site24x7): resolve status always firing and tags never forwarded#6201
Spirax-M1 wants to merge 1 commit intokeephq:mainfrom
Spirax-M1:fix/site24x7-status-and-tags

Conversation

@Spirax-M1
Copy link
Copy Markdown

Summary

Fixes two bugs in the Site24x7 provider webhook handler.

Bug #6195 — Alert status always remains "firing" even after recovery

_format_alert() never passed status= to AlertDto, so pydantic's root_validator always defaulted to AlertStatus.FIRING. Added STATUS_MAP to correctly map UP → RESOLVED and DOWN/TROUBLE/CRITICAL → FIRING.

Bug #6196 — Tags/labels never forwarded from webhook payload

_format_alert() ignored the TAGS field entirely. Site24x7 sends tags as comma-separated key:value pairs (e.g. env:prod,team:backend). Now parsed into AlertDto.labels.

Bonus

Added missing source=["site24x7"] to _format_alert().

Tests

16 new unit tests added in tests/providers/site24x7_provider/test_site24x7_bugs.py, all passing.

Closes #6195
Closes #6196

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 4, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 2026

Someone is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 4, 2026

CLA assistant check
All committers have signed the CLA.

@dosubot dosubot bot added Bug Something isn't working Provider Providers related issues labels Apr 4, 2026
@Spirax-M1
Copy link
Copy Markdown
Author

Hi @talboren @shahargl — I've fixed both #6195 and #6196 in this PR.
Would it be possible to add a bounty on these issues via Algora?
Happy to iterate on any feedback in the meantime.

…eephq#6195, keephq#6196)

- Add STATUS_MAP to correctly map "UP" → RESOLVED and DOWN/TROUBLE/CRITICAL → FIRING;
  previously _format_alert() never passed `status` to AlertDto so it always defaulted
  to FIRING via the root_validator fallback.
- Parse TAGS field from webhook payload into AlertDto.labels; supports comma-separated
  "key:value" pairs, plain tag names, and dict payloads.
- Add `source=["site24x7"]` which was missing from _format_alert().
- Add 16 unit tests covering all STATUS values, tag parsing edge cases, and core fields.

Closes keephq#6195
Closes keephq#6196

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Spirax-M1 Spirax-M1 force-pushed the fix/site24x7-status-and-tags branch from 17b720d to a39a24d Compare April 4, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Provider Providers related issues size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Site24 does not send tags and labels via webhook [🐛 Bug]: Site24 is not sending the Resolve status via Webhook

2 participants