-
Notifications
You must be signed in to change notification settings - Fork 36
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
Removed adapters #1149
Removed adapters #1149
Conversation
93c684f
to
58199f6
Compare
.golangci.yml
Outdated
@@ -35,7 +35,7 @@ linters-settings: | |||
dupl: | |||
threshold: 150 | |||
funlen: | |||
Lines: 100 | |||
Lines: 105 |
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.
Can we apply the fix for a file and not change this for all files?
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.
ok, fixed
return next.Client(ctx).Request(ctx, request, opts...) | ||
} | ||
|
||
func (s *setLogOptionClient) withFields(ctx context.Context) context.Context { |
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.
Can we create a file context.go and put there function withFields?
https://github.com/networkservicemesh/sdk/blob/main/pkg/networkservice/common/setlogoption/server.go#L46-L61
The function can be reused by client and server.
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.
ok, done
fields := make(map[string]interface{}) | ||
for k, v := range ctxFields { | ||
fields[k] = v | ||
} |
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 do we need to make a copy?
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.
ok, fixed
98f7824
to
fdff87f
Compare
fields := make(map[string]interface{}) | ||
fields["type"] = "NetworkService" | ||
for k, v := range options { | ||
fields[k] = v | ||
} |
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.
what if we already have fields in ctx?
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.
ok, fixed
@Mixaster995 @denis-tingaikin Is there more work to do here or is this ready to merge? |
@edwarnicke it is ready, but i think it is better to be frozen until release, because any new change may affect stability, which is our №1 priority. What do you think about that? |
Signed-off-by: Mikhail Avramenko <[email protected]>
Signed-off-by: Mikhail Avramenko <[email protected]>
Signed-off-by: Mikhail Avramenko <[email protected]>
fdff87f
to
b4865c8
Compare
@Mixaster995 , @edwarnicke I think we actually do not need setlogoption pkg. Can we just cut it from sdk? |
closed in favor of #1186 |
Signed-off-by: Mikhail Avramenko [email protected]
Description
Removed usage of
adapters
outside test environmentIssue link
closes #1147
Types of changes