ramu11 commented on PR #30345: URL: https://github.com/apache/camel/pull/30345#issuecomment-6998291220
> Read through the catalog resource and both tests. This is data, docs and tests with no production code, and the part that makes a curated catalog maintainable is done right. > > The validation is the strong point. `PatternRecipesYamlValidationTest.everyRecipeYamlPassesCamelDslAndCatalogValidation` parses every recipe's YAML route, and the transport variants, through the actual YAML DSL validator, and checks that each declared component and EIP exists in the Camel catalog for the same release, rather than asserting on hand-written strings. `CamelCatalogTest.patternRecipesResource` pins the schema version, the recipe count, unique ids, and the required fields of each recipe. Together they mean a recipe cannot silently drift from the framework: a wrong component or EIP name, or an invalid route, fails the build. That is the right guard for curated content. > > I spot-checked the Idempotent Consumer recipe against the framework and it holds up: the components and EIPs are real, the recommended `skipDuplicate` / `eager` / `removeOnFailure` options carry the correct semantics, and the pitfalls are accurate, including that a duplicate enters the EIP marked with the `CamelDuplicateMessage` property when `skipDuplicate` is false, which matches the behavior. > > A few points, none blocking: > > * The `CamelCatalogTest` additions use `java.util.Collection`, `java.util.Set` and `java.util.HashSet` as fully-qualified names instead of imports. The project's import-style rule applies to test code too, and `mvn -Psourcecheck` (OpenRewrite) would rewrite these, so adding the imports now keeps that profile clean. The default build does not run it, which is why CI is green as-is. > * The idempotent repository reference is written as `processedOrderIds` in the file example but `#processedOrderIds` in the Kafka variant. Both validate, but one form across the recipes would read more consistently. > * The example links into `apache/camel-jbang-examples` and their `coverage` classification are checked structurally, not resolved over the network (correctly, for a unit test), so those links are a standing upkeep item as the examples repo evolves. > > One direction question for a committer rather than for me: whether `camel-catalog` is the home you want for curated AI-assist recipes, and the ongoing maintenance of ten hand-curated recipes with pinned options and external links that comes with it. The implementation quality is solid either way; this is a scope call on [CAMEL-23774](https://issues.apache.org/jira/browse/CAMEL-23774). > > _Claude Code on behalf of oscerd_ Thanks for raising this. I believe `camel-catalog` is the right home for the curated pattern recipes. The recipes are not intended to replace the existing EIP samples or JBang example catalog. They serve a different purpose: they describe higher-level integration patterns by combining multiple EIPs and components into a coherent solution, with transport alternatives, component requirements, recommended options, operational pitfalls, and links to relevant examples. Keeping them in `camel-catalog` has an important benefit: the recipes are distributed and versioned alongside the component, EIP, and endpoint metadata they reference. This allows AI-assisted tooling to retrieve recipes and validate their recommendations against the same Camel version, rather than relying on information from a potentially different release. The maintenance concern is valid, and I agree that these recipes should be treated as curated catalog content rather than static documentation. The implementation adds validation that checks the YAML routes against the Camel YAML DSL and catalog models, verifies component and EIP references, checks recommended options, and enforces the example coverage classifications. This provides a guard against recipes drifting as Camel evolves. The external JBang example links are references that help users find more complete examples; they are not runtime dependencies. They will need periodic review as the examples repository evolves. I would therefore prefer to keep this as a dedicated, versioned pattern-level recipes resource in `camel-catalog`, with the existing `camel_catalog_sample` and `camel_catalog_examples` tools retaining their current, distinct responsibilities. Thanks again for the thoughtful review and for raising the long-term ownership aspect. -- 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]
