Commit Graph

77 Commits

Author SHA1 Message Date
Stream 2c87f0ac8b Merge branch 'feat/plugin-readme' into feat/trigger
# Conflicts:
#	internal/db/init.go
2025-10-23 11:26:38 +08:00
Yeuoly 057d8ec0e4 Check manifest when saving plugin packages (#467) 2025-09-29 18:17:06 +08:00
Stream 5134f3b5d0 feat: add plugin asset extraction endpoint with caching support 2025-08-27 18:54:56 +08:00
homejim 6ae762ba11 feat(plugin_manager): optimize local plugin startup with concurrency (#375)
* feat(plugin_manager): optimize local plugin startup with concurrent control

- Add semaphore-based concurrency control for plugin launches
- Implement parallel plugin startup using goroutines
- Optimize error handling to prevent goroutine blocking
- Add concurrency metrics logging

Note: handleNewLocalPlugins now accepts config parameter with default concurrency limit

* feat(plugin_manager): make local plugin launching concurrency configurable

* fix(plugin_manager): optimize comment and error handling

- Updated comments to clarify the concurrent plugin launching configuration.
- Added a nil check for the error channel during plugin startup to improve code robustness.

* refactor(plugin_manager): refactor plugin startup logic

- Remove the semaphore mechanism and switch to using routine.Submit for concurrency management

* fix(plugin_manager): Optimize plugin startup logs and concurrency control

- Added log output for maximum concurrency when starting local plugins
- Implemented a channel-based concurrency control mechanism to ensure limits are not exceeded
- Fixed closure variable capture issue to prevent incorrect plugin information
- Improved error handling to avoid deadlocks during startup

* fix(plugin_manager): simplify error channel handling and semaphore release logic

---------

Co-authored-by: jim02.he <jim02.he@vipshop.com>
2025-07-08 19:09:31 +08:00
Yeuoly 5f8072c982 Chore/unify configurations (#319)
* refactor: update PluginManager to use configuration for various configurations

- Replaced hardcoded values in PluginManager methods with values from the configuration.
- Updated serverless plugin launch timeout and working paths to utilize the new configuration structure.
- Enhanced local plugin runtime initialization to pull settings from the configuration, improving maintainability and flexibility.

* refactor: clean up PluginManager by removing unused fields and updating platform check

- Removed commented-out fields from PluginManager to enhance code clarity.
- Updated platform check to utilize the configuration structure instead of a direct field reference, improving maintainability.
2025-06-04 20:18:13 +08:00
Yeuoly f8914412d9 fix: support serverless plugin management with execution timeout (#318)
- Added `pluginMaxExecutionTimeout` to `PluginManager` for configurable execution limits.
- Updated `ServerlessPluginRuntime` to utilize the new timeout setting in HTTP requests.
- Refactored AWSPluginRuntime references to ServerlessPluginRuntime for consistency across the codebase.
2025-05-30 18:08:24 +08:00
Byron.wang 1c9e28bc75 Feat: Replace the internal/oss module with dify-cloud-kit (#317)
* replace internal oss with dify-cloud-kit

* remove validate

* fix tests

* fix tests
2025-05-30 16:44:59 +08:00
Zhi 6b112bc8b5 feat(redis): Add support for Redis Sentinel mode (#276)
* feat(redis): Add support for Redis Sentinel mode

Added support for Redis Sentinel mode to the Redis client, enabling automatic discovery and connection to the primary node through Sentinel. Updated relevant configuration files and initialization logic to support Sentinel mode configuration and connection.

* add lost RedisUser.
2025-05-20 14:23:01 +08:00
Good Wood 977665e73b feat: add read & write timeout config (#259)
* feat: add read & write timeout config

* refactor: update Dify invocation configuration to use structured payload

- Changed the Dify invocation daemon to accept a structured payload for initialization, improving clarity and maintainability.
- Updated related configuration variables in the .env.example file to reflect the new naming convention for backwards invocation timeouts.
- Adjusted tests and plugin manager to accommodate the new payload structure.

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-05-06 13:08:02 +08:00
Yeuoly 61bd7d9c8a feat: add configurable stdio buffer sizes for plugins (#256)
- Introduced new configuration options for plugin stdio buffer sizes in the .env.example file.
- Updated the PluginManager and LocalPluginRuntime to utilize these new buffer size settings.
- Enhanced the stdioHolder to accept buffer size configurations, improving plugin output handling.
- Modified related tests to accommodate the new stdioHolder configuration structure.
2025-04-30 15:28:34 +08:00
Taeyoung Park 5d83258371 Add optional Redis username authentication (#218)
* You can include username for Redis Auth

* Redis auth with username - test code update

* fix: tests

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-04-25 20:42:14 +08:00
kurokobo ced2ef3842 feat: support NO_PROXY for initialization process (#199) 2025-04-14 20:03:15 +08:00
Yeuoly 984456b96e feat(plugin_manager): add serverless connector launch timeout configuration and update related functions (#197) 2025-04-11 17:53:39 +08:00
非法操作 618609af3a add uv path config (#187)
* add uv path config

* write uv_path to env during docker build process

* Revert "write uv_path to env during docker build process"

This reverts commit c9501411aa.

* add UVPATH
2025-04-10 15:16:22 +08:00
kurokobo 6f75bcca43 feat: verify plugin with public keys specified in environment variable in addition to official one 2025-04-02 13:48:04 +00:00
quicksandzn b50a0c4403 optimize: add redis db config 2025-03-27 14:48:59 +08:00
Jingxiao Gu b16991eb0d feat(plugin-manager): add support for additional Python compileall arguments
Introduce `pythonCompileAllExtraArgs` to allow users to pass extra arguments to the Python `compileall` command. This enhancement enables more flexible compilation options for plugins by extending the configuration in the plugin manager and local runtime components.

- Updated `launcher.go` to include `PythonCompileAllExtraArgs` in the runtime configuration.
- Modified `environment_python.go` to handle the additional compile arguments.
- Added new configuration fields in `type.go` and `config.go`.
- Adjusted initialization in `manager.go` to accept the new configuration parameter.
2025-03-18 17:04:41 +08:00
Yeuoly cf7649a0b2 feat: add pip configuration options for plugin environment setup (#63)
* feat: add pip configuration options for plugin environment setup

Enhance Python plugin environment initialization with new configuration options:
- Add support for pip prefer binary flag
- Add pip verbose mode
- Add extra pip arguments configuration
- Set default values for new pip-related configuration options

* fix

* fix
2025-03-06 14:53:40 +08:00
Yeuoly b19140ca23 refactor: optimize plugin declaration caching and encoding (#34) 2025-02-25 20:52:51 +08:00
Yeuoly 6a54d44142 refactor: rename aws_lambda to serverless 2025-02-10 15:04:24 +08:00
Yeuoly 975f9d5c31 fix: move packager to pkg 2025-02-06 18:16:49 +08:00
Masashi Tomooka c6c882e86a support REDIS_USE_SSL config parameter (#21)
* support REDIS_USE_SSL config parameter

* fix tests

* add tests
2025-01-30 00:32:38 +08:00
Yeuoly 19ee9fc63d fix: allow pipMirrorUrl to be configured through envs (#15) 2025-01-22 17:40:40 +08:00
非法操作 07a53a4fd7 change variable name 2025-01-14 09:16:18 +08:00
非法操作 d44eb84e5a Merge remote-tracking branch 'myfork/p3' into p2 2025-01-14 09:11:34 +08:00
非法操作 468c0743db use environment variable config python init time 2025-01-13 17:29:56 +08:00
非法操作 7b47d8b79a add proxy for runtime 2025-01-13 16:10:13 +08:00
Yeuoly 15060ee312 refactor: move entities to pkg 2025-01-06 14:52:02 +08:00
Yeuoly 8796edad8c refactor: confused code structure 2025-01-06 14:16:29 +08:00
Yeuoly a401f9928f optimize: using identity to detect whether to use serverless or local plugin manager 2024-12-16 01:59:04 +08:00
Yeuoly d455acb919 fix: avoid saving package before decoding package successfully 2024-11-20 16:58:56 +08:00
Yeuoly eb1456b0d0 refactor: using finer granularity to cache PluginDeclaration 2024-11-13 15:54:45 +08:00
Yeuoly 26fd94ebcd refactor: convert snakecase to camelcase 2024-11-12 21:24:41 +08:00
Yeuoly 2952e15973 fix: avoid creating folders 2024-11-12 15:44:54 +08:00
Yeuoly 84703ef1b4 refactor: uni storage 2024-11-08 19:17:19 +08:00
Yeuoly 670096c977 feat: support detailed error messages 2024-11-06 20:29:28 +08:00
Yeuoly 033636c83f feat: support removing local plugin runtime 2024-11-06 16:06:00 +08:00
Yeuoly 44ca0f71d6 feat: support max launching runtime 2024-11-05 19:30:41 +08:00
Yeuoly 0ecb41e62c enhancement: add testcase for remote plugin manager 2024-10-31 15:26:37 +08:00
Yeuoly 79b6e0450c refactor: install plugin to locals 2024-10-29 17:04:03 +08:00
Yeuoly 4a06bbda09 fix: missing remapping logics 2024-10-25 18:54:03 +08:00
Yeuoly 6adfe92393 refactor: move remapping assets to media manager 2024-10-25 18:43:46 +08:00
Yeuoly eeadb3e29c refactor: support upgrade plugin to any verions 2024-10-25 17:41:14 +08:00
Yeuoly e8f2081e71 fix: missed to init serverless connector 2024-10-24 12:21:12 +08:00
Yeuoly f55a3b2bf8 fix: correctly handle tool invoke message, add metadata 2024-10-22 17:42:39 +08:00
Yeuoly a55f6f507f refactor: install plugin from local 2024-10-18 20:29:02 +08:00
Yeuoly 090f1e004d fix: install progress has bad handing logics 2024-10-16 14:36:48 +08:00
Yeuoly fc7bfc91b4 fix: async install plugins task 2024-10-16 14:01:08 +08:00
Yeuoly 3de55a81ce refactor: installing plugin 2024-10-14 21:07:56 +08:00
Yeuoly 9055ccf69d feat: support install source 2024-10-10 15:01:14 +08:00