Skip to content

CAMEL-26072: camel-aws - bug fixes for polly, translate, textract, timestream, s3-vectors, security-hub and cloudtrail - #28376

Closed
davsclaus wants to merge 2 commits into
mainfrom
fix/CAMEL-26072-aws-2b-bugs
Closed

davsclaus wants to merge 2 commits into
mainfrom
fix/CAMEL-26072-aws-2b-bugs

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Claude Code on behalf of davsclaus

Bug fixes for seven AWS components, found while adding the catalog body types (CAMEL-24961). One commit; every behaviour fix has a unit test that failed before it.

JIRA Component Fix
CAMEL-26072 aws2-polly textType and outputFormat have no default, so their headers are read (SSML was spoken as text); TEXT and MP3 when neither is set; new CamelAwsPollyNextToken header (in and out) for the list operations; lexicon names trimmed; docs
CAMEL-26073 aws2-translate each language from its option or else its header (one option sent no other language); a missing language fails clearly; Croatian is hr (was cr, Cree); docs
CAMEL-26074 aws2-textract CamelAwsTextractFeatureTypes takes Strings (was a ClassCastException); the start operations set CamelAwsTextractJobId, so a get step that follows works; docs on which S3 location and body are used
CAMEL-26077 aws2-timestream describeScheduledQuery sends the ARN; no operation, an operation of the other client type and an unknown client type fail clearly (an operation option already at start); header descriptions and types
CAMEL-26078 aws-cloudtrail the CloudEvent data type says application/json; an event without data or time no longer fails every poll; docs
CAMEL-26079 aws2-polly, textract, sns, s3 trace logs and the 404 check of an AWS error without details no longer fail with a NullPointerException (aws-config and rekognition are in #28353, which changes the same files)
CAMEL-26092 aws2-s3-vectors the consumer and producer no longer set the bucket and index headers, which sent the next step to that bucket and index; get/delete take the keys from the body first; data, metadata and distance are returned; the metadata filter is applied; new CamelAwsS3VectorsDistance header; the threshold and score, which never worked, are deprecated; metadata values of any JSON scalar type; option enums as in the SDK
CAMEL-26094 aws-security-hub a filters/update header of another type fails (JSON text filters returned every finding); findings as any collection or array; batchImportFindings fails when findings are not imported; docs

Behaviour changes are in the 4.24 upgrade guide; the main ones: the polly headers are now used, s3-vectors no longer sets the bucket and index headers and get/delete read the keys from the body first, security-hub batchImportFindings fails on failed findings, translate's CROATIAN is hr.

Not in this PR: CAMEL-26069 and CAMEL-26071 (bedrock) wait for #28353.

Catalog JSON and docs copied, endpoint and component DSLs regenerated. Main only.

The stacked body-type PRs #28340, #28343, #28275 and #28251 touch the same endpoints and generated JSON; whichever merges second regenerates.

🤖 Generated with Claude Code

…mestream, s3-vectors, security-hub and cloudtrail

CAMEL-26072 aws2-polly: the textType and outputFormat headers are read; next token header; lexicon names trimmed
CAMEL-26073 aws2-translate: each language from its option or header; Croatian is hr
CAMEL-26074 aws2-textract: feature types as Strings; the start operations set the job id header
CAMEL-26077 aws2-timestream: describeScheduledQuery sends the ARN; clear errors for the operation and client type
CAMEL-26078 aws-cloudtrail: application/json for the CloudEvent data type; events without data or time
CAMEL-26079 aws2-polly, textract, sns, s3: trace logs and checks of an AWS error without details
CAMEL-26092 aws2-s3-vectors: no output bucket/index headers, keys from the body, data/metadata/distance, metadata filter
CAMEL-26094 aws-security-hub: headers of another type fail, findings as any collection, failed imports fail

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 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 have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thorough, well-tested fix for seven AWS components. Every behavior change has a unit test, null-safety improvements are correct, s3-vectors deprecations are appropriate, and the upgrade guide is comprehensive. LGTM.

Pre-fix test validation (sampled):

  • ✅ CAMEL-26074 (textract ClassCastException): Textract2ProducerTest.analyzeDocumentFeatureTypesFromListOfStrings() sends List.of("tables", "Signatures") through the new getFeatureTypes() method which parses Strings → FeatureType. Before the fix, this list would have been cast directly to List<FeatureType>, causing a ClassCastException. The test asserts the correct FeatureTypes are received by the mock.
  • ✅ CAMEL-26073 (translate: one option sends no other language): Translate2ProducerTest.sourceLanguageOptionAndTargetLanguageHeader() sets only sourceLanguage as an option and targetLanguage as a header. The old code only read both from options or both from headers — not one from each. The test asserts both languages arrive at the mock.
  • ✅ CAMEL-26092 (s3-vectors bucket/index headers redirect): AWS2S3VectorsProducerRequestTest.putVectorsDoesNotSetBucketAndIndexHeaders() verifies the headers are no longer set; getVectorsTakesTheKeysFromTheBodyBeforeTheHeader() confirms body-first key resolution.
  • ✅ CAMEL-26079 (NPE on AWS error without details): AWS2S3MissingBucketTest mocks an AwsServiceException with statusCode(404) but no awsErrorDetails(), and verifies the bucket creation proceeds. Before the fix, ase.awsErrorDetails().sdkHttpResponse().statusCode() would NPE.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-aws/camel-aws-cloudtrail
  • components/camel-aws/camel-aws-security-hub
  • components/camel-aws/camel-aws2-polly
  • components/camel-aws/camel-aws2-s3-vectors
  • components/camel-aws/camel-aws2-s3
  • components/camel-aws/camel-aws2-sns
  • components/camel-aws/camel-aws2-textract
  • components/camel-aws/camel-aws2-timestream
  • components/camel-aws/camel-aws2-translate
  • docs
  • dsl/camel-componentdsl
  • dsl/camel-endpointdsl

🔬 Scalpel shadow comparison — Scalpel: 17 of 707 tested, 23 compile-only — current: 17 all tested

Maveniverse Scalpel detected 17 affected modules (current approach: 17).

Skip-tests mode would test 17 modules (13 direct + 8 downstream), skip tests for 23 (generated code, meta-modules)

Modules Scalpel would test (17)
  • camel-aws-cloudtrail ← components/camel-aws/camel-aws-cloudtrail/src/main/docs/aws-cloudtrail-component.adoc, components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConsumer.java, components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/transform/CloudtrailCloudEventDataTypeTransformer.java, components/camel-aws/camel-aws-cloudtrail/src/test/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConsumerTest.java, components/camel-aws/camel-aws-cloudtrail/src/test/java/org/apache/camel/component/aws/cloudtrail/transform/CloudtrailCloudEventDataTypeTransformerTest.java
  • camel-aws-security-hub ← components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/org/apache/camel/component/aws/securityhub/aws-security-hub.json, components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc, components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubConstants.java, components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpoint.java, components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubProducer.java, components/camel-aws/camel-aws-security-hub/src/test/java/org/apache/camel/component/aws/securityhub/SecurityHubProducerTest.java
  • camel-aws2-eventbridge ← downstream of org.apache.camel:camel-aws2-s3
  • camel-aws2-polly ← components/camel-aws/camel-aws2-polly/src/generated/resources/META-INF/org/apache/camel/component/aws2/polly/aws2-polly.json, components/camel-aws/camel-aws2-polly/src/main/docs/aws2-polly-component.adoc, components/camel-aws/camel-aws2-polly/src/main/java/org/apache/camel/component/aws2/polly/Polly2Configuration.java, components/camel-aws/camel-aws2-polly/src/main/java/org/apache/camel/component/aws2/polly/Polly2Constants.java, components/camel-aws/camel-aws2-polly/src/main/java/org/apache/camel/component/aws2/polly/Polly2Producer.java, components/camel-aws/camel-aws2-polly/src/test/java/org/apache/camel/component/aws2/polly/AmazonPollyClientMock.java, components/camel-aws/camel-aws2-polly/src/test/java/org/apache/camel/component/aws2/polly/Polly2ProducerTest.java
  • camel-aws2-s3 ← components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java, components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java, components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/AWS2S3MissingBucketTest.java
  • camel-aws2-s3-vectors ← components/camel-aws/camel-aws2-s3-vectors/src/generated/resources/META-INF/org/apache/camel/component/aws2/s3vectors/aws2-s3-vectors.json, components/camel-aws/camel-aws2-s3-vectors/src/main/docs/aws2-s3-vectors-component.adoc, components/camel-aws/camel-aws2-s3-vectors/src/main/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsConfiguration.java, components/camel-aws/camel-aws2-s3-vectors/src/main/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsConstants.java, components/camel-aws/camel-aws2-s3-vectors/src/main/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsConsumer.java, components/camel-aws/camel-aws2-s3-vectors/src/main/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsEndpoint.java, components/camel-aws/camel-aws2-s3-vectors/src/main/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsHelper.java, components/camel-aws/camel-aws2-s3-vectors/src/main/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsProducer.java, components/camel-aws/camel-aws2-s3-vectors/src/test/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsConsumerTest.java, components/camel-aws/camel-aws2-s3-vectors/src/test/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsOptionEnumsTest.java, components/camel-aws/camel-aws2-s3-vectors/src/test/java/org/apache/camel/component/aws2/s3vectors/AWS2S3VectorsProducerRequestTest.java
  • camel-aws2-sns ← components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Endpoint.java
  • camel-aws2-textract ← components/camel-aws/camel-aws2-textract/src/generated/resources/META-INF/org/apache/camel/component/aws2/textract/aws2-textract.json, components/camel-aws/camel-aws2-textract/src/main/docs/aws2-textract-component.adoc, components/camel-aws/camel-aws2-textract/src/main/java/org/apache/camel/component/aws2/textract/Textract2Constants.java, components/camel-aws/camel-aws2-textract/src/main/java/org/apache/camel/component/aws2/textract/Textract2Endpoint.java, components/camel-aws/camel-aws2-textract/src/main/java/org/apache/camel/component/aws2/textract/Textract2Producer.java, components/camel-aws/camel-aws2-textract/src/test/java/org/apache/camel/component/aws2/textract/AmazonAWSTextractMock.java, components/camel-aws/camel-aws2-textract/src/test/java/org/apache/camel/component/aws2/textract/Textract2ProducerTest.java
  • camel-aws2-timestream ← components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/org/apache/camel/component/aws2/timestream/aws2-timestream.json, components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc, components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Component.java, components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Constants.java, components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Operations.java, components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducer.java, components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducer.java, components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2OperationValidationTest.java, components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/AmazonTimestreamQueryClientMock.java, components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerTest.java
  • camel-aws2-translate ← components/camel-aws/camel-aws2-translate/src/generated/resources/META-INF/org/apache/camel/component/aws2/translate/aws2-translate.json, components/camel-aws/camel-aws2-translate/src/main/docs/aws2-translate-component.adoc, components/camel-aws/camel-aws2-translate/src/main/java/org/apache/camel/component/aws2/translate/Translate2Configuration.java, components/camel-aws/camel-aws2-translate/src/main/java/org/apache/camel/component/aws2/translate/Translate2LanguageEnum.java, components/camel-aws/camel-aws2-translate/src/main/java/org/apache/camel/component/aws2/translate/Translate2Producer.java, components/camel-aws/camel-aws2-translate/src/test/java/org/apache/camel/component/aws2/translate/AmazonAWSTranslateMock.java, components/camel-aws/camel-aws2-translate/src/test/java/org/apache/camel/component/aws2/translate/Translate2ProducerTest.java
  • camel-jbang-mcp ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-tui ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-validate ← downstream of org.apache.camel:camel-yaml-dsl-validator
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher
  • camel-yaml-dsl-validator ← downstream of org.apache.camel:camel-catalog
  • camel-yaml-dsl-validator-maven-plugin ← downstream of org.apache.camel:camel-yaml-dsl-validator
Modules with tests skipped (23)
  • apache-camel
  • camel-allcomponents
  • camel-catalog-console
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (44 modules, 7m 28s total)

Total reactor time: 7m 28s

Module Duration Status
Camel :: Launcher 52.3s SUCCESS
Camel :: JBang :: MCP 43.7s SUCCESS
Camel :: JBang :: Plugin :: Validate 29.7s SUCCESS
Camel :: YAML DSL :: Validator 26.1s SUCCESS
Camel :: Component DSL 24.5s SUCCESS
Camel :: Catalog :: Camel Catalog 23.8s SUCCESS
Camel :: YAML DSL 23.6s SUCCESS
Camel :: AWS2 Translate 20.9s SUCCESS
Camel :: AWS2 SNS 19.7s SUCCESS
Camel :: AWS Timestream 19.2s SUCCESS
Camel :: Docs 14.5s SUCCESS
Camel :: Kamelet Main 14.5s SUCCESS
Camel :: JBang :: Plugin :: Kubernetes 14.4s SUCCESS
Camel :: JBang :: Plugin :: Testing 14.3s SUCCESS
Camel :: AWS2 Eventbridge 11.7s SUCCESS
Camel :: AWS2 S3 Vectors 10.4s SUCCESS
Camel :: Catalog :: Camel Route Parser 8.6s SUCCESS
Camel :: YAML DSL :: Deserializers 8.6s SUCCESS
Camel :: Assembly 8.4s SUCCESS
Camel :: Catalog :: Camel Report Maven Plugin 7.7s SUCCESS
Camel :: AWS2 Textract 6.8s SUCCESS
Camel :: AWS Security Hub 6.3s SUCCESS
Camel :: AWS2 Polly 5.9s SUCCESS
Camel :: All Components Sync point 4.9s SUCCESS
Camel :: AWS CloudTrail 4.5s SUCCESS
Camel :: YAML DSL :: Validator Maven Plugin 4.5s SUCCESS
Camel :: Catalog :: Maven 3.3s SUCCESS
Camel :: YAML DSL :: Maven Plugins 2.9s SUCCESS
Camel :: Catalog :: Suggest (deprecated) 2.6s SUCCESS
Camel :: Coverage 1.4s SUCCESS
Camel :: JBang :: Plugin :: Edit 1.2s SUCCESS
Camel :: JBang :: Plugin :: Generate 1.1s SUCCESS
Camel :: Catalog :: Console 1.0s SUCCESS
Camel :: JBang :: Main 0.9s SUCCESS
Camel :: Catalog :: Dummy Component 0.8s SUCCESS
Camel :: Endpoint DSL :: Support 0.8s SUCCESS
Camel :: JBang :: Integration tests 0.8s SUCCESS
Camel :: Launcher :: Container 0.7s SUCCESS
Camel :: JBang :: Plugin :: MCP 0.7s SUCCESS
Camel :: AWS2 S3 n/a
Camel :: Endpoint DSL n/a
Camel :: Integration Tests n/a
Camel :: JBang :: Core n/a
Camel :: JBang :: Plugin :: TUI n/a

Top 20 slowest modules:

  • Camel :: Launcher (52.3s)
  • Camel :: JBang :: MCP (43.7s)
  • Camel :: JBang :: Plugin :: Validate (29.7s)
  • Camel :: YAML DSL :: Validator (26.1s)
  • Camel :: Component DSL (24.5s)
  • Camel :: Catalog :: Camel Catalog (23.8s)
  • Camel :: YAML DSL (23.6s)
  • Camel :: AWS2 Translate (20.9s)
  • Camel :: AWS2 SNS (19.7s)
  • Camel :: AWS Timestream (19.2s)
  • Camel :: Docs (14.5s)
  • Camel :: Kamelet Main (14.5s)
  • Camel :: JBang :: Plugin :: Kubernetes (14.4s)
  • Camel :: JBang :: Plugin :: Testing (14.3s)
  • Camel :: AWS2 Eventbridge (11.7s)
  • Camel :: AWS2 S3 Vectors (10.4s)
  • Camel :: Catalog :: Camel Route Parser (8.6s)
  • Camel :: YAML DSL :: Deserializers (8.6s)
  • Camel :: Assembly (8.4s)
  • Camel :: Catalog :: Camel Report Maven Plugin (7.7s)

⚙️ View full build and test results

Main's new body type text is updated where this PR changes the behavior it describes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
davsclaus added a commit that referenced this pull request Oct 24, 2026
…mestream, s3-vectors, security-hub and cloudtrail (#28376)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@davsclaus

Copy link
Copy Markdown
Contributor Author

Merged to main as 70be315 (squashed together with the other body type bug batches, tested together locally).

Claude Code on behalf of davsclaus

@davsclaus davsclaus closed this Oct 24, 2026
@davsclaus
davsclaus deleted the fix/CAMEL-26072-aws-2b-bugs branch October 24, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants