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

   ## Problem
   
   `Ses2ProducerHealthCheck.doCall` catches `AwsServiceException`, calls 
`builder.down()` — and then falls through to `builder.up()` at the end of the 
method, because that branch is missing the `return` every sibling component 
has. `up()` overwrites the state, so SES throttling, an unreachable endpoint 
and rejected credentials were all reported as **healthy**. Only a non-AWS 
exception reported DOWN, since the generic `catch (Exception)` right below does 
return.
   
   The branch also skipped the `SERVICE_STATUS_CODE` and `SERVICE_ERROR_CODE` 
details that cw, ecs and eks add.
   
   ## Changes
   
   - `Ses2ProducerHealthCheck`: add the missing `return`, and the two detail 
entries, matching `ECS2ProducerHealthCheck`.
   - `Ses2ProducerHealthCheckServiceExceptionTest`: new test driving the check 
with a mock `SesClient` that throws a throttling `AwsServiceException`, 
asserting `DOWN` plus both details. Reverting the fix makes it fail with 
`expected: <DOWN> but was: <UP>`.
   - Document that the `GetSendStatistics` probe needs the 
`ses:GetSendStatistics` permission, which `ses:SendEmail` / `ses:SendRawEmail` 
do not imply — with a least-privilege sending policy the check reports DOWN 
although the route works. Catalog doc copy regenerated.
   
   ## Why no test caught this
   
   `Ses2ProducerHealthCheckStaticCredsTest` and `...ProfileCredsTest` only 
exercise credential-resolution failures, which land in the generic catch that 
*does* return. Nothing covered the `AwsServiceException` path.
   
   ## Not in this PR
   
   Two items of CAMEL-28028 are deliberately left open, so the ticket should 
stay open after merge:
   
   - the wildcard `import software.amazon.awssdk.services.ses.model.*` in 
`Ses2Producer` — SES's `Message` clashes with `org.apache.camel.Message` and is 
deliberately fully qualified, which interacts with the OpenRewrite FQCN 
shortening the build applies; it deserves its own change
   - the SESv2 (`SesV2Client`) migration, which the ticket flags as a separate 
decision
   
   ## Testing
   
   `mvn test` in `components/camel-aws/camel-aws2-ses`: 34 tests, all passing.
   
   _Claude Code on behalf of oscerd_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to