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
test(spanner)!: fix data race in spanner integration tests #5276
Conversation
spanner/stats.go
Outdated
return view.Register( | ||
GFELatencyView, | ||
GFEHeaderMissingCountView, | ||
) | ||
} | ||
|
||
func GetGFELatencyMetricsFlag() bool { |
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.
Could this be unexported? And same for the setter?
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.
done
@@ -267,12 +282,6 @@ func checkCommonTagsGFELatency(t *testing.T, m map[tag.Key]string) { | |||
if !strings.HasPrefix(m[tagKeyClientID], "client") { | |||
t.Fatalf("Incorrect client ID: %v", m[tagKeyClientID]) | |||
} | |||
if !strings.HasPrefix(m[tagKeyInstance], "gotest") { |
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.
Good catch 👍
By the way: The build error seems to be unrelated to this change. AFAICT, it is caused by a formatting error in the unedited @codyoss It seems that #5269 introduced a formatting error that was hidden by a different build error in that PR, but that it is a formatting error that only seems to be picked up by Go 1.17. At least, if I run |
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.
If I understand it correctly, the GFE Latency feature had not yet been released. We should make sure that this change then is included in the next release, as it would otherwise be a breaking change (we are removing an exported variable).
No its not yet released so its safe for now to get merged in current release, here is the release PR #5219 |
ac1e242
to
a499f7f
Compare
@olavloite build passed after changing iam/go_mod_tidy_hack.go and adding the unused exported GFELatencyMetricsEnabled field back to this PR. is it good to merge now? |
a499f7f
to
759fd0f
Compare
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.
2b5ecea
to
4e41fb3
Compare
Fixes #5272