-
Notifications
You must be signed in to change notification settings - Fork 17
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
Bump prometheus-auth to a more recent version of Go and stop using vendored modules and rancher/trash #12
Conversation
ee5bf72
to
d3d8c59
Compare
d3d8c59
to
7d1c9dd
Compare
…ogs on bad requests
…eturned by new parser library
In previous versions of the prometheus client, promlb.Matcher was just a struct that contained strings. However, in recent versions of the client, promlb.Matcher contains a FastRegexMatcher instantiated within it, which is only instantiated when you call promlb.NewMatcher on a matcher whose type is a regex match. As a result, simply modifying the promlb.Matcher struct fields results in a segfault on trying to parse a regex label selector using a new client, which is fixed with the change introduced here.
7d1c9dd
to
bdfad55
Compare
@@ -59,11 +60,7 @@ func Test_accessControl(t *testing.T) { | |||
dbDir, err := ioutil.TempDir("", "tsdb-ready") | |||
defer os.RemoveAll(dbDir) | |||
|
|||
testutil.Ok(t, err) |
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.
fyi testutil no longer exists, that's why we're shifting to testify
type dbAdapter struct { | ||
*promtsdb.DB | ||
} | ||
|
||
func (a *dbAdapter) Stats(statsByLabelName string) (*promtsdb.Stats, error) { | ||
return a.Head().Stats(statsByLabelName), nil | ||
} | ||
|
||
func (a *dbAdapter) WALReplayStatus() (promtsdb.WALReplayStatus, error) { | ||
return promtsdb.WALReplayStatus{}, nil | ||
} |
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.
copied from upstream
resp, err = http.Post("http://localhost:9090/api/v2/admin/tsdb/snapshot", "", strings.NewReader("")) | ||
|
||
testutil.Ok(t, err) | ||
testutil.Equals(t, http.StatusOK, resp.StatusCode) | ||
|
||
resp, err = http.Post("http://localhost:9090/api/v2/admin/tsdb/delete_series", "", strings.NewReader("{}")) | ||
|
||
testutil.Ok(t, err) | ||
testutil.Equals(t, http.StatusOK, resp.StatusCode) |
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.
not checked in upstream either anymore, so removed from our tests
63d9e1b
to
e045a82
Compare
e045a82
to
40b9585
Compare
40b9585
to
92d01b8
Compare
92d01b8
to
3e7f6bf
Compare
3e7f6bf
to
67b000f
Compare
b2c5707
to
f0833d6
Compare
f0833d6
to
42870a8
Compare
Related Issue: rancher/rancher#39533