[
https://issues.apache.org/jira/browse/CAMEL-26101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-26101 started by Claus Ibsen.
-------------------------------------------
> camel-aws2-step-functions - no operation fails with a NullPointerException,
> and startSyncExecution fails with uriEndpointOverride
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26101
> URL: https://issues.apache.org/jira/browse/CAMEL-26101
> Project: Camel
> Issue Type: Bug
> Components: camel-aws2
> Affects Versions: 4.18.0, 4.22.0, 4.23.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of aws2-step-functions
> (CAMEL-24961).
> h4. 1. No operation fails with a NullPointerException
> The operation option has no default, and with no
> CamelAwsStepFunctionsOperation header, {{switch
> (determineOperation(exchange))}} ({{StepFunctions2Producer}}, main
> ed3d719b379c, line 55) 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. 2. startSyncExecution fails with uriEndpointOverride
> The AWS SDK puts the host prefix {{sync-}} before the endpoint of
> StartSyncExecution, unless host prefix injection is disabled, and Camel does
> not disable it. With {{uriEndpointOverride=http://localhost:4566}} the call
> goes to {{sync-localhost}} and fails with {{SdkClientException: Received an
> UnknownHostException}}. Checked on 4.24.0-SNAPSHOT with {{camel run}} against
> the AWS emulator of {{camel infra run aws}}. So startSyncExecution cannot be
> used with an endpoint given by uriEndpointOverride, such as an emulator.
> h4. 3. The operation option lists the operations of aws2-lambda
> The description of the operation option is "The operation to perform. It can
> be listFunctions, getFunction, createFunction, deleteFunction or
> invokeFunction" ({{StepFunctions2Configuration}}, main ed3d719b379c, line
> 133), and so is the catalog. {{CamelAwsStepFunctionsActivitiesMaxResults}} is
> described as "The limit number of results while listing state machines"
> ({{StepFunctions2Constants}}, line 51).
> h4. Also read in the code, not run
> * The execution input is read only from the
> {{CamelAwsStepFunctionsExecutionInput}} header as a String (lines 520-521 and
> 569-570): a Map there is sent as {{\{a=1\}}}, not JSON (checked), and the
> body is not used.
> * startSyncExecution does not check the status of the execution, so a failed
> execution does not fail the exchange.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)