GeezerVison is showing github.com — custom plugins broken after update from 24.2.1 to 24.5.1 · Issue #1684 · ArcadeData/arcadedb
custom plugins broken after update from 24.2.1 to 24.5.1 #1684DescriptionArcadeDB Version:
ArcadeDB Server v24.5.1 (build 6800848/1716545156043/main)
OS and JDK Version:
Linux 4.18.0-553.5.1.el8_10.x86_64 - OpenJDK 64-Bit Server VM 11.0.22 (Corretto-11.0.22.7.1)
Expected behavior
custom plugins with custom Undertow routes, continue to work.
Actual behavior
all custom routes return 404 (not found). Setting all logging levels to FINE does not produce any message that explains why Undertow cannot find the routes. Only the fallback handler works
Steps to reproduce
working on a test case Activityvic0824 commented on Aug 7, 2024 The attached zip file contains:
- testCustomPlugin: test method
- OrchestratorPlugin: the class that implements the custom plugin
- TestHandler: the class that implements the test handler
steps to reproduce:
- Run the testCustomPlugin method
- open a browser and point it to http://localhost:8080 (or replace localhost with the appropriate local IP address): verify that the Studio page is displayed
- open a browser and point it to http://localhost:8080/orchestrator/test (or replace localhost with the appropriate local IP address): verify that a 404 (not found) page is displayed
OrchestratorPlugin.zip vic0824 commented on Aug 8, 2024 Update: also v24.4.1 does not work, so something happened between 24.2.1 and 24.4.1 which broke the custom http routes vic0824 commented on Aug 8, 2024 Update: also v24.6.1 does not work. vic0824 commented on Aug 8, 2024 I have found the root cause: up to 24.2.1, in ArcadeDBServer, the registerPlugins() method was called before httpServer.startService().
Starting from 24.4.1, the registerPlugins() method is called after httpServer.startService(). and therefore the custom routes are not registered.
I have pulled the latest snapshot from main, moved the registerPlugins() call before the httpServer.startService(), and now the custom routes work as before. lvca commented on Aug 8, 2024 You're right, we moved that to fix a bug with HA. I think each plugin should declare when it wants to be installed, so I've created a new enum and a new method getInstallationPriority with default BEFORE_HTTP_ON:
public interface ServerPlugin {
enum INSTALLATION_PRIORITY {BEFORE_HTTP_ON, AFTER_HTTP_ON, AFTER_DATABASES_OPEN}
default INSTALLATION_PRIORITY getInstallationPriority() {
return BEFORE_HTTP_ON;
}
}
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|