[BUG] ServerPlugin implementing no plugin type interface is silently never started or stopped
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start in DefaultExtensionController.initPlugins(): classes are cast to ServerPlugin then added to serverPlugins only inside instanceof branches for the eight type interfaces. Trace startPlugins(), stopPlugins(), AlertWorker, and DefaultUsageController which all iterate that list. Choose always-register vs reject-with-log, then cover with a plugin that implements ServerPlugin only.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
A server plugin whose class implements ServerPlugin but none of the eight plugin type interfaces is loaded and instantiated, but never registered. As a result its start() and stop() methods are never called, and it is invisible to the other consumers of the plugin list.
I noticed this while working on #120 (PR #397) and am raising it separately rather than changing the behaviour there, since it may well be intentional.
Details
DefaultExtensionController.initPlugins() instantiates each configured server class and casts it to ServerPlugin, then adds it to the serverPlugins list from inside a series of instanceof branches. The types checked are:
ServicePluginChannelPluginCodeTemplateServerPluginDataTypeServerPluginResourcePluginTransmissionModeProviderAuthorizationPluginMultiFactorAuthenticationPlugin
If a plugin class matches none of these, no branch runs, so nothing adds it to serverPlugins. Because startPlugins() and stopPlugins() iterate that list, such a plugin is never started or stopped.
This also affects two other consumers that iterate getServerPlugins():
AlertWorkercollectsAlertActionAcceptorimplementations from the list.AlertActionAcceptordoes not extendServerPlugin, so it is a marker added onto a plugin class. A plugin implementingServerPluginandAlertActionAcceptor, but none of the eight types above, would never receive alert actions.DefaultUsageControllerreports plugin usage from the same list, so the plugin would be missing from usage statistics.
Expected behavior
Either:
- A plugin implementing
ServerPluginis registered and getsstart()/stop()called, regardless of which type interfaces it implements; or - If implementing at least one type interface is a deliberate requirement, the plugin is rejected with a clear log message rather than silently loaded and ignored.
Actual behavior
The plugin is instantiated with no error and then silently ignored: never started, never stopped, and absent from AlertWorker and usage statistics.
Additional context
I have not been able to confirm whether any real plugin is shaped this way, so the practical impact may be nil and this could simply be an undocumented constraint. Flagging it because the silent-ignore path makes it awkward to diagnose from the outside.
Relevant code: DefaultExtensionController.initPlugins(), startPlugins(), stopPlugins(), and AlertWorker's constructor.
- Lingua principale
- Java
- Stelle
- 227
- Fork
- 81
- Merge medio
- 3g 6h
- PR unite (30g)
- 15
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenIntegrationEngine/engine
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenIntegrationEngine/engine#485 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
OpenIntegrationEngine/engine#478 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenIntegrationEngine/engine#355 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenIntegrationEngine/engine#347 ·
I maintainer di solito rispondono entro 2 giorni
-
Fix call-home in test runAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenIntegrationEngine/engine#313 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di OpenIntegrationEngine/engine
Issue simili
-
[Bug] dubbo.protocol.triple.max-message-size is only read from OS environment variablesForse già presa @CCCLL l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
hierynomus/sshj#1070 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
intellij-elixir/intellij-elixir#4492 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
[Server] OpenAPI 3.1 YAML specs generate Object fields: resolveToJSON drops every schema typeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
quarkiverse/quarkus-openapi-generator#1796 · 1 commento ·