bug fixes: alerts and ingestion script - #1746
Conversation
1. load alerts at server startup 2. delete alert for localfs 3. ingestion script - start and stop path incorrect
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe change normalizes alert tenant keys, makes alert deletion tenant-aware and idempotent, and strengthens collector lifecycle handling. The scripts now resolve paths, quote PowerShell paths, verify shutdown, preserve active PID files, and use safer configuration replacement. ChangesAlert and collector corrections
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/ingest.ps1`:
- Line 176: Update the direct stop commands in scripts/ingest.ps1 at lines 176
and 319-321 and scripts/ingest.sh at line 260 to reuse the management-function
validation, including process identity checks, before signaling a PID. Ensure
PID files are removed only after a confirmed process stop; PowerShell must use
terminating error handling so Remove-Item cannot run after Stop-Process fails,
and the shell command must wait for process exit before deleting the PID file.
- Line 38: Escape the ingest script path before constructing SCRIPT_CMD by
moving the SCRIPT_PATH assignment below the ConvertTo-PowerShellSingleQuoted
helper definition and passing the joined path through that helper. Ensure paths
containing apostrophes remain valid PowerShell single-quoted strings.
In `@scripts/ingest.sh`:
- Line 259: Update the stop/status flow around the PID_FILE handling to wait for
the collector process to exit before removing the PID file, reusing
stop_collector’s existing wait and force-kill logic. Remove unnecessary shell
escaping for the fixed ./otelcol.pid path and ensure the displayed Stop command
does not delete the PID file immediately after kill.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e051c956-c402-44fd-bb0c-840992d33d98
📒 Files selected for processing (5)
scripts/ingest.ps1scripts/ingest.shsrc/alerts/mod.rssrc/metastore/metastores/object_store_metastore.rssrc/storage/mod.rs
Summary by CodeRabbit
Bug Fixes
Improvements