Skip to content

Commit af760dd

Browse files
authored
Merge pull request #130 from langgenius/fix/graceful-precompile
fix(plugin-manager): log pre-compilation python errors instead of raises it outside to avoid plugins to broken
2 parents ef41d22 + 7b9787b commit af760dd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

internal/core/plugin_manager/local_runtime/environment_python.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,14 @@ func (p *LocalPluginRuntime) InitPythonEnvironment() error {
310310

311311
compileWg.Wait()
312312
if err := compileCmd.Wait(); err != nil {
313-
return fmt.Errorf("failed to pre-compile the plugin: %s", compileErrMsg.String())
313+
// skip the error if the plugin is not compiled
314+
// ISSUE: for some weird reasons, plugins may reference to a broken sdk but it works well itself
315+
// we need to skip it but log the messages
316+
// https://github.com/langgenius/dify/issues/16292
317+
log.Warn("failed to pre-compile the plugin: %s", compileErrMsg.String())
314318
}
315319

316-
log.Info("pre-loading the plugin %s", p.Config.Identity())
320+
log.Info("pre-loaded the plugin %s", p.Config.Identity())
317321

318322
// import dify_plugin to speedup the first launching
319323
// ISSUE: it takes too long to setup all the deps, that's why we choose to preload it

0 commit comments

Comments
 (0)