Appearance
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ère | Statut |
|---|---|
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/previewcôté workflow).
Services staging
| Service | Rôle |
|---|---|
WorkflowDepotPreviewService | Preview parse limité |
WorkflowMapperStagingService / WorkflowNettoyerStagingService | CREATE TABLE AS SELECT sur staging |
WorkflowDestinationExportBuffer | Export CSV/Excel par lots (fetchRowBatch) |
WorkflowDepotInputService | Ingest run + limites volume |
Variables d'environnement (back/.env.example)
| Variable | Défaut (code) | Rôle |
|---|---|---|
WORKFLOW_DEPOT_PREVIEW_PARSE_ROWS | 200 | Lignes max parsées pour l'aperçu (inférence types) |
WORKFLOW_DEPOT_PREVIEW_MAX_ROWS | 20 | Lignes renvoyées à l'UI |
WORKFLOW_EXPORT_BATCH_SIZE | 5000 | Taille des lots export Destination |
WORKFLOW_RUN_MAX_ROWS | illimité | Plafond dur ; 0 ou absent = pas de plafond |
WORKFLOW_RUN_WARN_ROWS | 500000 | Seuil d'avertissement (non bloquant) ; 0 = désactivé |
FILE_SIZE_LIMIT | 50 Mo | Upload 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).
