ammachado opened a new pull request, #24498: URL: https://github.com/apache/camel/pull/24498
# Description `route-diagram` and `route-topology` now accept a set of Camel route source files instead of only a running integration's name/pid, so diagrams and inter-route topology can be generated at source time without starting the application. `camel.main.dumpRoutes=json` additionally writes a `route-topology.json` alongside the per-route structure files when topology dumping is enabled. Follow-up fixes included in this PR: - `DefaultDumpRoutesStrategy` always writes `route-topology.json` (with empty nodes/edges if there are no routes), so its presence reliably signals the dump completed instead of being ambiguous with a failed/timed-out dump. - `CamelRouteDiagramAction` waits for that `route-topology.json` marker (written last) with a freshness check against boot start, instead of returning as soon as any file appears; fixes a race that could silently merge a partial multi-file batch and guards against a stale file from a previous `--watch` iteration. - `CamelRouteTopologyAction` gates `--metric` on `pid > 0` like `CamelRouteDiagramAction` already does, so source-file dumps no longer render a bogus empty metrics line. - Both actions give a more actionable message when a dump never completes, instead of a bare "No routes found". - Corrected `renderSourceToFile` javadoc (it does not actually skip PID lookup). - Added tests for the PID-vs-source-file dispatch boundary, the batch-completion race, stale-marker handling, `topologyExternal=false`, and the always-write empty-topology behavior. # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. # AI-assisted contributions - [x] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used. _Claude Code on behalf of Adriano Machado_ -- 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]
