-
-
Notifications
You must be signed in to change notification settings - Fork 153
update: add last triggered at to summary #1420
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
update: add last triggered at to summary #1420
Conversation
WalkthroughExposes an optional last trigger timestamp in alert summaries by inserting "lastTriggeredAt" into the summary map when last_triggered_at exists. No other logic or public API signatures are changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant Alert
participant Summary as Summary Map
Caller->>Alert: to_summary()
activate Alert
Alert->>Summary: insert base fields
alt last_triggered_at is Some
Alert->>Summary: insert "lastTriggeredAt" = timestamp.to_string()
else None
Note right of Alert: No "lastTriggeredAt" key added
end
Alert-->>Caller: Summary
deactivate Alert
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/alerts/mod.rs (1)
679-685
: Prefer RFC 3339 timestamp for API stabilityCurrent to_string() yields a human format (e.g., "… UTC"). Consider RFC 3339 for machine-readability. If you adopt this here, mirror the change for "created" to avoid mixed formats in the same payload.
- serde_json::Value::String(ts.to_string()), + serde_json::Value::String(ts.to_rfc3339()),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/alerts/mod.rs
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Build Default aarch64-apple-darwin
- GitHub Check: Quest Smoke and Load Tests for Distributed deployments
- GitHub Check: coverage
- GitHub Check: Quest Smoke and Load Tests for Standalone deployments
- GitHub Check: Build Default x86_64-apple-darwin
- GitHub Check: Build Default x86_64-pc-windows-msvc
- GitHub Check: Build Default x86_64-unknown-linux-gnu
- GitHub Check: Build Kafka aarch64-apple-darwin
- GitHub Check: Build Kafka x86_64-unknown-linux-gnu
- GitHub Check: Build Default aarch64-unknown-linux-gnu
🔇 Additional comments (2)
src/alerts/mod.rs (2)
679-685
: LGTM: optional lastTriggeredAt added correctlyConditional insert, key casing aligns with existing summary fields, and None is omitted like tags.
679-685
: last_triggered_at assignment verified
Bothupdate_state
implementations insrc/alerts/alert_types.rs
setlast_triggered_at = Some(Utc::now())
when transitioning toAlertState::Triggered
; no further changes needed.
Fixes #XXXX.
Description
This PR has:
Summary by CodeRabbit