Cut v2.30.1 (#9402)

* backfill: Do not align the start of the group since we align every rule.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Backfill: Do not query after --end (#9340)

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Redact remote write URL when used for metric label (#9383)

Redact any basic auth passwords in the remote write URL (which are
technically allowed although not recommended) when used as metric
labels.

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>

* Azure: Fix panic when no computername is set (#9387)

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Cut v2.30.1

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com>
This commit is contained in:
Ganesh Vernekar 2021-09-28 14:24:43 +05:30 committed by GitHub
parent 168012f2bd
commit fafb309d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 6 deletions

View File

@ -1,3 +1,11 @@
## 2.30.1 / 2021-09-28
* [ENHANCEMENT] Remote Write: Redact remote write URL when used for metric label. #9383
* [ENHANCEMENT] UI: Redact remote write URL and proxy URL passwords in the `/config` page. #9408
* [BUGFIX] promtool rules backfill: Prevent creation of data before the start time. #9339
* [BUGFIX] promtool rules backfill: Do not query after the end time. #9340
* [BUGFIX] Azure SD: Fix panic when no computername is set. #9387
## 2.30.0 / 2021-09-14 ## 2.30.0 / 2021-09-14
* [FEATURE] **experimental** TSDB: Snapshot in-memory chunks on shutdown for faster restarts. Behind `--enable-feature=memory-snapshot-on-shutdown` flag. #7229 * [FEATURE] **experimental** TSDB: Snapshot in-memory chunks on shutdown for faster restarts. Behind `--enable-feature=memory-snapshot-on-shutdown` flag. #7229

View File

@ -1 +1 @@
2.30.0 2.30.1

View File

@ -81,10 +81,9 @@ func (importer *ruleImporter) importAll(ctx context.Context) (errs []error) {
for name, group := range importer.groups { for name, group := range importer.groups {
level.Info(importer.logger).Log("backfiller", "processing group", "name", name) level.Info(importer.logger).Log("backfiller", "processing group", "name", name)
stimeWithAlignment := group.EvalTimestamp(importer.config.start.UnixNano())
for i, r := range group.Rules() { for i, r := range group.Rules() {
level.Info(importer.logger).Log("backfiller", "processing rule", "id", i, "name", r.Name()) level.Info(importer.logger).Log("backfiller", "processing rule", "id", i, "name", r.Name())
if err := importer.importRule(ctx, r.Query().String(), r.Name(), r.Labels(), stimeWithAlignment, importer.config.end, group); err != nil { if err := importer.importRule(ctx, r.Query().String(), r.Name(), r.Labels(), importer.config.start, importer.config.end, group); err != nil {
errs = append(errs, err) errs = append(errs, err)
} }
} }
@ -106,11 +105,15 @@ func (importer *ruleImporter) importRule(ctx context.Context, ruleExpr, ruleName
for startWithAlignment.Unix() < currStart { for startWithAlignment.Unix() < currStart {
startWithAlignment = startWithAlignment.Add(grp.Interval()) startWithAlignment = startWithAlignment.Add(grp.Interval())
} }
end := time.Unix(min(endOfBlock/int64(time.Second/time.Millisecond), end.Unix()), 0).UTC()
if end.Before(startWithAlignment) {
break
}
val, warnings, err := importer.apiClient.QueryRange(ctx, val, warnings, err := importer.apiClient.QueryRange(ctx,
ruleExpr, ruleExpr,
v1.Range{ v1.Range{
Start: startWithAlignment, Start: startWithAlignment,
End: time.Unix(min(endOfBlock/int64(time.Second/time.Millisecond), end.Unix()), 0).UTC(), End: end,
Step: grp.Interval(), Step: grp.Interval(),
}, },
) )

View File

@ -464,7 +464,9 @@ func mapFromVM(vm compute.VirtualMachine) virtualMachine {
} }
} }
if vm.VirtualMachineProperties != nil && vm.VirtualMachineProperties.OsProfile != nil { if vm.VirtualMachineProperties != nil &&
vm.VirtualMachineProperties.OsProfile != nil &&
vm.VirtualMachineProperties.OsProfile.ComputerName != nil {
computerName = *(vm.VirtualMachineProperties.OsProfile.ComputerName) computerName = *(vm.VirtualMachineProperties.OsProfile.ComputerName)
} }

View File

@ -158,7 +158,10 @@ func (rws *WriteStorage) ApplyConfig(conf *config.Config) error {
continue continue
} }
endpoint := rwConf.URL.String() // Redacted to remove any passwords in the URL (that are
// technically accepted but not recommended) since this is
// only used for metric labels.
endpoint := rwConf.URL.Redacted()
newQueues[hash] = NewQueueManager( newQueues[hash] = NewQueueManager(
newQueueManagerMetrics(rws.reg, name, endpoint), newQueueManagerMetrics(rws.reg, name, endpoint),
rws.watcherMetrics, rws.watcherMetrics,