Requirement
Background
The deprecated master trait has been removed (#6807). Besides creating the RBAC and configuring the cluster service, the trait used to perform one more hidden task: it parsed master:<lockName>:<delegate-scheme>[:...] URIs found in the routes and automatically added the wrapped component to the Integration dependencies (see the removed findAdditionalDependencies() in pkg/trait/master.go, including consumer dependency IDs).
Current behavior
When parsing the DSL, the dependency analysis only recognizes the outer master scheme for a URI such as:
from("master:lock:timer:tick")
The wrapped timer component is not detected, so its dependency is not added to the kit. Users migrating to the properties-based leader election must remember to declare the delegate component manually (e.g. -d camel:timer), otherwise the Integration fails at startup with a confusing error:
Failed to create route ... because: No endpoint could be found for: timer://tick,
please check your classpath contains the needed Camel component jar.
Expected behavior
Dependency detection should unwrap master:<lockName>:<delegate-scheme>[:...] endpoints during DSL parsing and add the delegate component dependency automatically, as already done for regular components. The removed trait logic (findAdditionalDependencies() + CamelCatalog.GetArtifactByScheme() + GetConsumerDependencyIDs()) can serve as a reference implementation.
How to reproduce
Run an Integration with from("master:lock:timer:tick") declaring only -d camel:kubernetes and the quarkus.camel.cluster.kubernetes.* properties: the pod never becomes ready with the error above. e2e/common/traits/master_test.go currently works around this by declaring -d camel:timer explicitly.
References
Requirement
Background
The deprecated
mastertrait has been removed (#6807). Besides creating the RBAC and configuring the cluster service, the trait used to perform one more hidden task: it parsedmaster:<lockName>:<delegate-scheme>[:...]URIs found in the routes and automatically added the wrapped component to the Integration dependencies (see the removedfindAdditionalDependencies()inpkg/trait/master.go, including consumer dependency IDs).Current behavior
When parsing the DSL, the dependency analysis only recognizes the outer
masterscheme for a URI such as:The wrapped
timercomponent is not detected, so its dependency is not added to the kit. Users migrating to the properties-based leader election must remember to declare the delegate component manually (e.g.-d camel:timer), otherwise the Integration fails at startup with a confusing error:Expected behavior
Dependency detection should unwrap
master:<lockName>:<delegate-scheme>[:...]endpoints during DSL parsing and add the delegate component dependency automatically, as already done for regular components. The removed trait logic (findAdditionalDependencies()+CamelCatalog.GetArtifactByScheme()+GetConsumerDependencyIDs()) can serve as a reference implementation.How to reproduce
Run an Integration with
from("master:lock:timer:tick")declaring only-d camel:kubernetesand thequarkus.camel.cluster.kubernetes.*properties: the pod never becomes ready with the error above.e2e/common/traits/master_test.gocurrently works around this by declaring-d camel:timerexplicitly.References
pkg/metadata/(dependency analysis entry point:ExtractAll)