fix(views): skip converted tables in first-populate REFRESH #16
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Motstandskraft/spam!16
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/views-first-populate-skip-converted-tables"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
EnsureViewsPopulated(the startup first-populate path) still listssbom_component_viewanddependency_summary_viewin itsREFRESH MATERIALIZED VIEWloop, but #12 converted both to regular tables (maintained byEnsureDerivedTablesPopulated).On a cold database the loop fails on
REFRESH MATERIALIZED VIEW sbom_component_view(not a matview) on every iteration — beforesbom_metadata_viewis ever refreshed. SoviewsPopulated()never returns true and/api/readyzstays 503 for the full 30-minute populate window, so the pod never becomes Ready and the rollout stalls past its progress deadline.Impact
sbom_metadata_view, so the broken refresh is never reached.Fix
Trim the first-populate list to
["sbom_metadata_view"], matching the already-correctRefreshMaterializedViews. The other two are regular tables and don't belong in a matviewREFRESH.Verification
go vet ./internal/db/...clean./api/readyz→ 200 on the first poll (was a 503 stall),sbom_metadata_viewpopulated, zero"is not a materialized view"errors (previously logged every 2s).🤖 Generated with Claude Code