Claus Ibsen created CAMEL-26093:
-----------------------------------
Summary: camel-aws-parameter-store - the component is not in the
catalog, and the YAML examples of its page do not load
Key: CAMEL-26093
URL: https://issues.apache.org/jira/browse/CAMEL-26093
Project: Camel
Issue Type: Bug
Components: camel-catalog, camel-aws2
Affects Versions: 4.18.0, 4.22.0, 4.23.0
Reporter: Claus Ibsen
Fix For: 4.24.0
Found while adding the catalog body types of aws-parameter-store (CAMEL-24961).
h4. 1. The component is not in the catalog
camel-aws-parameter-store is missing from the list of camel-aws modules in
{{MojoHelper.getComponentPath}} of camel-package-maven-plugin (main
ed3d719b379c, lines 128-150), since the component was added (CAMEL-22819,
4.18.0). So the catalog has no aws-parameter-store.json and no page, and
everything that reads the catalog misses the component:
* {{camel run}} of a route with {{aws-parameter-store:}} fails with "cannot
find component with name aws-parameter-store" unless the dependency is given by
hand;
* the Endpoint DSL and the component DSL have no builder for it;
* the build checks of the doc examples, which read the pages in the catalog,
never ran on its page.
The same happened to azure-servicebus in CAMEL-17372.
*Proposed change*: add the module to MojoHelper and regenerate the catalog and
the DSLs.
h4. 2. The YAML examples of the page do not load
Nine of the YAML examples put {{steps:}} beside {{from:}} instead of under it
({{aws-parameter-store-component.adoc}}, lines 347, 393, 443, 500, 557, 608,
654, 700 and 746). The YAML DSL has no {{steps}} key on a route, so these
routes fail to load. The examples before line 300 are right.
h4. 3. No operation fails with a NullPointerException
The operation option has no default, and with no
CamelAwsParameterStoreOperation header, {{switch
(determineOperation(exchange))}} ({{ParameterStoreProducer}}, main
ed3d719b379c, line 74) fails with {{NullPointerException: Cannot invoke
"...ordinal()" because the return value of "...determineOperation(...)" is
null}}. Checked on 4.24.0-SNAPSHOT with {{camel run}} against the AWS emulator
of {{camel infra run aws}}.
*Proposed change*: fail with a message that says to set the operation option or
header, as aws2-kms does ("Operation must be specified").
h4. 4. getParameters and deleteParameters do not trim the names
The {{CamelAwsParameterStoreNames}} header is split on commas without trimming
(lines 174 and 323), so {{/a, /b}} asks for " /b". Checked on 4.24.0-SNAPSHOT
with {{camel run}} against the AWS emulator of {{camel infra run aws}}:
getParameters gives the second parameter in {{invalidParameters}} as {{[
/bt/bytes]}}, and the exchange does not fail.
h4. Also read in the code, not run
* The page does not say that getParameter gives the value as the body, nor that
the CamelAwsParameterStoreValue header wins over the body for putParameter
(CAMEL-24363).
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)