-
-
Notifications
You must be signed in to change notification settings - Fork 145
bugfixes for target separation #1365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis update refactors alert target notification configuration, renaming and simplifying fields, switching interval units to integer minutes, and adding masking for sensitive target data in HTTP responses. It removes duplicate target validation, updates error handling, and introduces a new resource load step for targets during initialization. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant HTTP_Handler
participant TargetStore
Client->>HTTP_Handler: POST/GET/UPDATE/DELETE /targets
HTTP_Handler->>TargetStore: Fetch/Update Target(s)
TargetStore-->>HTTP_Handler: Target object(s)
HTTP_Handler->>HTTP_Handler: Mask sensitive fields via .mask()
HTTP_Handler-->>Client: Return masked Target(s)
sequenceDiagram
participant App
participant Alerts
participant Targets
App->>Alerts: load_on_init()
Alerts->>Alerts: Load ALERTS, ALERT_HISTORY, ALERT_RULES, ALERT_GROUPS
Alerts->>Targets: Load TARGETS
Targets-->>Alerts: TARGETS loaded or error
Alerts-->>App: Initialization complete (logs errors if any)
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Clippy (1.86.0)
error: failed to get Caused by: Caused by: Caused by: Caused by: 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings
⏰ Context from checks skipped due to timeout of 90000ms (10)
🔇 Additional comments (20)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
"id":self.id | ||
}) | ||
} | ||
TargetType::Other(other_web_hook) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parmesant are we not masking the webhook endpoint? why is there a different behaviour?
we should mask all endpoints irrespective of the target type.
Fixes include-
repeat
tonotificationConfig
and setting least count of interval to 1 minuteDescription
This PR has:
Summary by CodeRabbit
New Features
Bug Fixes
Refactor