[
https://issues.apache.org/jira/browse/KNOX-3527?focusedWorklogId=1050175&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1050175
]
ASF GitHub Bot logged work on KNOX-3527:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Oct/26 08:40
Start Date: 26/Oct/26 08:40
Worklog Time Spent: 10m
Work Description: 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`.
Issue Time Tracking
-------------------
Worklog Id: (was: 1050175)
Remaining Estimate: 0h
Time Spent: 10m
> Auto-deploy topologies are not redeployed at startup because the redeploy
> happens before the topology monitor starts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: KNOX-3527
> URL: https://issues.apache.org/jira/browse/KNOX-3527
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 3.0.0
> Reporter: Tamás Hanicz
> Assignee: Tamás Hanicz
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)