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

Add some validation for durable names #633

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

wallyqs
Copy link
Member

@wallyqs wallyqs commented Jan 13, 2021

In case a Durable name includes a dot, then it would not be able to be created since it will not match against the $JS.API.CONSUMER.CREATE.* subject from the JetStream API and return a jetstream not enabled error.
With this change, we try to detect this in the client first and error in case an invalid durable name has been used.

Signed-off-by: Waldemar Quevedo wally@synadia.com

Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

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

Some minor changes.

js.go Outdated Show resolved Hide resolved
test/js_test.go Outdated Show resolved Hide resolved
test/js_test.go Outdated Show resolved Hide resolved
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 86.867% when pulling 7221823 on wallyqs:js-durable-validate into f2e3b19 on nats-io:master.

Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

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

LGTM

@wallyqs wallyqs merged commit 0a6b5f6 into nats-io:master Jan 14, 2021
@wallyqs wallyqs deleted the js-durable-validate branch January 14, 2021 00:11
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