You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/05/21 09:43:31 UTC

[PR] CAMEL-23574: camel-dns - align Exchange header constant names with Camel naming convention [camel]

oscerd opened a new pull request, #23411:
URL: https://github.com/apache/camel/pull/23411

   ## Summary
   
   Renames the Exchange header string values in `DnsConstants` from the legacy
   dotted-lowercase names to the project-wide `Camel<Component><Field>` convention
   used across the rest of the component catalog:
   
   | Constant | Previous value | New value |
   |---|---|---|
   | `DnsConstants.DNS_CLASS`  | `dns.class`  | `CamelDnsClass`  |
   | `DnsConstants.DNS_NAME`   | `dns.name`   | `CamelDnsName`   |
   | `DnsConstants.DNS_DOMAIN` | `dns.domain` | `CamelDnsDomain` |
   | `DnsConstants.DNS_SERVER` | `dns.server` | `CamelDnsServer` |
   | `DnsConstants.DNS_TYPE`   | `dns.type`   | `CamelDnsType`   |
   | `DnsConstants.TERM`       | `term`       | `CamelDnsTerm`   |
   
   The Java field names (`DNS_CLASS`, `DNS_NAME`, `DNS_DOMAIN`, `DNS_SERVER`,
   `DNS_TYPE`, `TERM`) are **unchanged**, so routes and code that reference the
   constants symbolically (`setHeader(DnsConstants.DNS_SERVER, ...)`) continue to
   work without changes. Routes that set the headers by their literal string value
   (`setHeader("dns.server", ...)`, `setHeader("term", ...)`) must be updated to
   the new value.
   
   Consistent with the same alignment applied in CAMEL-23506, CAMEL-23515,
   CAMEL-23516, CAMEL-23522, CAMEL-23526 and CAMEL-23532.
   
   ## Changes
   
   - `DnsConstants.java`: header string values renamed (Java field names unchanged).
   - `DnsComponent.java` / `DnsWikipediaProducer.java`: Javadoc references updated.
   - `dns-component.adoc`: documentation references updated. The stale `dns.dig`
     documentation reference to `"dns.query"` (which never matched any real header
     read by `DnsDigProducer`) is updated to `CamelDnsName`, the actual header
     consumed by the dig producer.
   - 9 in-module tests that previously set headers by literal value now go through
     `DnsConstants` (e.g. `headers.put(DnsConstants.DNS_NAME, ...)`), matching the
     cleanup pattern used for the cxfrs/cxf tests in CAMEL-23526.
   - `docs/.../camel-4x-upgrade-guide-4_21.adoc`: new `camel-dns` entry mirroring
     CAMEL-23526 / CAMEL-23532, including the cross-transport-propagation note
     (Camel-prefixed values are filtered by transport `HeaderFilterStrategy` at
     transport boundaries — bridge routes need to carry the parameters in a
     non-Camel-prefixed application header and map them in the route).
   - Regenerated artifacts: `components/camel-dns/.../dns.json`,
     `catalog/.../components/dns.json`, `dsl/.../DnsEndpointBuilderFactory.java`.
   
   ## Backport
   
   The same defect/divergence exists on `camel-4.18.x` and `camel-4.14.x` (identical
   constants and producer reads). The Jira already carries
   `fixVersions = 4.21.0 / 4.18.3 / 4.14.8`; backport commits + upgrade-guide
   sync PRs to follow the CAMEL-23526 / CAMEL-23532 pattern.
   
   ## Test plan
   
   - [x] `mvn test` in `components/camel-dns` — 22 tests, 0 failures (12 skipped =
     pre-existing `@Disabled` integration tests that hit the public internet)
   - [x] `mvn install` in `catalog/camel-catalog` — regenerated catalog/dns.json
   - [x] `mvn install` in `dsl/camel-endpointdsl` — regenerated
     `DnsEndpointBuilderFactory.java`
   - [ ] Apache CI: full reactor build (the local environment hits an unrelated
     JDK-21 schemagen issue in `core/camel-xml-io`; relying on CI as authoritative)
   
   ---
   
   _Claude Code on behalf of Andrea Cosentino_


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23574: camel-dns - align Exchange header constant names with Camel naming convention [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd merged PR #23411:
URL: https://github.com/apache/camel/pull/23411


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23574: camel-dns - align Exchange header constant names with Camel naming convention [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23411:
URL: https://github.com/apache/camel/pull/23411#issuecomment-4506909054

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23574: camel-dns - align Exchange header constant names with Camel naming convention [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23411:
URL: https://github.com/apache/camel/pull/23411#issuecomment-4507029805

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `catalog/camel-catalog`
   - `components/camel-dns`
   - `docs`
   - `dsl/camel-endpointdsl`
   
   <details><summary>All tested modules (10 modules)</summary>
   
   - Camel :: Catalog :: Camel Catalog
   - Camel :: DNS
   - Camel :: Endpoint DSL
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Launcher :: Container
   - Camel :: YAML DSL :: Validator
   - Camel :: YAML DSL :: Validator Maven Plugin
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/26218345569)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org