dify/api/tests
yyh 12ca422c8a
fix(app-assets): restore atomic batch upload for nested folder targets
The previous nested folder upload flow bypassed the backend batch-upload
contract when parentId was set. Instead of creating the whole metadata
tree in one backend operation, the frontend recursively called
createFolder/getFileUploadUrl for each node.

That introduced two regressions for uploads into subfolders:

- consistency regression: mid-sequence failures could leave partially
  created folder trees under the destination folder
- performance regression: metadata creation degraded from a single
  batch request to O(files + folders) round-trips before file bytes
  were uploaded

This change moves nested uploads back to the original batch semantics:

- add optional parent_id support to app asset batch-upload payload
- create the whole nested tree under the target parent in
  AppAssetService.batch_create_from_tree
- pass parentId through useBatchUpload instead of using per-node
  createFolder/getFileUploadUrl calls
- remove the now-unnecessary useBatchUploadOperation wrapper
- add a backend unit test covering batch tree creation under an
  existing parent folder

After this change, both root uploads and subfolder uploads use the same
single-request metadata creation path, preserving atomic tree creation
semantics and avoiding avoidable metadata round-trips.
2026-03-26 15:16:55 +08:00
..
fixtures feat: implement file structured output 2026-02-05 00:11:39 +08:00
integration_tests Merge branch 'main' into feat/support-agent-sandbox 2026-03-25 10:11:16 +08:00
test_containers_integration_tests Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-03-25 13:45:58 +08:00
unit_tests fix(app-assets): restore atomic batch upload for nested folder targets 2026-03-26 15:16:55 +08:00
__init__.py Initial commit 2023-05-15 08:51:32 +08:00
conftest.py refactor(workflow-file): move core.file to core.workflow.file (#32252) 2026-02-16 22:38:19 +08:00
workflow_test_utils.py refactor(dify_graph): introduce run_context and delegate child engine creation (#32964) 2026-03-05 14:31:28 +08:00