Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fayzal-g committed Oct 9, 2024
1 parent 6ca8e9c commit f832fe0
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 75 deletions.
1 change: 0 additions & 1 deletion pkg/ruler/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ func (a *API) PrometheusRules(w http.ResponseWriter, req *http.Request) {
return
}

nextToken := req.URL.Query().Get("next_token")
var maxGroups int
if maxGroupsVal := req.URL.Query().Get("max_groups"); maxGroupsVal != "" {
maxGroups, err = strconv.Atoi(maxGroupsVal)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ruler/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ func TestRuler_PrometheusRulesPagination(t *testing.T) {
return len(rls.Groups)
})

a := NewAPI(r, r.directStore, log.NewNopLogger())
a := NewAPI(r, r.store, log.NewNopLogger())

getRulesResponse := func(groupSize int, nextToken string) response {
queryParams := "?" + url.Values{
Expand Down
158 changes: 87 additions & 71 deletions pkg/ruler/ruler.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/ruler/ruler.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ message RulesRequest {
repeated string rule_group = 3;
repeated string file = 4;
bool exclude_alerts = 5;
uint64 max_groups = 6;
uint64 next_token = 7;
int32 max_groups = 6;
string next_token = 7;
}

message RulesResponse {
Expand Down

0 comments on commit f832fe0

Please sign in to comment.