drop unused array_agg columns from job runs matview#3652
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughUpdates ChangesjobRunsReportMatView SQL Update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 20 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (20 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Skipping CI for Draft Pull Request. |
Remove failed_test_ids and flaked_test_ids array_agg calls from the test_results CTE in prow_job_runs_report_matview. These columns were computed inside the CTE but never selected by the outer query — they have been dead code since the matview was introduced in PR openshift#365 (2022). Removing them reduces the sort data volume during matview refresh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6b1cabe to
8c47faa
Compare
|
Scheduling required tests: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mstaeble, petr-muller The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest ci/prow/unit |
|
/test ci/prow/unit |
|
/test unit |
|
Scheduling required tests: |
|
@mstaeble: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Remove
failed_test_idsandflaked_test_idsarray_aggcalls from thetest_resultsCTE inprow_job_runs_report_matview. These columns were computed inside the CTE but never selected by the outer query — they have been dead code since the matview was introduced in PR #365 (2022).Context
The
test_resultsCTE aggregates failed/flaked test data fromprow_job_run_tests. It computed fourarray_aggcolumns but only two (failed_test_names,flaked_test_names) were ever referenced in the outer SELECT. The ID variants (failed_test_ids,flaked_test_ids) added unnecessary work during matview refresh — they inflated the sort data volume without contributing to the materialized result.Staging benchmark (CTE portion only): 755s → 614s execution time (~19% faster).
Test plan
go build ./...go vet ./...go test ./pkg/db/... ./pkg/api/... ./pkg/filter/.../api/jobs/runsreturns correct data (no schema change to API consumers)🤖 Generated with Claude Code
Summary by CodeRabbit