CAMEL-24249: camel-aws2 - fix copy-pasted validation messages in MSK/MQ/STS producers#25070
Open
oscerd wants to merge 1 commit into
Open
CAMEL-24249: camel-aws2 - fix copy-pasted validation messages in MSK/MQ/STS producers#25070oscerd wants to merge 1 commit into
oscerd wants to merge 1 commit into
Conversation
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #25060 to
camel-4.14.x.Three producers threw an
IllegalArgumentExceptionnaming the wrong parameter,copy-pasted from a neighbouring check:
MSK2Producer.createCluster— missing broker-nodes count reported "Kafka Version must be specified".MQ2Producer—MISSING_BROKER_NAME("Broker Name must be specified") was thrown for the broker id checks (delete/reboot/update/describe) and theconfigurationIdcheck; onlycreateBrokertakes a name. AddedMISSING_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) andSTS2ProducerTest(4) all pass.No upgrade-guide entry — the exception type is unchanged; only the message text is corrected.
Claude Code on behalf of oscerd