Skip to content

BDD-129 — Workflows : grands volumes et performance

User story

En tant qu'administrateur, je veux configurer et lancer des workflows alimentés par de gros fichiers dépôt, afin de traiter de grands volumes sans ralentissement systématique de l'éditeur ni blocage artificiel à 100 000 lignes.

Critères d'acceptance

CritèreStatut
Aperçu éditeur Source : parse borné (GET /workflows/depot-preview), pas de parse intégral S3
Lancer : pipeline staging SQL (Mapper, Nettoyer, Croiser, export Destination par lots)
Plus de refus par défaut à 100 000 lignes (WORKFLOW_RUN_MAX_ROWS non défini ou 0 = illimité)
Plafond dur configurable via WORKFLOW_RUN_MAX_ROWS > 0
Avertissement utilisateur au-delà de WORKFLOW_RUN_WARN_ROWS (run en warning + toast)
Upload dépôt : limite globale FILE_SIZE_LIMIT (module documents, inchangé)
Documentation technique + variables d'environnement

Périmètre technique (workflow uniquement)

API

  • GET /workflows/depot-preview?documentUuid= — aperçu borné pour l'éditeur (remplace /sources/preview côté workflow).

Services staging

ServiceRôle
WorkflowDepotPreviewServicePreview parse limité
WorkflowMapperStagingService / WorkflowNettoyerStagingServiceCREATE TABLE AS SELECT sur staging
WorkflowDestinationExportBufferExport CSV/Excel par lots (fetchRowBatch)
WorkflowDepotInputServiceIngest run + limites volume

Variables d'environnement (back/.env.example)

VariableDéfaut (code)Rôle
WORKFLOW_DEPOT_PREVIEW_PARSE_ROWS200Lignes max parsées pour l'aperçu (inférence types)
WORKFLOW_DEPOT_PREVIEW_MAX_ROWS20Lignes renvoyées à l'UI
WORKFLOW_EXPORT_BATCH_SIZE5000Taille des lots export Destination
WORKFLOW_RUN_MAX_ROWSillimitéPlafond dur ; 0 ou absent = pas de plafond
WORKFLOW_RUN_WARN_ROWS500000Seuil d'avertissement (non bloquant) ; 0 = désactivé
FILE_SIZE_LIMIT50 MoUpload dépôt (global, hors module workflow)

Migration SQL

Aucune.

Tests

  • Back : workflow-depot-preview, workflow-volume-limits, workflow-mapper-staging, workflow-nettoyer-staging, workflow-destination-export-buffer, workflow-run-staging-execution.
  • Front : workflow-source-preview.fetch, useWorkflowRun (warning toast).

Doc API

Workflows — grands volumes (BDD-129)