Skip to content
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

auth, etcdserver: follow the correct usage of context #8901

Merged
merged 1 commit into from
Nov 21, 2017

Conversation

mitake
Copy link
Contributor

@mitake mitake commented Nov 21, 2017

The keys of context shouldn't be string. They should be a struct of
their own type.

Fix #8826

/cc @gyuho

auth/store.go Outdated
@@ -81,6 +81,10 @@ type AuthInfo struct {
Revision uint64
}

// they are used for the keys of context in the parameters of Authenticate()
type AuthenticateParamIndex struct{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keys of context shouldn't be string. They should be a struct of
their own type.

Fix etcd-io#8826
@gyuho gyuho merged commit 8e4d1cb into etcd-io:master Nov 21, 2017
@mitake
Copy link
Contributor Author

mitake commented Nov 21, 2017

@gyuho thanks for merging

@mitake mitake deleted the auth-context branch November 21, 2017 08:24
@codecov-io
Copy link

Codecov Report

Merging #8901 into master will decrease coverage by 0.11%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8901      +/-   ##
==========================================
- Coverage   76.17%   76.05%   -0.12%     
==========================================
  Files         359      359              
  Lines       29740    29740              
==========================================
- Hits        22653    22620      -33     
- Misses       5509     5537      +28     
- Partials     1578     1583       +5
Impacted Files Coverage Δ
auth/store.go 80.65% <0%> (ø) ⬆️
etcdmain/config.go 81.28% <100%> (ø) ⬆️
etcdserver/apply.go 91.16% <100%> (ø) ⬆️
auth/simple_token.go 93.51% <100%> (ø) ⬆️
pkg/transport/timeout_conn.go 80% <0%> (-20%) ⬇️
clientv3/namespace/watch.go 87.87% <0%> (-12.13%) ⬇️
pkg/adt/interval_tree.go 87.08% <0%> (-5.71%) ⬇️
pkg/testutil/recorder.go 77.77% <0%> (-3.71%) ⬇️
etcdserver/api/v3rpc/watch.go 92.09% <0%> (-3.26%) ⬇️
proxy/grpcproxy/watch.go 91.92% <0%> (-3.11%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f62cd1d...f649132. Read the comment docs.

@fuweid fuweid mentioned this pull request Sep 21, 2023
fuweid added a commit to fuweid/etcd that referenced this pull request Sep 21, 2023
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to etcd-io#8901.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
iiamabby pushed a commit to iiamabby/etcd that referenced this pull request Nov 30, 2023
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to etcd-io#8901.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants