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 pedantic mode #5245
base: main
Are you sure you want to change the base?
Add pedantic mode #5245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments here, in general this now looks like it does the right thing and I did some tests and it looks good.
f6623a7
to
b9165ad
Compare
Pedantic mode intention has been added to all paths. Now it need to be properly handled and tested Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes from me what I unfortunately over looked when we were in draft
@@ -36,6 +36,14 @@ import ( | |||
"github.com/nats-io/nuid" | |||
) | |||
|
|||
// StreamRequest is used to create or update a stream. | |||
type StreamRequest struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have CreateConsumerRequest
which seems very clear, where StreamRequest
seems ambigious - we have many other kinds of stream request other than create/update. So maybe a better for this would be nice.
Stream string `json:"stream_name"` | ||
Config ConsumerConfig `json:"config"` | ||
Action ConsumerAction `json:"action"` | ||
Pedantic bool `json:"pedantic"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could probably make this omitempty also same as in the stream one
This adds pedantic mode as requested in #4959
Draft, as I need to make sure all cases are covered and tested.
I also want to check if the amount of changes in arguments passed to assigment functions could be reduced.
Signed-off-by: Tomasz Pietrek tomasz@nats.io