Skip to content

fix: prevent metric gold build memory failures - #2144

Merged
aleksdotbar merged 7 commits into
mainfrom
fix/metric-gold-build-memory
Aug 4, 2026
Merged

fix: prevent metric gold build memory failures#2144
aleksdotbar merged 7 commits into
mainfrom
fix/metric-gold-build-memory

Conversation

@aleksdotbar

@aleksdotbar aleksdotbar commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • centralize metric serving-table storage and bounded build settings
  • partition and order evidence and observation tables for serving access
  • avoid repeated Git evidence source scans
  • document storage and rebuild behavior

Validation

  • dbt parse and existing gold tests
  • repeated complete gold builds
  • isolated load and cancellation checks
  • analytics test suite

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
@aleksdotbar
aleksdotbar requested a review from a team as a code owner August 3, 2026 16:07
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@aleksdotbar, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 21907bde-7241-476d-8831-1e964a0914a7

📥 Commits

Reviewing files that changed from the base of the PR and between 711c158 and 0dcf139.

📒 Files selected for processing (13)
  • docs/domain/metrics/specs/DESIGN.md
  • src/ingestion/dbt/macros/metric_serving_table.sql
  • src/ingestion/gold/ai_metric_evidence.sql
  • src/ingestion/gold/ai_metric_observations.sql
  • src/ingestion/gold/collab_metric_evidence.sql
  • src/ingestion/gold/collab_metric_observations.sql
  • src/ingestion/gold/git_metric_evidence.sql
  • src/ingestion/gold/git_metric_observations.sql
  • src/ingestion/gold/task_metric_evidence.sql
  • src/ingestion/gold/task_metric_observations.sql
  • src/ingestion/gold/wiki_metric_evidence.sql
  • src/ingestion/gold/wiki_metric_observations.sql
  • src/ingestion/scripts/connectors-ddl/insight.sql
📝 Walkthrough

Walkthrough

Metric-serving models now use shared ClickHouse query settings, monthly metric-date partitions, and revised ordering keys. Git evidence consolidates pull-request and file-change measure generation into explicit streams. The design specification documents table replacement and cursor invalidation behavior.

Changes

Metric serving models

Layer / File(s) Summary
Shared serving settings and table layouts
docs/domain/metrics/specs/DESIGN.md, src/ingestion/dbt/macros/metric_serving_table.sql, src/ingestion/gold/*_metric_{evidence,observations}.sql
Added shared ClickHouse query settings. Updated metric table ordering and monthly partitioning. Documented atomic replacement and cursor invalidation behavior.
Git evidence measure streams
src/ingestion/gold/git_metric_evidence.sql
Unified pull-request and file-change measure expansion, aggregation, and event output. Applied the shared table settings.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: mitasovr

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change to prevent memory failures during metric gold builds.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/metric-gold-build-memory

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🤖 connectors-ddl snapshot drift

The committed snapshot does not match what this branch actually produces. The regenerated snapshot is waiting in #2145 — review the DDL diff there and merge it into this branch; the gate re-runs on your merge.

Refreshed on every drifting gate run (the regen branch is force-pushed), so it reflects this branch as of the last completed run.

aleksdotbar and others added 4 commits August 4, 2026 00:18
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
…ild-memory

Produced by the connectors-ddl gate from a full bootstrap of this branch: real connector discover, destination-clickhouse, dbt, migrations, then dump-ddl.sh.

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
…gold-build-memory

chore(connectors-ddl): regenerate the snapshot for fix/metric-gold-build-memory
@aleksdotbar
aleksdotbar enabled auto-merge August 3, 2026 16:53
@aleksdotbar
aleksdotbar added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 0bee1bb Aug 4, 2026
40 checks passed
@aleksdotbar
aleksdotbar deleted the fix/metric-gold-build-memory branch August 4, 2026 05:15
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