hanicz opened a new pull request, #1468: URL: https://github.com/apache/knox/pull/1468
…se the redeploy happens before the topology monitor starts [KNOX-3527](https://issues.apache.org/jira/browse/KNOX-3527) - Auto-deploy topologies are not redeployed at startup because the redeploy happens before the topology monitor starts ## What changes were proposed in this pull request? Topologies listed in `gateway.auto.deploy.topologies` (default `admin,manager`) were not redeployed when the gateway started. At startup, `GatewayServer.start()` loads the topologies, then rewrites `<redeployTime>` in each auto-deploy topology file. Nothing reloaded the topologies after that rewrite, and the topology file monitor only starts later, so its first snapshot already includes the rewrite and never reports it as a change. The in-memory copies kept the old content, so the startup redeploy did nothing. The topologies were redeployed later instead, on the next unrelated change in the topologies directory. This change calls `reloadTopologies()` right after the auto-deploy loop. The rewritten topologies get a fresh deployment during startup, and a later change to another topology no longer redeploys them. ## How was this patch tested? - New unit test `DefaultTopologyServiceTest#testReloadAfterRedeployUpdatesOnlyRedeployedTopology`: after `redeployTopology()` and `reloadTopologies()`, exactly one UPDATED event fires, for the redeployed topology, and only that topology's in-memory `redeployTime` changes. - Manual: started the gateway with the default setting and confirmed new `admin` and `manager` deployments are created at startup. Touching `health.xml` afterwards redeploys only `health`. -- 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]
