Claus Ibsen created CAMEL-26097:
-----------------------------------

             Summary: camel-aws2-eks - CamelAwsEKSVPCConfig as text is dropped, 
and no operation fails with a NullPointerException
                 Key: CAMEL-26097
                 URL: https://issues.apache.org/jira/browse/CAMEL-26097
             Project: Camel
          Issue Type: Bug
          Components: 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 aws2-eks (CAMEL-24961).

h4. 1. No operation fails with a NullPointerException

The operation option has no default, and with no CamelAwsEKSOperation header, 
{{switch (determineOperation(exchange))}} ({{EKS2Producer}}, main ed3d719b379c, 
line 64) 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. CamelAwsEKSVPCConfig as text is dropped

createCluster reads the header as a {{VpcConfigRequest}} of the AWS SDK 
({{EKS2Producer}}, main ed3d719b379c, line 146), which gives null for text, so 
the request goes out without it, and Camel raises no error. Checked on 
4.24.0-SNAPSHOT with {{camel run}} against the AWS emulator of {{camel infra 
run aws}}, through a proxy that logs the requests: with the header "subnet-1" 
the request has no {{resourcesVpcConfig}}.

h4. Also read in the code, not run

* The {{CamelAwsEKSDescription}} header (EKS2Constants, line 30), described as 
"A key description to use while performing a createKey operation", is never 
read.
* With pojoRequest, an empty body is reported as "Expected body of type ... but 
was null" (line 237), as in aws2-ecs.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to