[PR #504] [MERGED] refactor: centralize routine labels #543

Closed
opened 2026-02-16 01:16:17 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/504
Author: @Yeuoly
Created: 11/14/2025
Status: Merged
Merged: 11/14/2025
Merged by: @Yeuoly

Base: refactor/local-runtimeHead: codex/refactor-routine.submit-label-handling


📝 Commits (1)

  • b150c82 refactor: centralize routine labels

📊 Changes

21 files changed (+148 additions, -91 deletions)

View changed files

📝 internal/cluster/cluster_lifetime.go (+4 -3)
📝 internal/core/control_panel/launcher_local.go (+7 -6)
📝 internal/core/control_panel/server_local.go (+4 -3)
📝 internal/core/dify_invocation/real/http_request.go (+4 -3)
📝 internal/core/plugin_daemon/agent_service.go (+4 -2)
📝 internal/core/plugin_daemon/backwards_invocation/task.go (+4 -3)
📝 internal/core/plugin_daemon/endpoint_service.go (+5 -4)
📝 internal/core/plugin_manager/debugging_runtime/io.go (+4 -3)
📝 internal/core/plugin_manager/debugging_runtime/runtime_intialization_handlers.go (+9 -2)
📝 internal/core/plugin_manager/installer.go (+10 -9)
📝 internal/core/plugin_manager/local_runtime/control.go (+10 -6)
📝 internal/core/plugin_manager/local_runtime/setup_python_environment.go (+16 -15)
📝 internal/core/plugin_manager/local_runtime/subprocess.go (+16 -3)
📝 internal/core/plugin_manager/serverless_connector/connector.go (+4 -3)
📝 internal/core/plugin_manager/serverless_runtime/io.go (+6 -5)
📝 internal/service/base_sse.go (+4 -3)
📝 internal/service/endpoint.go (+4 -3)
📝 internal/service/install_plugin.go (+7 -6)
📝 internal/utils/http_requests/http_warpper.go (+4 -3)
📝 internal/utils/routine/pool.go (+7 -6)

...and 1 more files

📄 Description

Summary

  • add pkg/routine with shared label key constants and type alias for routine labels
  • update internal/utils/routine.Submit to consume the shared type and emit consistent profiler labels
  • replace ad-hoc label maps across services and plugin manager code with the centralized constants

Testing

  • go test ./... (fails: requires network access to download go modules and PRIVATE_KEY.pem)

Codex Task


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/504 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 11/14/2025 **Status:** ✅ Merged **Merged:** 11/14/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `refactor/local-runtime` ← **Head:** `codex/refactor-routine.submit-label-handling` --- ### 📝 Commits (1) - [`b150c82`](https://github.com/langgenius/dify-plugin-daemon/commit/b150c8234d51ed8ec2d01177fe27dac810c41381) refactor: centralize routine labels ### 📊 Changes **21 files changed** (+148 additions, -91 deletions) <details> <summary>View changed files</summary> 📝 `internal/cluster/cluster_lifetime.go` (+4 -3) 📝 `internal/core/control_panel/launcher_local.go` (+7 -6) 📝 `internal/core/control_panel/server_local.go` (+4 -3) 📝 `internal/core/dify_invocation/real/http_request.go` (+4 -3) 📝 `internal/core/plugin_daemon/agent_service.go` (+4 -2) 📝 `internal/core/plugin_daemon/backwards_invocation/task.go` (+4 -3) 📝 `internal/core/plugin_daemon/endpoint_service.go` (+5 -4) 📝 `internal/core/plugin_manager/debugging_runtime/io.go` (+4 -3) 📝 `internal/core/plugin_manager/debugging_runtime/runtime_intialization_handlers.go` (+9 -2) 📝 `internal/core/plugin_manager/installer.go` (+10 -9) 📝 `internal/core/plugin_manager/local_runtime/control.go` (+10 -6) 📝 `internal/core/plugin_manager/local_runtime/setup_python_environment.go` (+16 -15) 📝 `internal/core/plugin_manager/local_runtime/subprocess.go` (+16 -3) 📝 `internal/core/plugin_manager/serverless_connector/connector.go` (+4 -3) 📝 `internal/core/plugin_manager/serverless_runtime/io.go` (+6 -5) 📝 `internal/service/base_sse.go` (+4 -3) 📝 `internal/service/endpoint.go` (+4 -3) 📝 `internal/service/install_plugin.go` (+7 -6) 📝 `internal/utils/http_requests/http_warpper.go` (+4 -3) 📝 `internal/utils/routine/pool.go` (+7 -6) _...and 1 more files_ </details> ### 📄 Description ## Summary - add pkg/routine with shared label key constants and type alias for routine labels - update internal/utils/routine.Submit to consume the shared type and emit consistent profiler labels - replace ad-hoc label maps across services and plugin manager code with the centralized constants ## Testing - go test ./... *(fails: requires network access to download go modules and PRIVATE_KEY.pem)* ------ [Codex Task](https://chatgpt.com/codex/tasks/task_b_6916dd3ee8288326b62257f506e1cf00) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:17 -05:00
yindo closed this issue 2026-02-16 01:16:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#543