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
[IMPROVED] Make error actionable when adding operator+leafnodes #2449
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.
Reporting what staticcheck says:
server/leafnode.go:279:12: error strings should not end with punctuation or a newline (ST1005)
But more importantly, I wonder if instead of doing that, we should not make use of what @ripienaar has been introducing with errors. Should we start (in cases like that) have codes for non JetStream errors and keep adding to it when users report less than descriptive errors?
If so, R.I., would you mind showing us what it would take here to add a new error, etc..?
You're right this is a good case where if we had those errors outside of JetStream would have been useful, but we are not really ready for that yet - the current work is very JS orientated and I think we're still gathering feedback on how they are to use before we consider moving them into the more senstive parts of things. |
@alsuren Ok, so based on RI response, I would suggest that you remove the terminal punctuation, otherwise staticcheck would reject this code change. |
c4baea1
to
28c53be
Compare
Hi. Sorry for the delay. Pushed.
This feels unrelated, and passes locally. Is this test known to be flakey? |
That one yes, but maybe not this one. Please check if this test is not checking for the error that you have now changed.
|
There are many examples in the documentation for one half of this configuration or the other, but none which configure a leafnode remote on an operator-authenticated cluster. The error "operator mode requires account nkeys in remotes." is not very clear or actionable.
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.
LGTM
There are many examples in the documentation for one half of this configuration or the other,
but none which configure a leafnode remote on an operator-authenticated cluster.
The error "operator mode requires account nkeys in remotes." is not very clear or actionable.
It was only chance googling that led us to nats-io/k8s#286 and gave us a hint about what we needed to do.
/cc @nats-io/core