harshilv17 opened a new pull request, #6847:
URL: https://github.com/apache/camel-k/pull/6847

   Fixes #6830
   
   With the master trait gone (#6807), `from("master:lock:timer:tick")` only 
pulled in `camel:master`. The wrapped `timer` component had to be declared by 
hand, or the Integration failed at startup with `No endpoint could be found 
for: timer://tick`.
   
   The source inspector now unwraps `master:<namespace>:<delegateUri>` and 
resolves the delegate like any other consumer endpoint. The change sits in 
`addDependenciesFromURI`, next to the `dataformat:` case, so the Java, YAML and 
XML DSLs all get it without a new regexp per DSL. Because the delegate goes 
back through `addDependencies`, it also picks up consumer dependency IDs, gets 
the same placeholder check (`master:lock:{{delegate}}` is skipped), and handles 
options on the delegate URI.
   
   Changes:
   - `pkg/util/source/inspector.go`: unwrap the master delegate.
   - Unit tests for the Java, YAML and XML inspectors. They fail without the 
fix.
   - `e2e/common/traits/master_test.go`: dropped the `-d camel:timer` 
workaround, so the e2e run now covers the detection.
   
   Notes for review:
   - The removed trait let users opt out with 
`master.includeDelegateDependencies=false` (default `true`). That API field is 
still there but nothing reads it any more, so this always behaves like the old 
default.
   - Not covered: a master endpoint whose delegate is set through YAML 
`parameters` (`delegateUri: ...`) rather than in the URI path. The old trait 
didn't cover it either.
   
   Tests: `go test ./pkg/util/source/... ./pkg/metadata/... ./pkg/trait/...` 
pass. `golangci-lint` on `pkg/util/source` reports 0 issues. `go vet -tags 
integration ./e2e/common/traits/` is clean. I didn't run the e2e suite locally 
(no cluster).
   
   _Claude Code on behalf of Harshil Valecha_
   


-- 
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]

Reply via email to