Commit graph

8304 commits

Author SHA1 Message Date
Ben Kochie b9437cba50
Bump various react versions (#7820)
Update several `yarn outdated` pacakges.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-08-22 21:02:50 +02:00
Lukas Kämmerling b6955bf1ca
Add hetzner service discovery (#7822)
Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2020-08-21 15:49:19 +02:00
Julius Volz a1601274ba
Support new duration format in graph range input (#7833)
* Support new duration format in graph range input

This is to make the duration parsing and formatting in the graph range
input field consistent with the new duration formatting introduced for
the configuration and PromQL
(https://github.com/prometheus/prometheus/pull/7713).

Ranges were previously handled in seconds - these are now handled in
milliseconds everywhere, as this makes things nicer / easier.

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fixups

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-08-21 11:53:11 +02:00
Javier Palomo Almena 7ec647dbe9
golangci: Use depguard to prevent using restricted packages (#7825)
Enabling this linter in golangci will check that we are not using
restricted packages, and when a match is found, it will provide a
message suggesting the alternative package.

In this particular case, we enable it for `sync/atomic`.

Signed-off-by: Javier Palomo <javier.palomo.almena@gmail.com>
2020-08-21 11:37:21 +02:00
Joe Elliott 624075eafe
Exposes remote storage http client to allow for customization (#7831)
* Exposes remote write client to allow for customizations to the http client

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Removed changes to vendored file

Signed-off-by: Joe Elliott <number101010@gmail.com>
2020-08-20 08:45:31 -06:00
Andy Bursavich 4e6a94a27d
Invert service discovery dependencies (#7701)
This also fixes a bug in query_log_file, which now is relative to the config file like all other paths.

Signed-off-by: Andy Bursavich <abursavich@gmail.com>
2020-08-20 13:48:26 +01:00
showuon 274dce9de2
Add a link to Clean TombStone for better reference (#7830)
Signed-off-by: Luke Chen <showuon@gmail.com>
2020-08-20 12:57:01 +01:00
Goutham Veeramachaneni cb830b0a9c
Label rule_group_iterations metric with group name (#7823)
* Label rule_group_iterations metric with group name

evalTotal and evalFailures having the label but iterations not having it
is an odd mismatch.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* Remove the metrics when a group is deleted.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* Initialise the metrics

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2020-08-19 15:29:13 +02:00
Hrishikesh Barman 9438bf735a
Update GitHub test-infra workflows with new variables
While making test-infra more provider agnostic, some changes to the variables are required to make test-infra work.
2020-08-19 13:04:11 +05:30
Björn Rabenstein edae2efe6e
Merge pull request #5990 from Harkishen-Singh/remove-graph
Reposition "remove graph" close to query area
2020-08-18 13:57:53 +02:00
Harkishen-Singh cadf8f11bc Resolve conflicts.
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
2020-08-18 12:36:03 +05:30
Julien Pivotto 10363c442a
README: Remove direct reference to debian packages (#7796)
We respect and appreciate the work made by the packaging team downstream
in Debian, however it seems that the package is deviating in a way that
I'd like to remove the direct reference from our README:

- The debian package is deviating from upstream in multiple ways:
  - Some Service discoveries are missing (Azure, Kubernetes)
  - The lock file is disabled and the flag has been renamed
  - The libraries are not at the same release
  - The new UI is not implemented
- We have no control over the backports and the quick availability of
  updates
- There are other distributions with different packages and we do not
  include them either
- I expect Debian users to look in their distribution and just see the
  package there 'as usual'

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-17 20:33:46 +02:00
Julien Pivotto e96d786fb8
Stop CMUX and GRPC servers even with stale connections (#7810)
I have received a recent report for a user which confirms that sometime
the GRPC server does not stop propery.

It appears that there are 2 issues:

1. The cmux server can refuse to stop if there are stale connections.
For that we set the ReadTimeout.
2. The GRPC server graceful stop can never finish.

What this PR avoids is:

```
goroutine 227 [semacquire, 2 minutes]:
sync.runtime_Semacquire(0xc00059a75c)
    /usr/local/go/src/runtime/sema.go:56 +0x42
sync.(*WaitGroup).Wait(0xc00059a75c)
    /usr/local/go/src/sync/waitgroup.go:130 +0x64
google.golang.org/grpc.(*Server).GracefulStop(0xc00059a600)
```

This PR stops the GRPC server after 15s. Related to the go routing dumps
in #6747.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-17 09:50:32 +01:00
Julien Pivotto dca84112a9
Issue template: Remove kind/bug label added by default (#7813)
There are many false positive. It is better to tag the bugs manually
while adding priority and component.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-17 00:49:03 +02:00
Drumil Patel 09818b279b Update github workflow for funcbench and prombench to incorporate new test infra related changes for gke
Signed-off-by: Drumil Patel <drumilpatel720@gmail.com>
2020-08-16 17:30:32 +05:30
Julien Pivotto 041da628f8
Update to go 1.15 (#7798)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-15 23:49:11 +02:00
Ben Kochie 8cccbf5b0e
Update various UI components (#7807)
* Correct jquery version in prom.lib.
* Update to bootstrap 4.5.2.
* Bump yarn versions.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-08-15 22:31:30 +02:00
Julius Volz 818bd96381
Fix detail swatch glitch (#7805)
* Bump jquery and @types/jquery

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Properly close color box span in graph hover detail

jQuery 3.5.0 introcuded a breaking change that was necessary to fix HTML
security issues
(https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/), and as a
result the detail-swatch span wasn't closed properly anymore, because
spans are not valid self-closing tags in
XHTML.

Fixes https://github.com/prometheus/prometheus/issues/7803

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fix up tests

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-08-15 01:44:13 +02:00
Sven Efftinge 605371c5bb
Gitpod config (#7749)
Signed-off-by: Sven Efftinge <sven.efftinge@typefox.io>
2020-08-14 17:23:55 +02:00
johncming b521612042
tsdb: simplify code. (#7792)
Signed-off-by: johncming <johncming@yahoo.com>
2020-08-14 15:15:08 +05:30
johncming 362080ba28
rules: add evaluationTimestamp when copy state. (#7775)
Signed-off-by: johncming <johncming@yahoo.com>
2020-08-14 09:42:13 +01:00
gastonqiu 5a7d398d19
Chore: Log segment number when segment read failed (#7687)
* Chore: Log segment number when segment read failed

To manually fix the WAL files, it is good to know where the corrupt
happened so we should log the segment number when the read failed.

Related Issue #7506

Signed-off-by: gaston.qiu <gaston.qiu@umbocv.com>
2020-08-13 11:01:21 -07:00
johncming d19fc71903
tsdb: use NewRangeHead instead. (#7793)
Signed-off-by: johncming <johncming@yahoo.com>
2020-08-13 10:55:35 +01:00
Julien Pivotto a55c69c4c3
Apply gofmt -s on storage/remote/write_test.go (#7791)
Noticed in
https://goreportcard.com/report/github.com/prometheus/prometheus

This is the only file.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-12 19:55:42 -06:00
Max Neverov 7c8bbd6bcb
Add fmt rule check: labels with the name __name__ are invalid (#7787)
Signed-off-by: Max Neverov <neverov.max@gmail.com>
2020-08-12 23:37:31 +02:00
Harold Dost 21a753c4e2
Make file permissions set to allow for wider umask options. (#7782)
0644 -> 0666 on all non vendored code.

Fixes #7717

Signed-off-by: Harold Dost <harolddost@gmail.com>
2020-08-12 23:23:17 +02:00
Julien Pivotto 64236cf9e8
Use SAN in test certificate (#7789)
go 1.15 deprecated the common name verification.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-12 23:15:38 +02:00
Frederic Branczyk 06e2c2f804
Merge pull request #6838 from brancz/endpointslice
discovery/kubernetes: EndpointSlice discovery
2020-08-12 16:42:49 +02:00
Mucahit Kurt 869f1bc587
use remote.Storage in TestSampleDelivery instead of direct creation of QueueManager (#4758)
Signed-off-by: Mucahit Kurt <mucahitkurt@gmail.com>
2020-08-11 12:37:03 -07:00
Simon Pasquier 1380e6c885
web/ui/react-app: bump version of create-react-app (#7778)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-08-11 17:49:09 +02:00
Bartlomiej Plotka f16cbc20d6
tsdb: Bug fix for further continued deletions after crash deletions; added more tests. (#7777)
* tsdb: Bug fix for further continued after crash deletions; added more tests.

Additionally: Added log line for block removal.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Addressed comment.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-08-11 15:53:23 +01:00
Brian Brazil ce838ad6fc
Ensure that step is in milliseconds in console graphs. (#7773)
Further precision is truncated by the Prometheus API, so the
steps don't end up quite aligning subsequently.

Fixes #7711

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-08-11 12:33:40 +01:00
Julien Pivotto 20ab94fedf
Hints: Separating out the range and offsets of PromQL subqueries (#7667)
Fix #7629

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-11 07:21:39 +01:00
Bartlomiej Plotka 4ae2ef94e0
tsdb: Delete blocks atomically; Remove tmp blocks on start; Added test. (#7772)
## Changes:

* Rename dir when deleting
* Ignoring blocks with broken meta.json on start (we do that on reload)
* Compactor writes <ulid>.tmp-for-creation blocks instead of just .tmp
* Delete tmp-for-creation and tmp-for-deletion blocks during DB open.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-08-11 06:56:08 +01:00
johncming 2b75c1b199
storage/remote: rename httpclient name. (#7747)
Signed-off-by: johncming <johncming@yahoo.com>
2020-08-10 11:32:43 -07:00
Julien Pivotto fd06416057
Use strict unmarshalling of rules (#7767)
* Fix unmarshalling of rules

Fix #7042

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-09 15:42:25 +02:00
Julien Pivotto 2899773b01
Do not stop scrapes in progress during reload (#7752)
* Do not stop scrapes in progress during reload.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-07 15:58:16 +02:00
Frederic Branczyk db57f31325
Merge pull request #7761 from roidelapluie/reload
Log duration of reloads
2020-08-07 10:53:04 +02:00
Zhou Hao 40ace418d1
fix misspell (#7764)
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-08-07 08:57:25 +01:00
Julien Pivotto d661f84748 Log duration of reloads
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-06 21:49:26 +02:00
Guangwen Feng 2c4a4548a8
Fix golint issue caused by incorrect func name (#7756)
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2020-08-06 20:27:37 +01:00
Callum Styan c7a17f6491
Add additional tag/log to rules Manager Eval trace span. (#7708)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-08-06 08:42:20 -07:00
Julien Pivotto 989260f7ed
Merge pull request #7751 from prometheus/release-2.20
Merge v2.20.1 forward into main branch
2020-08-05 19:25:27 +02:00
Björn Rabenstein 983ebb4a51
Merge pull request #7750 from prometheus/beorn7/release
Cut v2.20.1
2020-08-05 19:07:18 +02:00
beorn7 5aa1cdea60 Cut v2.20.1
Signed-off-by: beorn7 <beorn@grafana.com>
2020-08-05 18:26:14 +02:00
Ben Kochie 889f4eb91e
Merge pull request #7067 from carlosedp/ppc64le
Add image build for ppc64le architecture
2020-08-05 18:16:59 +02:00
Frederic Branczyk ba7d2c1a79
Merge pull request #7733 from brancz/buf-lbls
tsdb: Save allocations on labels by re-using label array
2020-08-05 16:30:48 +02:00
Annanay Agarwal 118aeab02c
Make context key type public (#7748)
Signed-off-by: Annanay <annanayagarwal@gmail.com>
2020-08-05 09:51:36 +01:00
Frederic Branczyk e0cf219f0d
tsdb: Save allocations on labels by re-using label array
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2020-08-05 10:27:14 +02:00
Hrishikesh Barman 0c2fcd8981
Add PACKAGE_PATH to funcbench workflow (#7744) 2020-08-05 10:46:11 +03:00