Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-0.15' into qyerying-dedu…
Browse files Browse the repository at this point in the history
…p-penalty-with-res-step

Signed-off-by: Krasi Georgiev <[email protected]>
  • Loading branch information
krasi-georgiev committed Sep 1, 2020
2 parents 3adbe02 + 7d7d176 commit 9ce6b64
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ We use *breaking :warning:* word for marking changes that are not backward compa

* [#3095](https://github.com/thanos-io/thanos/pull/3095) Rule: update manager when all rule files are removed.
* [#3098](https://github.com/thanos-io/thanos/pull/3098) ui: Fix Block Viewer for Compactor and Store
* [#3105](https://github.com/thanos-io/thanos/pull/3105) Query: Fix overwriting maxSourceResolution when auto downsampling is enabled.
* [#3010](https://github.com/thanos-io/thanos/pull/3010) Querier: Added a flag to override the default look back delta in promql. The flag should be set to at least 2 times the slowest scrape interval.


## [v0.15.0-rc.0](https://github.com/thanos-io/thanos/releases/tag/v0.15.0-rc.0) - 2020.08.26

Highlights:
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/query/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ func (qapi *QueryAPI) parseDownsamplingParamMillis(r *http.Request, defaultVal t
val := r.FormValue(maxSourceResolutionParam)
if qapi.enableAutodownsampling || (val == "auto") {
maxSourceResolution = defaultVal
} else if val != "" {
}
if val != "" && val != "auto" {
var err error
maxSourceResolution, err = parseDuration(val)
if err != nil {
Expand Down
8 changes: 8 additions & 0 deletions pkg/api/query/v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,14 @@ func TestParseDownsamplingParamMillis(t *testing.T) {
result: int64((1 * time.Hour) / 6),
fail: true,
},
// maxSourceResolution param can be overwritten.
{
maxSourceResolutionParam: "1m",
enableAutodownsampling: true,
step: time.Hour,
result: int64(time.Minute / (1000 * 1000)),
fail: false,
},
}

for i, test := range tests {
Expand Down

0 comments on commit 9ce6b64

Please sign in to comment.