feat: Add pipeline execution UI, stage metrics, and API proxy routes
- Add run pipeline page with job selection UI - Add execution detail page with stage metrics visualization - Add stage_metrics and total_duration_ms to pipeline.executions table - Create Next.js API proxy routes for all pipeline endpoints - Fix trailing slash issues in pipeline-api.ts URLs - Add Docker volume mounts for pipeline packages - Add REVIEWIQ_DATABASE_URL and LLM API keys to docker-compose - Fix JSONB field parsing in execution detail endpoint Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
36
migrations/versions/007_add_stage_metrics.sql
Normal file
36
migrations/versions/007_add_stage_metrics.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- =============================================================================
|
||||
-- Migration: 007_add_stage_metrics.sql
|
||||
-- Add stage-level metrics to pipeline executions
|
||||
-- =============================================================================
|
||||
--
|
||||
-- Adds a JSONB column to store per-stage execution metrics for profiling:
|
||||
-- - duration_ms: execution time per stage
|
||||
-- - records_processed: number of records handled
|
||||
-- - errors: any stage-specific errors
|
||||
--
|
||||
-- Date: 2026-01-24
|
||||
-- =============================================================================
|
||||
|
||||
-- Add stage_metrics column to store per-stage profiling data
|
||||
ALTER TABLE pipeline.executions
|
||||
ADD COLUMN IF NOT EXISTS stage_metrics JSONB;
|
||||
|
||||
COMMENT ON COLUMN pipeline.executions.stage_metrics IS 'Per-stage execution metrics (timing, records processed, errors)';
|
||||
|
||||
-- Example structure:
|
||||
-- {
|
||||
-- "normalize": {"duration_ms": 150, "records_in": 100, "records_out": 100, "success": true},
|
||||
-- "classify": {"duration_ms": 2500, "records_in": 100, "records_out": 100, "success": true},
|
||||
-- "route": {"duration_ms": 80, "records_in": 100, "records_out": 15, "success": true},
|
||||
-- "aggregate": {"duration_ms": 45, "records_in": 100, "records_out": 1, "success": true}
|
||||
-- }
|
||||
|
||||
-- Add total_duration_ms for quick access to overall execution time
|
||||
ALTER TABLE pipeline.executions
|
||||
ADD COLUMN IF NOT EXISTS total_duration_ms INTEGER;
|
||||
|
||||
COMMENT ON COLUMN pipeline.executions.total_duration_ms IS 'Total execution duration in milliseconds';
|
||||
|
||||
-- =============================================================================
|
||||
-- DONE
|
||||
-- =============================================================================
|
||||
Reference in New Issue
Block a user