Skip to content

fix: fix old plugin not exit normally#699

Open
fatelei wants to merge 1 commit intolanggenius:mainfrom
fatelei:issue-698
Open

fix: fix old plugin not exit normally#699
fatelei wants to merge 1 commit intolanggenius:mainfrom
fatelei:issue-698

Conversation

@fatelei
Copy link
Copy Markdown
Contributor

@fatelei fatelei commented Apr 17, 2026

Description

close #698

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (e.g., Fixes #123 or Closes #123)

Additional Information

Please provide any additional context that would help reviewers understand the changes.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working go Pull requests that update go code plugin-daemon labels Apr 17, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the local plugin shutdown process to ensure subprocesses are correctly terminated and to prevent process leaks. Key changes include moving the runtime deletion to the OnRuntimeCloseImpl callback, introducing the PluginShutdownManager interface, and implementing a timeout-based shutdown sequence in RemovePluginIfNeeded that falls back to a forceful shutdown if the graceful attempt fails. The review feedback identifies opportunities to improve the robustness of this logic by treating 'not found' errors as successes during shutdown attempts, which prevents unnecessary task failures if a plugin has already been cleaned up or finishes shutting down just as a timeout occurs.

Comment thread internal/tasks/install_plugin_utils.go
Comment thread internal/tasks/install_plugin_utils.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code plugin-daemon size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

old plugin still run, not exit

1 participant