Display failure_category/failure_subcategory in Lookout UI#4853
Display failure_category/failure_subcategory in Lookout UI#4853dejanzele merged 1 commit intoarmadaproject:masterfrom
Conversation
Greptile SummaryThis PR replaces the Confidence Score: 5/5Safe to merge — the refactor is straightforward, all layers are updated consistently, and no correctness issues were found. All findings are P2 or below. The SQL, Go model, swagger/codegen, conversion, and UI layers are updated in lock-step. JSON null handling via json_strip_nulls is correct, omitempty tags are properly applied, and the ensurePreferencesAreConsistent migration path handles users with the old errorCategories column ID. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant DB as PostgreSQL (job_run)
participant QB as QueryBuilder
participant GJ as GetJobs handler
participant CV as conversions.ToSwaggerRun
participant UI as Lookout UI
DB->>QB: failure_category, failure_subcategory columns
QB->>QB: json_build_object with failureCategory/failureSubcategory keys
QB->>QB: json_strip_nulls (removes NULL cols)
QB->>GJ: JSON runs array
GJ->>GJ: json.Unmarshal into model.Run{FailureCategory, FailureSubcategory}
GJ->>CV: *model.Run
CV->>UI: models.Run{FailureCategory: string, FailureSubcategory: string}
UI->>UI: JobRun.failureCategory / .failureSubcategory
UI->>UI: JobRunDetails sidebar rows
UI->>UI: FailureCategory + FailureSubcategory table columns
Reviews (9): Last reviewed commit: "Display failure_category/failure_subcate..." | Re-trigger Greptile |
6bb66aa to
a840126
Compare
bee8daa to
5a9c96b
Compare
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
3d72f38 to
470ef8a
Compare
Drops the failure_info jsonb column from job_run. Nothing writes or reads it after #4843 and #4853, and the column was never populated in production outside the opt-in flag path anyway. Also drops the unused FailureInfo field from the queryapi sqlc model. Only merge after #4843 and #4853 have been deployed long enough that we are sure no consumer still depends on the column. Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
Reads the flat failure_category and failure_subcategory columns added in #4843 instead of the failure_info jsonb blob. Updates the querybuilder SQL, the internal Go model, swagger and its generated code, the conversion layer, and the jobs sidebar.
Depends on #4843.