Skip to content

[O2B-1545] Create GAQ summary tables - #2173

Merged
graduta merged 18 commits into
mainfrom
feature/O2B-1545/Create-GAQ-Summary-Tables
Dec 2, 2026
Merged

graduta merged 18 commits into
mainfrom
feature/O2B-1545/Create-GAQ-Summary-Tables

Conversation

@isaachilly

@isaachilly isaachilly commented Jun 19, 2026 •

Copy link
Copy Markdown
Collaborator

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Notable changes for users:

  • N/A

Notable changes for developers:

  • New GaqSummary Sequelize model, adapter and repository for storing the GAQ summary of a run in a data pass
  • New typedefs SequelizeGaqSummary and GaqSummaryRecord. The entity is not named GaqSummary because that name already means the run-number-to-summary map served by the API
  • Model and typedefs document the column semantics:
    • the three coverages are the raw bad / mc reproducible / explicitly-not-bad split, so mcReproducibleAsNotBad can still be applied when reading
    • null coverages mean never computed or not computable
    • invalidatedAt not null means the summary is stale since that moment
  • The table is not used yet: nothing writes or reads it in this PR

Changes made to the database:

  • New table gaq_summaries, one row per run in a data pass (primary key data_pass_id + run_number, foreign keys to data_passes and runs) with the three coverages, missing verifications count, undefined quality periods count, not_computable, invalidated_at, computed_at, created_at and updated_at
  • Index gaq_summaries_invalidated_at_idx on invalidated_at, to quickly find summaries that need recalculating

@isaachilly
isaachilly requested a review from graduta June 19, 2026 15:51
@isaachilly isaachilly self-assigned this Jun 19, 2026
@isaachilly isaachilly added the DB label Jun 19, 2026
@codecov

codecov Bot commented Jun 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.41935% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.06%. Comparing base (d5c70ba) to head (8a4b788).

Files with missing lines Patch % Lines
lib/database/adapters/GaqSummaryAdapter.js 37.50% 5 Missing ⚠️
...ons/v1/20261202100000-create-gaq-summary-tables.js 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2173      +/-   ##
==========================================
+ Coverage   46.00%   46.06%   +0.05%     
==========================================
  Files        1070     1074       +4     
  Lines       17610    17641      +31     
  Branches     3261     3263       +2     
==========================================
+ Hits         8102     8126      +24     
- Misses       9508     9515       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add GaqSummaryRepository and GaqSummaryInvalidationRepository and export them from the repositories index.

Update migration to replace the previous invalidated_at field with created_at and add updated_at to mirror default Sequelize tables.
Rename and change mcReproducible to be the coverage float not the boolean.
Add a calculation_failed boolean column to gaq_summaries. This allows us to know whether a summary has been attempted to be calculated but unsuccessful due to limited data etc.
Remove not-null constraints from several GAQ summary columns in the migration to allow NULL when values are unavailable.
Store invalidation timestamp directly on gaq_summaries instead of a separate gaq_summary_invalidations table.
Create an index on invalidated_at column of gaq_summaries table to improve query performance, as it is commonly used to fetch the invalidated summary queue.
Sequelize model omitted the primaryKey that migration file defines.
@graduta
graduta force-pushed the feature/O2B-1545/Create-GAQ-Summary-Tables branch from 5fee0a4 to 85bbb13 Compare December 2, 2026 09:36
@graduta
graduta merged commit c89cd52 into main Dec 2, 2026
43 of 45 checks passed
@graduta
graduta deleted the feature/O2B-1545/Create-GAQ-Summary-Tables branch December 2, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants