[PR #32284] fix: publish-to-marketplace exports YAML for classic apps instead of ZIP (Vibe Kanban) #33647

Closed
opened 2026-02-21 20:53:39 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/32284

State: closed
Merged: Yes


Summary

The publish-to-creators-platform backend endpoint unconditionally used AppBundleService.export_bundle(), which always produces a ZIP file. This caused classic apps to be incorrectly exported as ZIP bundles when using "Publish to Marketplace" from the editor, even though they should export as plain YAML.

The /apps list page was unaffected because its export logic lives in the frontend, where it correctly checks app.runtime_type to choose between YAML and ZIP export APIs. However, the editor's "Publish to Marketplace" button calls a single backend endpoint that bypassed this distinction.

Changes

  • Modified AppPublishToCreatorsPlatformApi.post() in api/controllers/console/app/app.py to detect whether the app is sandboxed before choosing the export format
  • Sandboxed apps: continue using AppBundleService.export_bundle() → ZIP
  • Classic apps: now use AppDslService.export_dsl() → YAML
  • Sandbox detection uses the same approach as the app list endpoint: checking workflow.get_feature(WorkflowFeatures.SANDBOX).enabled on the draft workflow

Why

Dify has two runtime types for apps:

  • Classic — should export as .yml (YAML DSL)
  • Sandboxed — should export as .zip (bundle with manifest + assets)

The original implementation always exported as ZIP regardless of type, which caused the Creators Platform to receive the wrong file format for classic apps.


This PR was written using Vibe Kanban

**Original Pull Request:** https://github.com/langgenius/dify/pull/32284 **State:** closed **Merged:** Yes --- ## Summary The `publish-to-creators-platform` backend endpoint unconditionally used `AppBundleService.export_bundle()`, which always produces a ZIP file. This caused classic apps to be incorrectly exported as ZIP bundles when using "Publish to Marketplace" from the editor, even though they should export as plain YAML. The `/apps` list page was unaffected because its export logic lives in the frontend, where it correctly checks `app.runtime_type` to choose between YAML and ZIP export APIs. However, the editor's "Publish to Marketplace" button calls a single backend endpoint that bypassed this distinction. ## Changes - Modified `AppPublishToCreatorsPlatformApi.post()` in `api/controllers/console/app/app.py` to detect whether the app is sandboxed before choosing the export format - **Sandboxed apps**: continue using `AppBundleService.export_bundle()` → ZIP - **Classic apps**: now use `AppDslService.export_dsl()` → YAML - Sandbox detection uses the same approach as the app list endpoint: checking `workflow.get_feature(WorkflowFeatures.SANDBOX).enabled` on the draft workflow ## Why Dify has two runtime types for apps: - **Classic** — should export as `.yml` (YAML DSL) - **Sandboxed** — should export as `.zip` (bundle with manifest + assets) The original implementation always exported as ZIP regardless of type, which caused the Creators Platform to receive the wrong file format for classic apps. --- This PR was written using [Vibe Kanban](https://vibekanban.com)
yindo added the pull-request label 2026-02-21 20:53:39 -05:00
yindo closed this issue 2026-02-21 20:53:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#33647