[BUG] ServerPlugin implementing no plugin type interface is silently never started or stopped
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 227
- Forks
- 81
- Ø Merge
- 2 T. 18 Std.
- Gemergte PRs (30 T.)
- 12
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus OpenIntegrationEngine/engine
-
Outdated GitHub workflow action versionsEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
OpenIntegrationEngine/engine#485 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
OpenIntegrationEngine/engine#478 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
OpenIntegrationEngine/engine#355 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
OpenIntegrationEngine/engine#347 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
OpenIntegrationEngine/engine#313 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in OpenIntegrationEngine/engine
Ähnliche Issues
-
Optimize consumer version heatmap aggregation to avoid repeated scansEvtl. vergeben @praykaria31 hat das heute übernommen. Offentype/enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Apicurio/apicurio-registry#10662 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
a:false-positive
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
status: waiting-for-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
spring-projects/spring-boot#52347 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
opensearch-project/opensearch-migrations#3480 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug] Certificate expiry sorting can reverse UTC order across a viewer daylight-saving gapEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
apache/rocketmq-dashboard#7318 ·
Maintainer antworten meist innerhalb von 3 Tagen