[PR #748] [MERGED] Add: Server Version Mismatch Warnings & Alert System #775

Closed
opened 2025-10-31 15:21:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/moghtech/komodo/pull/748
Author: @MP-Tool
Created: 8/20/2025
Status: Merged
Merged: 8/23/2025
Merged by: @mbecker20

Base: 1.19.1Head: ui/version-mismatch-warnings


📝 Commits (10+)

  • b7dabe2 start 1.19.1
  • ac2786f deploy 1.19.1-dev-1
  • 1c79757 feat: implement version mismatch warnings in server UI
  • 5307ebf Merge branch 'moghtech:1.19.1' into 1.19.1
  • 469c49b feat: add warning count to server summary and update backup documentation link
  • 75f6c0b feat: add server version mismatch alert handling and update server summary invalidation logic
  • c1b9f8f Merge branch 'moghtech:1.19.1' into 1.19.1
  • 73e33bb Merge branch '1.19.1' into ui/version-mismatch-warnings
  • 7fdca8f fix: correct version mismatch alert config and disabled server display
  • 69caf63 cleanup

📊 Changes

16 files changed (+345 additions, -21 deletions)

View changed files

📝 bin/core/src/alert/discord.rs (+22 -0)
📝 bin/core/src/alert/mod.rs (+22 -0)
📝 bin/core/src/alert/slack.rs (+26 -0)
📝 bin/core/src/api/read/server.rs (+13 -1)
📝 bin/core/src/monitor/alert/server.rs (+71 -0)
📝 bin/core/src/resource/server.rs (+1 -0)
📝 client/core/rs/src/api/read/server.rs (+2 -0)
📝 client/core/rs/src/entities/alert.rs (+14 -0)
📝 client/core/rs/src/entities/server.rs (+9 -0)
📝 client/core/ts/src/types.ts (+19 -0)
📝 frontend/public/client/types.d.ts (+22 -0)
📝 frontend/src/components/resources/alerter/config/alert_types.tsx (+1 -0)
📝 frontend/src/components/resources/server/config.tsx (+11 -0)
📝 frontend/src/components/resources/server/index.tsx (+74 -9)
📝 frontend/src/components/util.tsx (+26 -1)
📝 frontend/src/lib/color.ts (+12 -10)

📄 Description

Server Version Mismatch Warnings & Alert System

Building upon existing alert infrastructure:

This PR enhances the robust alert system foundation by adding comprehensive version mismatch detection and warnings, ensuring better visibility and proactive monitoring of server version discrepancies across the infrastructure.

Problems Addressed:

🚨 Version Management Issues:

  • Servers with outdated Periphery versions showed misleading "OK" status
  • No automatic notification system for version mismatches between Core and Periphery
  • Version discrepancies were difficult to spot in large server fleets

🎨 UI Inconsistencies:

  • Version mismatches were not visually distinguished from healthy servers
  • No warning indicators for potentially problematic version states

Solutions Implemented:

dashboard servers server new-Alerter-toggle

Backend Alert System:

  • ServerVersionMismatch alert variant: Complete implementation across all notification channels
  • Smart detection logic: Only alerts on actual mismatches (not Unknown/empty versions)
  • Buffer system: Prevents alert spam on transient version detection issues
  • Configurable alerts: New send_version_mismatch_alerts toggle per server

🎯 Multi-Channel Integration: *untested

  • Discord: Rich embedded messages with version details and server links
  • Slack: Formatted blocks with clear mismatch information
  • Ntfy: Concise notifications with severity indicators
  • Pushover: Mobile-friendly alerts with server context

UI Enhancements:

  • Version Mismatch Badges: Yellow warning state instead of misleading "OK" status
  • Smart Status Display: "Version Mismatch" text for clear identification
  • Logical Version Handling: Disabled servers show "Unknown" version appropriately
  • Responsive Design: Warning badges work across all screen sizes

🛡️ WebSocket Optimizations:

  • Selective Updates: Server summary only invalidates on status changes, not stats like CPU, MEM or DISK
  • Performance: Reduced unnecessary re-renders during routine metric updates

Technical Details:

Backend Changes:

  • alert/server.rs: Added version mismatch detection with proper config flag usage
  • alert/*.rs: Exhaustive pattern matching for ServerVersionMismatch in all handlers
  • entities/server.rs: New send_version_mismatch_alerts configuration field
  • resource/server.rs: Proper field mapping for list item population

Frontend Changes:

  • server/index.tsx: Version mismatch detection hooks and warning badges
  • server/config.tsx: Configuration toggle in alerts section
  • lib/socket.tsx: Optimized WebSocket update logic for better performance
  • lib/color.ts: Enhanced color system supporting version mismatch warnings

Impact:

  • 🚀 Proactive Monitoring: Automatic alerts prevent version-related issues
  • 🎨 Clear Visual Feedback: Immediate identification of problematic servers
  • Performance Optimized: Smart WebSocket updates reduce unnecessary renders
  • 🧹 Maintainable Code: Follows existing alert patterns consistently
  • 🛡️ Backwards Compatible: Graceful handling with #[serde(default)] for new fields

Testing:

  • Buffer system prevents alert spam during version transitions
  • UI warning badges display appropriately for mismatch states
  • Configuration toggles work correctly in server settings
  • WebSocket performance improved with selective invalidation
  • No breaking changes to existing functionality

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/moghtech/komodo/pull/748 **Author:** [@MP-Tool](https://github.com/MP-Tool) **Created:** 8/20/2025 **Status:** ✅ Merged **Merged:** 8/23/2025 **Merged by:** [@mbecker20](https://github.com/mbecker20) **Base:** `1.19.1` ← **Head:** `ui/version-mismatch-warnings` --- ### 📝 Commits (10+) - [`b7dabe2`](https://github.com/moghtech/komodo/commit/b7dabe217ca33b8fa5ff374b1672ed3c32b039ca) start 1.19.1 - [`ac2786f`](https://github.com/moghtech/komodo/commit/ac2786f16bab53df08ff8e0e9f5d786ae0b803cc) deploy 1.19.1-dev-1 - [`1c79757`](https://github.com/moghtech/komodo/commit/1c79757f0c0f4fd101100b4b3919d49a044fb95b) feat: implement version mismatch warnings in server UI - [`5307ebf`](https://github.com/moghtech/komodo/commit/5307ebf758a1aa24376f1783a277b477fa0dd0d1) Merge branch 'moghtech:1.19.1' into 1.19.1 - [`469c49b`](https://github.com/moghtech/komodo/commit/469c49b3d2b2ce682af422ed5c97b5710bf56070) feat: add warning count to server summary and update backup documentation link - [`75f6c0b`](https://github.com/moghtech/komodo/commit/75f6c0b6e3188378e16c90869b56e2456bf3dd2c) feat: add server version mismatch alert handling and update server summary invalidation logic - [`c1b9f8f`](https://github.com/moghtech/komodo/commit/c1b9f8f7e0d5a48883de740b37390fbab4ea6057) Merge branch 'moghtech:1.19.1' into 1.19.1 - [`73e33bb`](https://github.com/moghtech/komodo/commit/73e33bba7c06c371c6019bfbf970009d132029cf) Merge branch '1.19.1' into ui/version-mismatch-warnings - [`7fdca8f`](https://github.com/moghtech/komodo/commit/7fdca8f2e067b9ba8437574823b4a7b6adef6c52) fix: correct version mismatch alert config and disabled server display - [`69caf63`](https://github.com/moghtech/komodo/commit/69caf63b0f1aec181fc2723b6a90799a78a4c33f) cleanup ### 📊 Changes **16 files changed** (+345 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `bin/core/src/alert/discord.rs` (+22 -0) 📝 `bin/core/src/alert/mod.rs` (+22 -0) 📝 `bin/core/src/alert/slack.rs` (+26 -0) 📝 `bin/core/src/api/read/server.rs` (+13 -1) 📝 `bin/core/src/monitor/alert/server.rs` (+71 -0) 📝 `bin/core/src/resource/server.rs` (+1 -0) 📝 `client/core/rs/src/api/read/server.rs` (+2 -0) 📝 `client/core/rs/src/entities/alert.rs` (+14 -0) 📝 `client/core/rs/src/entities/server.rs` (+9 -0) 📝 `client/core/ts/src/types.ts` (+19 -0) 📝 `frontend/public/client/types.d.ts` (+22 -0) 📝 `frontend/src/components/resources/alerter/config/alert_types.tsx` (+1 -0) 📝 `frontend/src/components/resources/server/config.tsx` (+11 -0) 📝 `frontend/src/components/resources/server/index.tsx` (+74 -9) 📝 `frontend/src/components/util.tsx` (+26 -1) 📝 `frontend/src/lib/color.ts` (+12 -10) </details> ### 📄 Description # Server Version Mismatch Warnings & Alert System ## Building upon existing alert infrastructure: This PR enhances the robust alert system foundation by adding comprehensive version mismatch detection and warnings, ensuring better visibility and proactive monitoring of server version discrepancies across the infrastructure. ## Problems Addressed: ### 🚨 **Version Management Issues:** - Servers with outdated Periphery versions showed misleading "OK" status - No automatic notification system for version mismatches between Core and Periphery - Version discrepancies were difficult to spot in large server fleets ### 🎨 **UI Inconsistencies:** - Version mismatches were not visually distinguished from healthy servers - No warning indicators for potentially problematic version states ## Solutions Implemented: <img width="1471" height="714" alt="dashboard" src="https://github.com/user-attachments/assets/6cc7fece-db40-41d8-9739-33edff8eb5ca" /> <img width="2938" height="1416" alt="servers" src="https://github.com/user-attachments/assets/bf3f99bc-8cf5-4441-88c0-ab905ec40800" /> <img width="2246" height="468" alt="server" src="https://github.com/user-attachments/assets/f9495e07-63f2-4cd9-aec1-ec60e649df21" /> <img width="2270" height="630" alt="new-Alerter-toggle" src="https://github.com/user-attachments/assets/137961e5-10af-478a-b36d-317d25e6f9ce" /> ### ⚡ **Backend Alert System:** - **ServerVersionMismatch alert variant**: Complete implementation across all notification channels - **Smart detection logic**: Only alerts on actual mismatches (not Unknown/empty versions) - **Buffer system**: Prevents alert spam on transient version detection issues - **Configurable alerts**: New `send_version_mismatch_alerts` toggle per server ### 🎯 **Multi-Channel Integration:** *untested - **Discord**: Rich embedded messages with version details and server links - **Slack**: Formatted blocks with clear mismatch information - **Ntfy**: Concise notifications with severity indicators - **Pushover**: Mobile-friendly alerts with server context ### ✨ **UI Enhancements:** - **Version Mismatch Badges**: Yellow warning state instead of misleading "OK" status - **Smart Status Display**: "Version Mismatch" text for clear identification - **Logical Version Handling**: Disabled servers show "Unknown" version appropriately - **Responsive Design**: Warning badges work across all screen sizes ### 🛡️ **WebSocket Optimizations:** - **Selective Updates**: Server summary only invalidates on status changes, not stats like CPU, MEM or DISK - **Performance**: Reduced unnecessary re-renders during routine metric updates ## Technical Details: ### Backend Changes: - **`alert/server.rs`**: Added version mismatch detection with proper config flag usage - **`alert/*.rs`**: Exhaustive pattern matching for ServerVersionMismatch in all handlers - **`entities/server.rs`**: New `send_version_mismatch_alerts` configuration field - **`resource/server.rs`**: Proper field mapping for list item population ### Frontend Changes: - **`server/index.tsx`**: Version mismatch detection hooks and warning badges - **`server/config.tsx`**: Configuration toggle in alerts section - **`lib/socket.tsx`**: Optimized WebSocket update logic for better performance - **`lib/color.ts`**: Enhanced color system supporting version mismatch warnings ## Impact: - 🚀 **Proactive Monitoring**: Automatic alerts prevent version-related issues - 🎨 **Clear Visual Feedback**: Immediate identification of problematic servers - ⚡ **Performance Optimized**: Smart WebSocket updates reduce unnecessary renders - 🧹 **Maintainable Code**: Follows existing alert patterns consistently - 🛡️ **Backwards Compatible**: Graceful handling with `#[serde(default)]` for new fields ## Testing: - ✅ Buffer system prevents alert spam during version transitions - ✅ UI warning badges display appropriately for mismatch states - ✅ Configuration toggles work correctly in server settings - ✅ WebSocket performance improved with selective invalidation - ✅ No breaking changes to existing functionality --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-10-31 15:21:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#775