[BUG] ServerPlugin implementing no plugin type interface is silently never started or stopped
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 227
- Forks
- 81
- Merge médio
- 2d 18h
- PRs com merge (30d)
- 12
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de OpenIntegrationEngine/engine
-
Outdated GitHub workflow action versionsTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
OpenIntegrationEngine/engine#485 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
OpenIntegrationEngine/engine#478 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
OpenIntegrationEngine/engine#355 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
OpenIntegrationEngine/engine#347 ·
Mantenedores costumam responder em até 1 dia
-
Fix call-home in test runAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
OpenIntegrationEngine/engine#313 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de OpenIntegrationEngine/engine
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
checkstyle/checkstyle#22145 ·
Mantenedores costumam responder em até 1 dia
-
rset command throws NPE in ResultsFormat.guessSyntaxTalvez já em andamento @Ostrzyciel assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
objectionary/eo#9593 ·
Mantenedores costumam responder em até 1 dia
-
release bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
OpenLiberty/open-liberty#36124 ·
Mantenedores costumam responder em até 1 dia