Skip to content

CAMEL-24249: camel-aws2 - fix copy-pasted validation messages in MSK/MQ/STS producers#25070

Open
oscerd wants to merge 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/CAMEL-24249-414
Open

CAMEL-24249: camel-aws2 - fix copy-pasted validation messages in MSK/MQ/STS producers#25070
oscerd wants to merge 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/CAMEL-24249-414

Conversation

@oscerd

@oscerd oscerd commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Backport of #25060 to camel-4.14.x.

Three producers threw an IllegalArgumentException naming the wrong parameter,
copy-pasted from a neighbouring check:

  • MSK2Producer.createCluster — missing broker-nodes count reported "Kafka Version must be specified".
  • MQ2ProducerMISSING_BROKER_NAME ("Broker Name must be specified") was thrown for the broker id checks (delete/reboot/update/describe) and the configurationId check; only createBroker takes a name. Added MISSING_BROKER_ID / MISSING_CONFIGURATION_ID.
  • STS2Producer.getFederationToken — missing federated name said "for assumeRole operation".

All three producers carry these strings verbatim on this branch. Cherry-picked with trivial auto-merges; MSKProducerTest (6), MQProducerTest (9) and STS2ProducerTest (4) all pass.

No upgrade-guide entry — the exception type is unchanged; only the message text is corrected.


Claude Code on behalf of oscerd

…MQ/STS producers

Several producers threw an IllegalArgumentException whose message named the
wrong parameter, having been copy-pasted from a neighbouring check:

- MSK2Producer.createCluster: the missing broker-nodes-number check reported
  "Kafka Version must be specified".
- MQ2Producer: MISSING_BROKER_NAME ("Broker Name must be specified") was thrown
  for the broker *id* checks in delete/reboot/update/describe and for the
  configurationId check in updateBroker; only createBroker takes a name. Added
  MISSING_BROKER_ID and MISSING_CONFIGURATION_ID and used them for the id checks.
- STS2Producer.getFederationToken: the missing federated-name check said
  "for assumeRole operation".

Each check now names the parameter it guards. Added tests asserting the
corrected messages in MSKProducerTest, MQProducerTest and STS2ProducerTest.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
(cherry picked from commit 715a41f)
@oscerd oscerd added the bug Something isn't working label Jul 23, 2026
@oscerd
oscerd requested a review from davsclaus July 23, 2026 16:28
@oscerd oscerd added this to the 4.14.9 milestone Jul 23, 2026
@oscerd
oscerd requested a review from Croway July 23, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant