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
feat(logstore): make `graph` field optional via env variable LOGSTORE… (#30554)
scdeng591ca05c844b
diff --git a/api/.env.example b/api/.env.exampleindex 88611e016ea..44d770ed700 100644--- a/api/.env.example+++ b/api/.env.example@@ -575,6 +575,10 @@ LOGSTORE_DUAL_WRITE_ENABLED=false# Enable dual-read fallback to SQL database when LogStore returns no results (default: true)# Useful for migration scenarios where historical data exists only in SQL databaseLOGSTORE_DUAL_READ_ENABLED=true+# Control flag for whether to write the `graph` field to LogStore.+# If LOGSTORE_ENABLE_PUT_GRAPH_FIELD is "true", write the full `graph` field;+# otherwise write an empty {} instead. Defaults to writing the `graph` field.+LOGSTORE_ENABLE_PUT_GRAPH_FIELD=true# Celery beat configurationCELERY_BEAT_SCHEDULER_TIME=1diff --git a/api/extensions/logstore/repositories/logstore_workflow_execution_repository.py b/api/extensions/logstore/repositories/logstore_workflow_execution_repository.pyindex a6b3706f429..1119534d528 100644--- a/api/extensions/logstore/repositories/logstore_workflow_execution_repository.py+++ b/api/extensions/logstore/repositories/logstore_workflow_execution_repository.py@@ -81,6 +81,11 @@ class LogstoreWorkflowExecutionRepository(WorkflowExecutionRepository):# Set to True to enable dual-write for safe migration, False to use LogStore onlyself._enable_dual_write = os.environ.get("LOGSTORE_DUAL_WRITE_ENABLED", "true").lower() == "true"+ # Control flag for whether to write the `graph` field to LogStore.+ # If LOGSTORE_ENABLE_PUT_GRAPH_FIELD is "true", write the full `graph` field;+ # otherwise write an empty {} instead. Defaults to writing the `graph` field.+ self._enable_put_graph_field = os.environ.get("LOGSTORE_ENABLE_PUT_GRAPH_FIELD", "true").lower() == "true"+def _to_logstore_model(self, domain_model: WorkflowExecution) -> list[tuple[str, str]]:"""Convert a domain model to a logstore model (List[Tuple[str, str]]).@@ -123,7 +128,7 @@ class LogstoreWorkflowExecutionRepository(WorkflowExecutionRepository):("graph",json.dumps(domain_model.graph, ensure_ascii=False, default=to_serializable)- if domain_model.graph+ if domain_model.graph and self._enable_put_graph_fieldelse "{}",),(diff --git a/docker/.env.example b/docker/.env.exampleindex ecb003cd709..66d937e8e71 100644--- a/docker/.env.example+++ b/docker/.env.example@@ -1077,6 +1077,10 @@ LOGSTORE_DUAL_WRITE_ENABLED=false# Enable dual-read fallback to SQL database when LogStore returns no results (default: true)# Useful for migration scenarios where historical data exists only in SQL databaseLOGSTORE_DUAL_READ_ENABLED=true+# Control flag for whether to write the `graph` field to LogStore.+# If LOGSTORE_ENABLE_PUT_GRAPH_FIELD is "true", write the full `graph` field;+# otherwise write an empty {} instead. Defaults to writing the `graph` field.+LOGSTORE_ENABLE_PUT_GRAPH_FIELD=true# HTTP request node in workflow configurationHTTP_REQUEST_NODE_MAX_BINARY_SIZE=10485760diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yamlindex a67141ce051..54b9e744f8e 100644--- a/docker/docker-compose.yaml+++ b/docker/docker-compose.yaml@@ -475,6 +475,7 @@ x-shared-env: &shared-api-worker-envALIYUN_SLS_LOGSTORE_TTL: ${ALIYUN_SLS_LOGSTORE_TTL:-365}LOGSTORE_DUAL_WRITE_ENABLED: ${LOGSTORE_DUAL_WRITE_ENABLED:-false}LOGSTORE_DUAL_READ_ENABLED: ${LOGSTORE_DUAL_READ_ENABLED:-true}+ LOGSTORE_ENABLE_PUT_GRAPH_FIELD: ${LOGSTORE_ENABLE_PUT_GRAPH_FIELD:-true}HTTP_REQUEST_NODE_MAX_BINARY_SIZE: ${HTTP_REQUEST_NODE_MAX_BINARY_SIZE:-10485760}HTTP_REQUEST_NODE_MAX_TEXT_SIZE: ${HTTP_REQUEST_NODE_MAX_TEXT_SIZE:-1048576}HTTP_REQUEST_NODE_SSL_VERIFY: ${HTTP_REQUEST_NODE_SSL_VERIFY:-True}diff --git a/docker/middleware.env.example b/docker/middleware.env.exampleindex f7e0252a6fc..c88dbe5511f 100644--- a/docker/middleware.env.example+++ b/docker/middleware.env.example@@ -233,4 +233,8 @@ ALIYUN_SLS_LOGSTORE_TTL=365LOGSTORE_DUAL_WRITE_ENABLED=true# Enable dual-read fallback to SQL database when LogStore returns no results (default: true)# Useful for migration scenarios where historical data exists only in SQL database-LOGSTORE_DUAL_READ_ENABLED=true\ No newline at end of file+LOGSTORE_DUAL_READ_ENABLED=true+# Control flag for whether to write the `graph` field to LogStore.+# If LOGSTORE_ENABLE_PUT_GRAPH_FIELD is "true", write the full `graph` field;+# otherwise write an empty {} instead. Defaults to writing the `graph` field.+LOGSTORE_ENABLE_PUT_GRAPH_FIELD=true\ No newline at end of file