[PR #26463] Feat/blue green install #31444

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

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

State: closed
Merged: No


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

This pull request introduces significant enhancements to the plugin management API, primarily adding support for blue-green deployment strategies and expanding the set of administrative endpoints for plugin lifecycle operations. The changes affect both the API layer and the service implementation, enabling more flexible and robust plugin deployment and upgrade workflows.

This PR depends on [#468](https://github.com/langgenius/dify-plugin-daemon/pull/468).

Key changes include:

Blue-Green Deployment Support

  • Added blue_green and blue_green_mode parameters (with choices "auto" or "manual") to plugin installation and upgrade endpoints, allowing users to specify deployment strategies for safer rollouts. These parameters are now propagated through the API, service, and core layers for all relevant plugin operations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

  • Implemented new endpoints and service methods for blue-green deployment actions:

    • Approve a blue-green deployment (/workspaces/current/plugin/blue_green/approve)
    • Force a plugin runtime offline (/workspaces/current/plugin/blue_green/force_offline)
    • Rollback a blue-green deployment (/workspaces/current/plugin/blue_green/rollback) [1] [2]

Plugin Installation and Upgrade Enhancements

  • Added a new API endpoint and service method for upgrading plugins using a locally uploaded package (/workspaces/current/plugin/upgrade/pkg). [1] [2] [3]

  • Updated installation and upgrade endpoints for plugins from local packages, GitHub, and the marketplace to accept and handle blue-green deployment parameters. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Runtime Management and Observability

  • Introduced a new API endpoint to fetch current plugin runtime connections, with optional filtering by plugin ID (/workspaces/current/plugin/runtime/connections). [1] [2] [3]

These changes collectively provide more control over plugin deployment strategies, improved upgrade workflows, and better runtime management capabilities.

Close #26341

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/26463 **State:** closed **Merged:** No --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 1. Ensure there is an associated issue and you have been assigned to it > 1. Use the correct syntax to link this PR: `Fixes #<issue number>`. This pull request introduces significant enhancements to the plugin management API, primarily adding support for blue-green deployment strategies and expanding the set of administrative endpoints for plugin lifecycle operations. The changes affect both the API layer and the service implementation, enabling more flexible and robust plugin deployment and upgrade workflows. **This PR depends on [[#468](https://github.com/langgenius/dify-plugin-daemon/pull/468)](https://github.com/langgenius/dify-plugin-daemon/pull/468).** ### Key changes include: **Blue-Green Deployment Support** * Added `blue_green` and `blue_green_mode` parameters (with choices "auto" or "manual") to plugin installation and upgrade endpoints, allowing users to specify deployment strategies for safer rollouts. These parameters are now propagated through the API, service, and core layers for all relevant plugin operations. [[1]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR189-R190) [[2]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR250-R251) [[3]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR280-R281) [[4]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR486-R487) [[5]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR454-R465) [[6]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879L375-R417) [[7]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R427-R440) [[8]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R459-R460) [[9]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879L256-R260) [[10]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R300-R301) [[11]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R312-R313) [[12]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R330-R358) [[13]](diffhunk://#diff-777d2f7904ffacd4ee9ade3d250ec7a7938305fe12bf871516e5742a4618ca21R99-R118) [[14]](diffhunk://#diff-777d2f7904ffacd4ee9ade3d250ec7a7938305fe12bf871516e5742a4618ca21R257-R303) * Implemented new endpoints and service methods for blue-green deployment actions: - Approve a blue-green deployment (`/workspaces/current/plugin/blue_green/approve`) - Force a plugin runtime offline (`/workspaces/current/plugin/blue_green/force_offline`) - Rollback a blue-green deployment (`/workspaces/current/plugin/blue_green/rollback`) [[1]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR738-R798) [[2]](diffhunk://#diff-777d2f7904ffacd4ee9ade3d250ec7a7938305fe12bf871516e5742a4618ca21R257-R303) **Plugin Installation and Upgrade Enhancements** * Added a new API endpoint and service method for upgrading plugins using a locally uploaded package (`/workspaces/current/plugin/upgrade/pkg`). [[1]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fL197-R236) [[2]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR724) [[3]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R330-R358) * Updated installation and upgrade endpoints for plugins from local packages, GitHub, and the marketplace to accept and handle blue-green deployment parameters. [[1]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR189-R190) [[2]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR250-R251) [[3]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR280-R281) [[4]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR486-R487) [[5]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR454-R465) [[6]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879L375-R417) [[7]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R427-R440) [[8]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R459-R460) [[9]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879L256-R260) [[10]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R300-R301) [[11]](diffhunk://#diff-e966a78a1dfa2e0b0064f60e428458d899df13007692c094e922351438ca8879R312-R313) **Runtime Management and Observability** * Introduced a new API endpoint to fetch current plugin runtime connections, with optional filtering by plugin ID (`/workspaces/current/plugin/runtime/connections`). [[1]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR383-R400) [[2]](diffhunk://#diff-777d2f7904ffacd4ee9ade3d250ec7a7938305fe12bf871516e5742a4618ca21R211-R221) [[3]](diffhunk://#diff-9e5450a29f911d4fd24c5b896dbe872366aea9297ab2054510a4ac546319ef1fR738-R798) These changes collectively provide more control over plugin deployment strategies, improved upgrade workflows, and better runtime management capabilities. Close #26341 ## Screenshots | Before | After | |--------|-------| | ... | ... | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:49:28 -05:00
yindo closed this issue 2026-02-21 20:49:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#31444