Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when attempting to change consumer type #6408

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

piotrpio
Copy link
Contributor

Before this change, an attempt to change consumer type (by either setting or removing deliver subject), resulted in max waiting can not be updated error as MaxWaiting has a default value for pull consumers. This ensures that changing consumer type is checked before max waiting to return a more useful error message.

Signed-off-by: Piotr Piotrowski [email protected]

@piotrpio piotrpio requested a review from a team as a code owner January 26, 2025 20:43
AckPolicy: nats.AckExplicitPolicy,
DeliverSubject: "foo",
})
if !strings.Contains(err.Error(), "can not update pull consumer to push based") {
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit but assertions like require_Equals(err.Error(), "can not update pull consumer to push based") are better not just because they are cleaner but because they properly integrate with the Antithesis SDK assertions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thanks 👍

@piotrpio piotrpio force-pushed the improve-update-consumer-error branch from bea3f58 to d408266 Compare January 27, 2025 14:32
Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit 52df7e6 into main Jan 27, 2025
4 of 5 checks passed
@derekcollison derekcollison deleted the improve-update-consumer-error branch January 27, 2025 15:05
neilalexander added a commit that referenced this pull request Feb 6, 2025
Includes the following:

- #6406
- #6412
- #6408
- #6416
- #6425
- #6424
- #6438
- #6439
- #6446
- #6447
- #6448
- #6449
- #6450
- #6451
- #6452
- #6453
- #6456
- #6458
- #6457
- #6459
- #6460
- #6461

Signed-off-by: Neil Twigg <[email protected]>
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.

3 participants