Skip to content

feat: implement fallback when tree_tests_rollup doesn't have data#1853

Open
gustavobtflores wants to merge 1 commit intokernelci:mainfrom
gustavobtflores:feat/tree-tests-rollup-fallback
Open

feat: implement fallback when tree_tests_rollup doesn't have data#1853
gustavobtflores wants to merge 1 commit intokernelci:mainfrom
gustavobtflores:feat/tree-tests-rollup-fallback

Conversation

@gustavobtflores
Copy link
Copy Markdown
Contributor

Description

Adds fallback logic to treeDetailsSummaryView to handle cases where the pre-aggregated tree_tests_rollup table has not yet been populated for a checkout. When rollup data is empty, the endpoint now falls back to the legacy row-by-row query approach to ensure test/boot summary data is still returned.

Changes

  • Added fallback condition in BaseTreeDetailsSummary.get() to detect empty rollup data and trigger legacy query
  • Added _sanitize_test_rows_legacy() method to process legacy test/boot rows (modeled after BaseTreeDetails._sanitize_rows() but without build handling since builds are already processed separately)
  • Added logging with origin, tree name, and git URL for better debugging when fallback is triggered

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a safety-net in the tree details summary endpoint so it can still return boot/test summary data when the pre-aggregated tree_tests_rollup table hasn’t been populated yet for a given checkout.

Changes:

  • Introduces a rollup-empty detection in BaseTreeDetailsSummary.get() and falls back to the legacy get_tree_details_data() query.
  • Adds _sanitize_test_rows_legacy() to compute boot/test summaries from legacy rows (while builds are still handled by the builds-specific query).
  • Logs when the fallback path is triggered to aid debugging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gustavobtflores gustavobtflores force-pushed the feat/tree-tests-rollup-fallback branch from 75c5d36 to eee2dd1 Compare April 14, 2026 15:21
@gustavobtflores gustavobtflores requested a review from Copilot April 14, 2026 15:26
@gustavobtflores gustavobtflores self-assigned this Apr 14, 2026
@gustavobtflores gustavobtflores added the Backend Most or all of the changes for this issue will be in the backend code. label Apr 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Most or all of the changes for this issue will be in the backend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants