Skip to content

Fix crash on listing offset of unknown partition#246

Merged
ShogunPanda merged 1 commit intoplatformatic:mainfrom
lp247:fix/unknown_partition
Mar 10, 2026
Merged

Fix crash on listing offset of unknown partition#246
ShogunPanda merged 1 commit intoplatformatic:mainfrom
lp247:fix/unknown_partition

Conversation

@lp247
Copy link
Copy Markdown
Contributor

@lp247 lp247 commented Mar 6, 2026

This change fixes uncaught exceptions in the Admin client class's #listOffsets function that occur when invalid partitions are declared within a topic, which are then passed to the function via options. This case throws a UserError with an appropriate error message concerning invalid partitions. As the case of invalid partitions is semantically the same as the case of invalid topics, we also throw a UserError for the case of invalid topics inside a metadata call (mapped from ResponseError)

On-behalf-of: @SAP ospo@sap.com

@mcollina mcollina requested a review from ShogunPanda March 6, 2026 17:50
Copy link
Copy Markdown
Contributor

@ShogunPanda ShogunPanda left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.
I think there is a an easier way than a semver-major change.
Pleasee my comment below.

@lp247 lp247 force-pushed the fix/unknown_partition branch from 5f7496a to 1dd3d85 Compare March 9, 2026 15:57
@ShogunPanda
Copy link
Copy Markdown
Contributor

@lp247 The CI is failing, can you please fix it?

This change fixes uncaught exceptions in the Admin client class's
within a topic, which are then passed to the function via options. This
case throws a UserError with an appropriate error message concerning
invalid partitions. As the case of invalid partitions is semantically
the same as the case of invalid topics, we also throw a UserError for
the case of invalid topics inside a metadata call (mapped from
ResponseError).

On-behalf-of: @SAP ospo@sap.com
Signed-off-by: Peter Lehnhardt <peter.lehnhardt@sap.com>
@lp247 lp247 force-pushed the fix/unknown_partition branch from 2a5acab to bd5f7a1 Compare March 10, 2026 08:53
@lp247
Copy link
Copy Markdown
Contributor Author

lp247 commented Mar 10, 2026

@ShogunPanda I missed some tests, but they should be fixed now

@ShogunPanda ShogunPanda merged commit 6d93309 into platformatic:main Mar 10, 2026
22 checks passed
@lp247 lp247 deleted the fix/unknown_partition branch March 10, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants