Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor(api): clarify published RAG pipeline invoke naming (#30644)
-LAN-55de731f9c70
diff --git a/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py b/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.pyindex 46d67f0581e..02efc54eeaa 100644--- a/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py+++ b/api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py@@ -355,7 +355,7 @@ class PublishedRagPipelineRunApi(Resource):pipeline=pipeline,user=current_user,args=args,- invoke_from=InvokeFrom.DEBUGGER if payload.is_preview else InvokeFrom.PUBLISHED,+ invoke_from=InvokeFrom.DEBUGGER if payload.is_preview else InvokeFrom.PUBLISHED_PIPELINE,streaming=streaming,)diff --git a/api/controllers/service_api/dataset/rag_pipeline/rag_pipeline_workflow.py b/api/controllers/service_api/dataset/rag_pipeline/rag_pipeline_workflow.pyindex 0a2017e2bdb..70b50302372 100644--- a/api/controllers/service_api/dataset/rag_pipeline/rag_pipeline_workflow.py+++ b/api/controllers/service_api/dataset/rag_pipeline/rag_pipeline_workflow.py@@ -174,7 +174,7 @@ class PipelineRunApi(DatasetApiResource):pipeline=pipeline,user=current_user,args=payload.model_dump(),- invoke_from=InvokeFrom.PUBLISHED if payload.is_published else InvokeFrom.DEBUGGER,+ invoke_from=InvokeFrom.PUBLISHED_PIPELINE if payload.is_published else InvokeFrom.DEBUGGER,streaming=payload.response_mode == "streaming",)diff --git a/api/core/app/apps/pipeline/pipeline_generator.py b/api/core/app/apps/pipeline/pipeline_generator.pyindex 13eb40fd607..ea4441b5d8e 100644--- a/api/core/app/apps/pipeline/pipeline_generator.py+++ b/api/core/app/apps/pipeline/pipeline_generator.py@@ -130,7 +130,7 @@ class PipelineGenerator(BaseAppGenerator):pipeline=pipeline, workflow=workflow, start_node_id=start_node_id)documents: list[Document] = []- if invoke_from == InvokeFrom.PUBLISHED and not is_retry and not args.get("original_document_id"):+ if invoke_from == InvokeFrom.PUBLISHED_PIPELINE and not is_retry and not args.get("original_document_id"):from services.dataset_service import DocumentServicefor datasource_info in datasource_info_list:@@ -156,7 +156,7 @@ class PipelineGenerator(BaseAppGenerator):for i, datasource_info in enumerate(datasource_info_list):workflow_run_id = str(uuid.uuid4())document_id = args.get("original_document_id") or None- if invoke_from == InvokeFrom.PUBLISHED and not is_retry:+ if invoke_from == InvokeFrom.PUBLISHED_PIPELINE and not is_retry:document_id = document_id or documents[i].iddocument_pipeline_execution_log = DocumentPipelineExecutionLog(document_id=document_id,diff --git a/api/core/app/entities/app_invoke_entities.py b/api/core/app/entities/app_invoke_entities.pyindex 0cb573cb863..5bc453420dc 100644--- a/api/core/app/entities/app_invoke_entities.py+++ b/api/core/app/entities/app_invoke_entities.py@@ -42,7 +42,8 @@ class InvokeFrom(StrEnum):# DEBUGGER indicates that this invocation is from# the workflow (or chatflow) edit page.DEBUGGER = "debugger"- PUBLISHED = "published"+ # PUBLISHED_PIPELINE indicates that this invocation runs a published RAG pipeline workflow.+ PUBLISHED_PIPELINE = "published"# VALIDATION indicates that this invocation is from validation.VALIDATION = "validation"diff --git a/api/services/rag_pipeline/rag_pipeline.py b/api/services/rag_pipeline/rag_pipeline.pyindex f53448e7fe6..1ba64813ba0 100644--- a/api/services/rag_pipeline/rag_pipeline.py+++ b/api/services/rag_pipeline/rag_pipeline.py@@ -874,7 +874,7 @@ class RagPipelineService:variable_pool = node_instance.graph_runtime_state.variable_poolinvoke_from = variable_pool.get(["sys", SystemVariableKey.INVOKE_FROM])if invoke_from:- if invoke_from.value == InvokeFrom.PUBLISHED:+ if invoke_from.value == InvokeFrom.PUBLISHED_PIPELINE:document_id = variable_pool.get(["sys", SystemVariableKey.DOCUMENT_ID])if document_id:document = db.session.query(Document).where(Document.id == document_id.value).first()@@ -1318,7 +1318,7 @@ class RagPipelineService:"datasource_info_list": [json.loads(document_pipeline_execution_log.datasource_info)],"original_document_id": document.id,},- invoke_from=InvokeFrom.PUBLISHED,+ invoke_from=InvokeFrom.PUBLISHED_PIPELINE,streaming=False,call_depth=0,workflow_thread_pool_id=None,diff --git a/api/tasks/rag_pipeline/priority_rag_pipeline_run_task.py b/api/tasks/rag_pipeline/priority_rag_pipeline_run_task.pyindex 1eef361a92f..3c5e152520a 100644--- a/api/tasks/rag_pipeline/priority_rag_pipeline_run_task.py+++ b/api/tasks/rag_pipeline/priority_rag_pipeline_run_task.py@@ -178,7 +178,7 @@ def run_single_rag_pipeline_task(rag_pipeline_invoke_entity: Mapping[str, Any],workflow_id=workflow_id,user=account,application_generate_entity=entity,- invoke_from=InvokeFrom.PUBLISHED,+ invoke_from=InvokeFrom.PUBLISHED_PIPELINE,workflow_execution_repository=workflow_execution_repository,workflow_node_execution_repository=workflow_node_execution_repository,streaming=streaming,diff --git a/api/tasks/rag_pipeline/rag_pipeline_run_task.py b/api/tasks/rag_pipeline/rag_pipeline_run_task.pyindex 275f5abe6e7..093342d1a30 100644--- a/api/tasks/rag_pipeline/rag_pipeline_run_task.py+++ b/api/tasks/rag_pipeline/rag_pipeline_run_task.py@@ -178,7 +178,7 @@ def run_single_rag_pipeline_task(rag_pipeline_invoke_entity: Mapping[str, Any],workflow_id=workflow_id,user=account,application_generate_entity=entity,- invoke_from=InvokeFrom.PUBLISHED,+ invoke_from=InvokeFrom.PUBLISHED_PIPELINE,workflow_execution_repository=workflow_execution_repository,workflow_node_execution_repository=workflow_node_execution_repository,streaming=streaming,diff --git a/api/tests/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py b/api/tests/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.pyindex e29b98037ff..b9977b1fb6f 100644--- a/api/tests/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py+++ b/api/tests/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py@@ -165,7 +165,7 @@ class TestRagPipelineRunTasks:"files": [],"user_id": account.id,"stream": False,- "invoke_from": "published",+ "invoke_from": InvokeFrom.PUBLISHED_PIPELINE.value,"workflow_execution_id": str(uuid.uuid4()),"pipeline_config": {"app_id": str(uuid.uuid4()),@@ -249,7 +249,7 @@ class TestRagPipelineRunTasks:assert call_kwargs["pipeline"].id == pipeline.idassert call_kwargs["workflow_id"] == workflow.idassert call_kwargs["user"].id == account.id- assert call_kwargs["invoke_from"] == InvokeFrom.PUBLISHED+ assert call_kwargs["invoke_from"] == InvokeFrom.PUBLISHED_PIPELINEassert call_kwargs["streaming"] == Falseassert isinstance(call_kwargs["application_generate_entity"], RagPipelineGenerateEntity)@@ -294,7 +294,7 @@ class TestRagPipelineRunTasks:assert call_kwargs["pipeline"].id == pipeline.idassert call_kwargs["workflow_id"] == workflow.idassert call_kwargs["user"].id == account.id- assert call_kwargs["invoke_from"] == InvokeFrom.PUBLISHED+ assert call_kwargs["invoke_from"] == InvokeFrom.PUBLISHED_PIPELINEassert call_kwargs["streaming"] == Falseassert isinstance(call_kwargs["application_generate_entity"], RagPipelineGenerateEntity)@@ -743,7 +743,7 @@ class TestRagPipelineRunTasks:assert call_kwargs["pipeline"].id == pipeline.idassert call_kwargs["workflow_id"] == workflow.idassert call_kwargs["user"].id == account.id- assert call_kwargs["invoke_from"] == InvokeFrom.PUBLISHED+ assert call_kwargs["invoke_from"] == InvokeFrom.PUBLISHED_PIPELINEassert call_kwargs["streaming"] == Falseassert isinstance(call_kwargs["application_generate_entity"], RagPipelineGenerateEntity)diff --git a/api/tests/unit_tests/core/app/apps/common/test_workflow_response_converter_truncation.py b/api/tests/unit_tests/core/app/apps/common/test_workflow_response_converter_truncation.pyindex 1c9f577a501..6b40bf462b8 100644--- a/api/tests/unit_tests/core/app/apps/common/test_workflow_response_converter_truncation.py+++ b/api/tests/unit_tests/core/app/apps/common/test_workflow_response_converter_truncation.py@@ -431,10 +431,10 @@ class TestWorkflowResponseConverterServiceApiTruncation:description="Explore calls should have truncation enabled",),TestCase(- name="published_truncation_enabled",- invoke_from=InvokeFrom.PUBLISHED,+ name="published_pipeline_truncation_enabled",+ invoke_from=InvokeFrom.PUBLISHED_PIPELINE,expected_truncation_enabled=True,- description="Published app calls should have truncation enabled",+ description="Published pipeline calls should have truncation enabled",),],ids=lambda x: x.name,