Skip to content

fix: block workflow DSL export with agent nodes - #38472

Open
zyssyz123 wants to merge 41 commits into
mainfrom
fix/dify-2738-agent-node-dsl-export
Open

fix: block workflow DSL export with agent nodes#38472
zyssyz123 wants to merge 41 commits into
mainfrom
fix/dify-2738-agent-node-dsl-export

Conversation

@zyssyz123

Copy link
Copy Markdown
Contributor

Summary

  • Block workflow DSL export when the draft workflow contains Agent v2 nodes.
  • Add a dedicated service error explaining that Agent node DSL export is unsupported until Agent DSL import/export is available.
  • Add a focused unit test for the Agent v2 export guard.

Verification

  • uv run ruff check api/services/app_dsl_service.py api/services/errors/app.py api/tests/unit_tests/services/test_app_dsl_service.py
  • uv run --project api --dev pyrefly check api/services/app_dsl_service.py api/services/errors/app.py api/tests/unit_tests/services/test_app_dsl_service.py
  • Deployed to deploy/agent and verified on https://agent.dify.dev: GET /console/api/apps/{app_id}/export?include_secret=false for the DIFY-2738 workflow now returns HTTP 400 with Workflow DSL export does not support Agent nodes yet. Remove Agent nodes before exporting.

Note: local pytest exits with a Python segmentation fault during pytest initialization in this machine's uv/Python environment, before collecting tests. The service behavior was validated directly and via the deployed console API.

iamjoel and others added 30 commits July 6, 2026 09:32
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 52.38% 52.38% +0.00%
Strict coverage 51.89% 51.90% +0.00%
Typed symbols 32,093 32,095 +2
Untyped symbols 29,450 29,450 0
Modules 2975 2976 +1

hjlarry
hjlarry previously approved these changes Jul 6, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 6, 2026
Base automatically changed from feat/agent-v2 to main July 6, 2026 14:07
@lyzno1
lyzno1 dismissed hjlarry’s stale review July 6, 2026 14:07

The base branch was changed.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants