Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix:Fixed the problem of plugin installation failure caused by incons… (#22156)

Garden121382a85f28963b6
diff --git a/api/services/plugin/plugin_service.py b/api/services/plugin/plugin_service.py
index d7fb4a7c1b3..0f22afd8dd6 100644
--- a/api/services/plugin/plugin_service.py
+++ b/api/services/plugin/plugin_service.py
@@ -427,6 +427,9 @@ class PluginService:
manager = PluginInstaller()
+ # collect actual plugin_unique_identifiers
+ actual_plugin_unique_identifiers = []
+ metas = []
features = FeatureService.get_system_features()
# check if already downloaded
@@ -437,6 +440,8 @@ class PluginService:
# check if the plugin is available to install
PluginService._check_plugin_installation_scope(plugin_decode_response.verification)
# already downloaded, skip
+ actual_plugin_unique_identifiers.append(plugin_unique_identifier)
+ metas.append({"plugin_unique_identifier": plugin_unique_identifier})
except Exception:
# plugin not installed, download and upload pkg
pkg = download_plugin_pkg(plugin_unique_identifier)
@@ -447,17 +452,15 @@ class PluginService:
)
# check if the plugin is available to install
PluginService._check_plugin_installation_scope(response.verification)
+ # use response plugin_unique_identifier
+ actual_plugin_unique_identifiers.append(response.unique_identifier)
+ metas.append({"plugin_unique_identifier": response.unique_identifier})
return manager.install_from_identifiers(
tenant_id,
- plugin_unique_identifiers,
+ actual_plugin_unique_identifiers,
PluginInstallationSource.Marketplace,
- [
- {
- "plugin_unique_identifier": plugin_unique_identifier,
- }
- for plugin_unique_identifier in plugin_unique_identifiers
- ],
+ metas,
)
@staticmethod