Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 the possible to make chain of chains via pkg/next #173
Add the possible to make chain of chains via pkg/next #173
Changes from 4 commits
086f019
51e26ef
4b60377
8f262c8
1d5588c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Question... why return nil here instead of tailServer?
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.
actually it can be nil in two cases:
ctx = nil
. In this case, we looking for the next parent chain and value can benil
next.NewServer()
and passednil
context. Not sure that we should returntailServer
in this caseThere 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.
Finally, I think it will be better just throw nil panic exception for the case №2.
Fixed by 1d5588c
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.
Why would we panic if called outside of a chain?
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 think ignoring errors is not a good pattern for this place.
1.1 https://github.com/networkservicemesh/sdk/blob/master/pkg/networkservice/core/trace/context.go#L43
1.2. https://github.com/networkservicemesh/sdk-vppagent/blob/master/pkg/networkservice/vppagent/context.go#L50
1.3. https://github.com/networkservicemesh/sdk/blob/master/pkg/networkservice/common/clienturl/context.go#L44
1.4. https://github.com/networkservicemesh/sdk/blob/master/pkg/networkservice/common/discover/context.go#L46
1.5. https://github.com/networkservicemesh/sdk/blob/master/pkg/registry/core/trace/context.go#L43
...
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.
That's fair :)