feat: add log_builds parameter to build_flow for optional vertex build logging (#3262)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-08-09 11:46:15 -03:00 committed by GitHub
commit b0f80e4638
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -146,6 +146,7 @@ async def build_flow(
files: Optional[list[str]] = None,
stop_component_id: Optional[str] = None,
start_component_id: Optional[str] = None,
log_builds: Optional[bool] = True,
chat_service: "ChatService" = Depends(get_chat_service),
current_user=Depends(get_current_active_user),
telemetry_service: "TelemetryService" = Depends(get_telemetry_service),
@ -250,7 +251,7 @@ async def build_flow(
result_data_response.message = artifacts
# Log the vertex build
if not vertex.will_stream:
if not vertex.will_stream and log_builds:
background_tasks.add_task(
log_vertex_build,
flow_id=flow_id_str,