Skip to content

fix: allow sql alert with multiple datasets - #1765

Merged
nikhilsinhaparseable merged 1 commit into
parseablehq:mainfrom
nikhilsinhaparseable:fix/sql-alerts
Aug 25, 2026
Merged

fix: allow sql alert with multiple datasets#1765
nikhilsinhaparseable merged 1 commit into
parseablehq:mainfrom
nikhilsinhaparseable:fix/sql-alerts

Conversation

@nikhilsinhaparseable

@nikhilsinhaparseable nikhilsinhaparseable commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes

    • Updated alert validation to support multiple datasets for Code alerts.
    • Builder and PromQL alerts continue to require exactly one dataset.
  • Tests

    • Added coverage for dataset validation across all supported alert query types.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 361aecea-a0c6-4893-8508-7a44429626f1

📥 Commits

Reviewing files that changed from the base of the PR and between e499fff and 0ac9c51.

📒 Files selected for processing (1)
  • src/alerts/alert_structs.rs

Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

The alert validation now allows Code alerts to resolve multiple datasets. Builder and PromQL alerts still require exactly one dataset. Tests cover all three query types.

Changes

Alert dataset validation

Layer / File(s) Summary
Query-type validation and tests
src/alerts/alert_structs.rs
Dataset-count validation now targets Builder and PromQL alerts. Tests verify that Code alerts accept multiple datasets, while Builder and PromQL requests fail validation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 0ac9c

No actionable merge-blocking risk remains based on the supplied evidence; the change is merge-ready after normal checks and review.

Poem

I’m a rabbit watching datasets flow,
Code alerts take more than one in tow.
Builder and PromQL keep one neat,
Tests hop along with steady feet,
Validation now knows each alert’s beat.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request has no description. It does not explain the goal, rationale, key changes, testing, comments, or documentation status required by the repository template. Add a pull request description with the Description section, the goal and rationale, the key changes, and the applicable testing, comments, and documentation checklist items. Add an issue reference if one exists.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: allowing SQL alerts to resolve multiple datasets.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@nikhilsinhaparseable
nikhilsinhaparseable merged commit ba38c2f into parseablehq:main Aug 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants