Aias00 opened a new issue, #6537:
URL: https://github.com/apache/shenyu/issues/6537
## Description
`create` inserts `NamespacePluginRelDO` and returns, but never calls
`namespacePluginEventPublisher.onCreated(vo)`. The publisher's `onCreated`
(line 63) publishes both `DataChangedEvent(PLUGIN, CREATE)` for gateway sync
and a `NamespacePluginCreatedEvent` for audit — it is simply never invoked from
`create`. Every other mutating method in this service publishes
(`update`->`onUpdated`, `delete`->`onDeleted`, `enabled`->`onEnabled`).
## Location
```
shenyu-admin/.../service/impl/NamespacePluginServiceImpl.java:94-103
namespacePluginEventPublisher.onCreated at
NamespacePluginEventPublisher.java:63
```
## Impact
A plugin added to a namespace via `POST
/namespace-plugin/{namespaceId}/{pluginId}` is saved in the admin DB but never
pushed to the bootstrap/gateway. The plugin is not active in that namespace
until a manual `syncPluginAll`/`syncPluginData` is invoked. No audit log entry
is created either.
## Suggested fix
After `insertSelective`, fetch the VO via
`selectByPluginIdAndNamespaceId(pluginId, namespaceId)` and call
`namespacePluginEventPublisher.onCreated(vo)`.
## Related existing issue(s)
None
_Identified during the 2026-08-02 audit; full list in
[`docs/issue-candidates-2026-08-02.md`](docs/issue-candidates-2026-08-02.md)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]