[backport camel-4.18.x] CAMEL-23574: camel-dns - align Exchange header constant names with Camel naming convention#23459
Conversation
…r constant names with Camel naming convention Backport of apache#23411. Rename the Exchange header string values in DnsConstants from dotted lowercase (dns.class / dns.name / dns.domain / dns.server / dns.type / term) to the project-wide Camel<Component><Field> convention: DNS_CLASS -> CamelDnsClass DNS_NAME -> CamelDnsName DNS_DOMAIN -> CamelDnsDomain DNS_SERVER -> CamelDnsServer DNS_TYPE -> CamelDnsType TERM -> CamelDnsTerm The Java field names are unchanged so routes and code that reference the constants symbolically continue to work without changes. Routes that set the headers by their literal string value must be updated. Updates the in-module tests to go through DnsConstants, refreshes the DnsComponent / DnsWikipediaProducer Javadoc and the component documentation references, and regenerates the component metadata, catalog, and endpoint DSL factory. The version-specific upgrade-guide entry is added on the main branch (per the backport upgrade-guide policy), not on this maintenance branch. Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
gnodet
left a comment
There was a problem hiding this comment.
Clean backport -- LGTM.
Verified that:
-
Clean cherry-pick: The file set matches the original PR #23411 exactly, minus the upgrade guide entry (which correctly lives on
mainper the backport upgrade-guide policy). All code changes, test updates, doc fixes, and regenerated artifacts are identical. -
Header renames are consistent: All six constants follow the
CamelDns*convention (CamelDnsClass,CamelDnsName,CamelDnsDomain,CamelDnsServer,CamelDnsType,CamelDnsTerm). Java field names are unchanged so symbolic references continue to work. -
Tests cover the renames: All 9 test classes that previously used literal header strings (
"dns.name","dns.domain","dns.type","term") now useDnsConstants.*references, which resolves to the new values and exercises the producers with the renamed headers. -
Doc fix is correct: The pre-existing documentation error
"dns.query"in the DNS Dig section (which never matched any real header --DnsDigProducerreadsDnsConstants.DNS_NAME) is correctly updated to"CamelDnsName", matching the same fix in the original PR. -
Upgrade guide: The PR description correctly notes that the version-specific
camel-4x-upgrade-guide-4_18.adocentry will be added onmainvia a separate doc-sync PR. Please make sure that doc-sync PR is filed. -
CI: All checks pass (JDK 17, JDK 21, dependency-review).
Claude Code on behalf of Guillaume Nodet
…to main (#23488) The camel-dns header constant rename (CAMEL-23574, #23411) was backported to camel-4.18.x (4.18.3) via #23459 and to camel-4.14.x (4.14.8) via #23482. The version-specific upgrade-guide files on main are the canonical history, so the corresponding entries are added here on main only. Also normalises the existing 4_21 camel-dns heading to "- potential breaking change" to match the suffix convention now used across the catalog-wide header-rename family (CAMEL-23577) — e.g. camel-cxf, camel-jgroups, camel-jira, camel-aws-bedrock. Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Backport of #23411 to
camel-4.18.xCherry-pick of #23411 onto
camel-4.18.x(fixVersion 4.18.3).Renames the Exchange header string values in
DnsConstantsfrom the legacydotted-lowercase names to the project-wide
Camel<Component><Field>convention:DnsConstants.DNS_CLASSdns.classCamelDnsClassDnsConstants.DNS_NAMEdns.nameCamelDnsNameDnsConstants.DNS_DOMAINdns.domainCamelDnsDomainDnsConstants.DNS_SERVERdns.serverCamelDnsServerDnsConstants.DNS_TYPEdns.typeCamelDnsTypeDnsConstants.TERMtermCamelDnsTermThe Java field names are unchanged, so routes that reference the constants
symbolically keep working; routes that set the headers by literal string value
must be updated.
Notes for this backport
metadata, catalog, endpoint DSL factory) only.
camel-4x-upgrade-guide-4_18.adoc)is added on
mainvia a separate doc-sync PR, per the backportupgrade-guide policy (canonical guides live on
main).Original PR: #23411
Original author: @oscerd
Claude Code on behalf of Andrea Cosentino