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
changed format of JSClusterNoPeers error #3459
Conversation
This error was introduced in #3342 and reveals to much information This change gets rid of cluster names and peer counts. All other counts where changed to booleans, which are only included in the output when the filter was hit. In addition, the set of not matching tags is included. Signed-off-by: Matthias Hanel <mh@synadia.com>
Signed-off-by: Matthias Hanel <mh@synadia.com>
With a local cluster of 3, when trying to update with a tag (that does not exist), I am getting this with the CLI:
I think that is good. @derekcollison I think that matches what you wanted, no? |
Lots of colons, anyway to cut that down to plain sentence?
|
server/jetstream_cluster.go
Outdated
`, | ||
e.cluster, e.clusterPeers, e.offline, e.excludeTag, e.noTagMatch, e.noStorage, e.uniqueTag, e.misc) | ||
b := strings.Builder{} | ||
b.WriteString("peer selection") |
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.
Wonder if peer selection failures
is needed though, because we already return through NewJSClusterNoPeersError() which already has "no suitable peers for placement: "
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.
Still prefer a simpler error that looks more like a sentence. Too many colons.
Removing the "peer selection failures: " would result in:
Now, the beginning "nats: error: could not edit Stream TEST:" is from the NATS CLI, so not much we can do there. |
Are we sure we are not returning Would prefer..
Note no error:, stream not capitalized, stream name in quotes, and comma vs another colon between placement and tags. |
@derekcollison That is totally NATS CLI. The response is a stream update response, so that's CLI that format this way. Here is the -trace (if we were to remove the "peer selection failures"
|
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
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
The tags not matched should be an array, not a map. Please change to..
|
samples: 1) no suitable peers for placement, tags not matched ['cloud:GCP', 'country:US']" 2) no suitable peers for placement, insufficient storage Signed-off-by: Matthias Hanel <mh@synadia.com>
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 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
Signed-off-by: Matthias Hanel <mh@synadia.com>
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
This error was introduced in #3342 and reveals too much information
This change gets rid of cluster names and peer counts.
All other counts where changed to booleans,
which are only included in the output when the filter was hit.
In addition, the set of not matching tags is included.
Signed-off-by: Matthias Hanel mh@synadia.com