Browse Source

Merge v2.7.1 into master (#5170)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
pull/5175/head
Simon Pasquier 6 years ago committed by Goutham Veeramachaneni
parent
commit
a60431f3cd
  1. 8
      CHANGELOG.md
  2. 2
      VERSION
  3. 2
      rules/manager.go
  4. 4
      web/ui/assets_vfsdata.go
  5. 6
      web/ui/static/js/graph/index.js
  6. 8
      web/web.go

8
CHANGELOG.md

@ -1,3 +1,11 @@
## 2.7.1 / 2019-01-31
This release has a fix for a Stored DOM XSS vulnerability that can be triggered when using the query history functionality. Thanks to Dor Tumarkin from Checkmarx for reporting it.
* [BUGFIX/SECURITY] Fix a Stored DOM XSS vulnerability with query history. #5163
* [BUGFIX] `prometheus_rule_group_last_duration_seconds` now reports seconds instead of nanoseconds. #5153
* [BUGFIX] Make sure the targets are consistently sorted in the targets page. #5161
## 2.7.0 / 2019-01-28
We're rolling back the Dockerfile changes introduced in 2.6.0. If you made changes to your docker deployment in 2.6.0, you will need to roll them back. This release also adds experimental support for disk size based retention. To accomodate that we are deprecating the flag `storage.tsdb.retention` in favour of `storage.tsdb.retention.time`. We print a warning if the flag is in use, but it will function without breaking until Prometheus 3.0.

2
VERSION

@ -1 +1 @@
2.7.0
2.7.1

2
rules/manager.go

@ -369,7 +369,7 @@ func (g *Group) GetEvaluationDuration() time.Duration {
// setEvaluationDuration sets the time in seconds the last evaluation took.
func (g *Group) setEvaluationDuration(dur time.Duration) {
g.metrics.groupLastDuration.WithLabelValues(groupKey(g.file, g.name)).Set(float64(dur))
g.metrics.groupLastDuration.WithLabelValues(groupKey(g.file, g.name)).Set(dur.Seconds())
g.mtx.Lock()
defer g.mtx.Unlock()

4
web/ui/assets_vfsdata.go

File diff suppressed because one or more lines are too long

6
web/ui/static/js/graph/index.js

@ -311,11 +311,7 @@ Prometheus.Graph.prototype.initTypeahead = function(self) {
return i === 0 ? a.localeCompare(b) : i;
});
return items;
},
highlighter: function (item) {
return $("<div>" + self.fuzzyResult.map[item].string + "</div>");
},
}
});
// This needs to happen after attaching the typeahead plugin, as it
// otherwise breaks the typeahead functionality.

8
web/web.go

@ -695,8 +695,12 @@ func (h *Handler) targets(w http.ResponseWriter, r *http.Request) {
tps := h.scrapeManager.TargetsActive()
for _, targets := range tps {
sort.Slice(targets, func(i, j int) bool {
return targets[i].Labels().Get(model.JobLabel) < targets[j].Labels().Get(model.JobLabel) ||
targets[i].Labels().Get(model.InstanceLabel) < targets[j].Labels().Get(model.InstanceLabel)
iJobLabel := targets[i].Labels().Get(model.JobLabel)
jJobLabel := targets[j].Labels().Get(model.JobLabel)
if iJobLabel == jJobLabel {
return targets[i].Labels().Get(model.InstanceLabel) < targets[j].Labels().Get(model.InstanceLabel)
}
return iJobLabel < jJobLabel
})
}

Loading…
Cancel
Save