davsclaus commented on PR #28213: URL: https://github.com/apache/camel/pull/28213#issuecomment-6325629905
Thanks @oscerd, all points are addressed in 1102549e4cd7. **1. Templated and Kamelet routes (blocker): fixed.** `LwModelToXMLDumper.write` has a `checksum` flag, which `LwModelChecksumGenerator` sets. For a route with `isTemplate()`, the flag leaves `nodePrefixId` out and restores it afterwards, using the extractor's restorers as you suggested. A Kamelet route without an id of its own (`<template>-<uuid>`, where the uuid is its node prefix) also gets two more things left out: its id, and the `routeId=<that id>` parameter of its `kamelet:source` and `kamelet:sink` URIs. I only found that parameter when the new Kamelet test failed. New tests: - `RouteChecksumTest.testTemplatedRouteSameChecksumWhenCreatedAgain` creates the same templated route twice, with a stop and remove in between, and expects the same checksum and revision 1. - `KameletRouteChecksumTest` (camel-kamelet) creates a Kamelet route with an id of its own and one without, in two runs, and expects the same checksums. **2. Endpoint DSL options that are objects: fixed.** In checksum mode the `hash=` parameter is removed from `getRawUri()`. `EndpointDslRouteChecksumTest` (camel-endpointdsl) builds the same route twice with a new `ExchangeFormatter` instance each time, and `LwModelToXMLDumperRawUriTest` covers the separators. The docs now say that an object given to an endpoint DSL option is a bean and is not part of the checksum. **3. Literal secrets: fixed.** In checksum mode each `uri` attribute goes through `URISupport.sanitizeUri` before it is hashed. `RouteChecksumTest.testSecretsInUrisMasked` checks that two passwords give the same checksum while another path does not. `routes.adoc` and the `Route#getChecksum` Javadoc mention it. **4. Smaller points** - `routeRevisions` is now an access-ordered map that keeps the 10000 route ids used last (`MAX_ROUTE_REVISIONS`). The `Route#getRevision` Javadoc and `routes.adoc` say so. - The revision is now set in `RouteService.doWarmUp` before `RouteAddedEvent` and `onRoutesAdd`. Revising a route again with the same checksum keeps its revision, so `addRoute` still calls it for a route added another way. `RouteChecksumTest.testRevisionKnownWhenTheRouteIsAnnounced` checks that listeners see revisions 1 and 2. - Dependents: I ran the full test suites locally. camel-core: 8021, camel-console: 259, camel-management: 574, camel-endpointdsl: 69, camel-kamelet: 141, camel-yaml-dsl: 492, camel-xml-io: 436, all green. I also added the `test-dependents` label. - The new test classes and methods are package-private now. The `setUp` override stays public. _Claude Code on behalf of davsclaus_ -- 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]
