ci: validate all Kamelets (remove early break in listKamelets)#2878
Merged
Conversation
listKamelets in script/validator appended the first Kamelet file and then broke out of the loop, so the validator only ever checked a single Kamelet (avro-deserialize-action, alphabetically first) out of ~250. Every rule (parameters, descriptors, annotations, used-params, ...) silently ran against one file and the tool exited 0 -- disabling the catalog's authoring safety net since 1caed85 (2025-09-05). Removing the break re-arms validation across all Kamelets. Two previously-unchecked Kamelets surfaced declared-but-unused properties: - aws-sqs-source: queueURL, a vestigial KEDA scaler hint also present in the already-excluded aws-s3-event-based-source; - data-type-action: dataTypeProcessor, a bean referenced via process/ref that the used-params check does not yet detect. Both are added to the existing verifyUsedParams exclusion list to keep the validator green, consistent with the entries already there. Improving bean-reference detection so these (and the rest of the list) can be retired is left to a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
apupier
approved these changes
Jun 24, 2026
This was referenced Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
listKameletsinscript/validator/validator.goappended the first Kamelet file and thenbreak-ed out of the loop, so the validator only ever inspected one Kamelet (avro-deserialize-action, alphabetically first) out of ~250. Every rule (verifyParameters,verifyDescriptors,verifyAnnotations,verifyUsedParams, …) silently ran against that single file and the tool exited0.The stray
breakwas introduced in1caed85e3(2025-09-05, "make the golang independent from camel k"), so the catalog's authoring safety net — thecd script/validator && go run . ../../kamelets/gate referenced in CI and in the contributor guide — has effectively been a no-op for ~9 months.Fix
Remove the stray
breakso every Kamelet is validated again.Re-arming the validator surfaced exactly two latent
declared-but-never-usedfindings in Kamelets that had simply never been checked:aws-sqs-source→queueURL: a vestigial KEDA scaler hint (added in 2022 together with KEDA markers; the KEDA descriptors were later removed). Its twinaws-s3-event-based-sourcecarries the same property and is already in theverifyUsedParamsexclusion list —aws-sqs-sourcewas simply missed.data-type-action→dataTypeProcessor: not a parameter at all but atemplate.beansentry, used viaprocess: ref:. The used-params check only detects{{property}}placeholders, so it does not yet recogniseref:/#bean:usage.Both are added to the existing
verifyUsedParamsexclusion list to keep the validator green, consistent with the entries already there. Deliberately kept minimal so this can be reviewed and merged quickly to restore CI protection.Verification
go vetandgofmt -l: clean.go run . ../../kamelets/: exits0across all 250 Kamelets.log-sink(which is not alphabetically first) is now reported —ERROR: kamelet "log-sink" does not contain title, exit1. Before this change it was silently ignored.Follow-ups (separate PRs)
verifyUsedParamsbean /ref:detection and replace the hard-coded relative-path exclusion list with an in-Kamelet opt-out annotation, so the entries above (and most of the existing list) can be retired.urn:alm:descriptor:com.tectonic.uidescriptors, enforcecamel.apache.org/catalog.versionmatches the pom version, enforce the source→kamelet:sink/ sink→kamelet:sourceconvention, and validate dependency syntax.AI-generated by Claude Code on behalf of Andrea Cosentino (@oscerd).