Skip to content

chore: fail the build when a Kamelet is not in canonical YAML DSL - #3090

Merged
davsclaus merged 3 commits into
apache:mainfrom
davsclaus:quick-fix/canonical-yaml-check
Oct 6, 2026
Merged

davsclaus merged 3 commits into
apache:mainfrom
davsclaus:quick-fix/canonical-yaml-check

Conversation

@davsclaus

@davsclaus davsclaus commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude Code on behalf of Claus Ibsen.

Stacked on #3089, which writes the Kamelets in canonical YAML DSL. Until that one merges, this PR also shows its commit; only the last commit is new here.

This keeps the catalog canonical. KameletsCanonicalTest (camel-kamelets-catalog) loads every file of kamelets/ with the YAML DSL and fails when Camel logs YAML DSL compact notation detected for one. The failure names the Kamelets and says how to fix them:

camel validate normalize --output=kamelets kamelets/<name>.kamelet.yaml

It runs in the CI build, ./mvnw clean install with tests.

The templates of 187 of the 262 Kamelets used the compact notation, so Camel
logged "YAML DSL compact notation detected" for every one of them on each load
and reload: a warning a user cannot act on, about a file inside a jar.

Generated with camel validate normalize (apache/camel#27449, CAMEL-25381), which
rewrites only spec.template and keeps the rest of each file as written. The
Kamelet validator now checks the parameters of from: against the component of
its uri (not the first dependency) and accepts prefixed options such as
mail.imaps.auth.mechanisms, which the canonical form makes visible to it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
@davsclaus
davsclaus requested review from Croway and oscerd October 6, 2026 16:07
davsclaus and others added 2 commits October 6, 2026 18:38
… as Camel builds the uris

Review: the comments inside spec.template were dropped (82 lines in 16 Kamelets).
Regenerated with camel validate normalize from apache/camel#27449 as it is now:
the comments are back where they were, normalizing a normalized Kamelet changes
nothing, azure-storage-files-source is kept as written (an option given two path
parts was broken by the uri Camel builds), and the options are in the order Camel
builds them with secret options in RAW(), as the YAML DSL wraps them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
KameletsCanonicalTest loads every file of kamelets/ with the YAML DSL and fails
when Camel logs "YAML DSL compact notation detected" for one, naming them and
how to normalize them. On main before the canonical Kamelets it reports the 187
compact ones.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
@davsclaus
davsclaus merged commit c7beaec into apache:main Oct 6, 2026
5 checks passed
@davsclaus
davsclaus deleted the quick-fix/canonical-yaml-check branch October 6, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants