hxxxi-malog opened a new issue, #6830:
URL: https://github.com/apache/camel-k/issues/6830
### 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:
```java
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**
- PR #6807 (master trait removal)
- `pkg/metadata/` (dependency analysis entry point: `ExtractAll`)
--
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]