Move release metadata from BigQuery to PostgreSQL#3674
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mstaeble The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
bdc3fe8 to
8ec21c3
Compare
3c2fb56 to
35f162a
Compare
35f162a to
3c097a9
Compare
Create a release_definitions table to store release metadata (GA dates, development start dates, previous release, capabilities, etc.) that was previously only available in BigQuery. During the data load cycle, releases fetched from BQ are converted directly from ReleaseRow to ReleaseDefinition and synced to PostgreSQL. All release data consumers now read from PostgreSQL via GetReleasesFromDB and GetReleaseDatesFromDB. The BigQuery release functions (GetReleasesFromBigQuery, GetReleases, QueryReleaseDates) are removed, along with the hardcoded releaseMetadata map from the PostgreSQL data provider and the QueryReleases/QueryReleaseDates methods from the DataProvider interface. Internally, all consumers use models.ReleaseDefinition directly instead of converting through the v1.Release intermediary. Capability constants are defined in pkg/db/models alongside the ReleaseDefinition type. Ref: TRT-2734 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3c097a9 to
f432180
Compare
|
Superseded by #3679 (minimal version). The v1.Release → ReleaseDefinition migration will be a follow-up PR. |
Summary
release_definitionstable in PostgreSQL to store release metadata (GA dates, development start dates, previous release, capabilities, product, status) previously only available in BigQueryrelease-definitionsloader (--loader release-definitions)/api/releases, component readiness, metrics, triage, job run risk analysis, MCP tools, Jira automation) now read from PostgreSQLQueryReleasesandQueryReleaseDatesfrom theDataProviderinterface — release data is no longer a provider concernreleaseMetadatamap from the PostgreSQL data providerGetReleasesFromBigQuery,GetReleases,transformRelease, and the BQreleasedates.gofilemodels.ReleaseDefinitiondirectly instead of thev1.Releaseintermediarypkg/db/modelsalongsideReleaseDefinitionTest plan
go build ./...passesgo vet ./...passesmake lintpassesgo test ./pkg/... ./cmd/...passessippy servewith seed data serves/api/releasesfrom PostgreSQL with correct GA dates, capabilities, and previous release chainStaging verification
Deployed the branch to
sippy-stagingand ran the release-definitions loader as a one-off job in the sippy namespace:This synced 36 release definitions from BigQuery to the staging PostgreSQL database (all OCP releases 3.11 through 5.0, OKD, ROSA, ARO, HyperShift, and CAPI entries).
Verified the following endpoints on
sippy-staging.dptools.openshift.org:GET /api/releasesGET /api/releases/health?release=4.22GET /api/component_readiness?baseRelease=4.21&sampleRelease=4.22(with full params)GET /api/component_readiness/regressions?release=4.22All release data served from PostgreSQL with no BigQuery calls.
Ref: TRT-2734
@coderabbitai ignore
🤖 Generated with Claude Code
[WIP] — do not merge until fully reviewed