From 55e2f0a772f1f0ad1a38831042edef394d688013 Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Fri, 6 Feb 2026 00:20:33 -0800 Subject: [PATCH] feat: API Server - Copy PipelineRun annotations to the pipeline_run_annotations table on creation Fixes: https://github.com/TangleML/tangle/issues/84 --- cloud_pipelines_backend/api_server_sql.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cloud_pipelines_backend/api_server_sql.py b/cloud_pipelines_backend/api_server_sql.py index 07eb11b..159ae9c 100644 --- a/cloud_pipelines_backend/api_server_sql.py +++ b/cloud_pipelines_backend/api_server_sql.py @@ -108,6 +108,11 @@ def create( }, ) session.add(pipeline_run) + for key, value in (annotations or {}).items(): + pipeline_run_annotation = bts.PipelineRunAnnotation( + pipeline_run_id=key, key=key, value=value + ) + session.add(pipeline_run_annotation) session.commit() session.refresh(pipeline_run)