Skip to content

fix: fix delete plugin also delete record in plugin_declarations - #738

Merged
fatelei merged 2 commits into
langgenius:mainfrom
fatelei:issue-736
May 18, 2026
Merged

fix: fix delete plugin also delete record in plugin_declarations#738
fatelei merged 2 commits into
langgenius:mainfrom
fatelei:issue-736

Conversation

@fatelei

@fatelei fatelei commented May 16, 2026

Copy link
Copy Markdown
Contributor

Description

fix #736

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:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working go Pull requests that update go code plugin-daemon labels May 16, 2026

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

Copy link
Copy Markdown
Contributor

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 updates the UninstallPlugin and UpgradePlugin functions to ensure that associated PluginDeclaration records are deleted when a plugin is removed or upgraded. However, the newly added calls to db.DeleteByCondition do not handle returned errors. This could lead to data inconsistency if the deletion fails, as the surrounding transaction would not be rolled back. It is recommended to handle these errors and propagate them accordingly.

Comment thread internal/types/models/curd/atomic.go Outdated
Comment thread internal/types/models/curd/atomic.go Outdated
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 17, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 18, 2026
@fatelei
fatelei merged commit eb3c56e into langgenius:main May 18, 2026
7 checks passed
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 lgtm This PR has been approved by a maintainer 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.

plugin upgrade or degrade plugin file is not exists

2 participants