Commit Graph

93 Commits

Author SHA1 Message Date
Julien Pivotto 8f3bcfac93
Move to github actions (#11235)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-05 23:09:41 +02:00
Julius Volz 0b03ef73cf
Run Windows tests only for releases (#11154)
Signed-off-by: Julius Volz <julius.volz@gmail.com>

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-08-16 20:23:56 +02:00
David Leadbeater fba3e847dc
Check syntax of example configurations (#10753)
* Check syntax of example configurations

Fix a mistake in the hetzner and vultr configs.

Also it's easier not to fight the build system, and this will lint
example code, so ignore a lint issue in custom-sd.

Signed-off-by: David Leadbeater <dgl@dgl.cx>

* No need to import Makefile.common, it just complicates things

Signed-off-by: David Leadbeater <dgl@dgl.cx>
2022-05-26 18:17:21 +10:00
Julien Pivotto dc8b673299
Build the UI when making UI tarball (#10578)
We run ui-install on ci but not ui-build. This PR resolves that.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-04-12 19:22:51 +01:00
Julien Pivotto 1186974715
Publish UI release artefact in our github releases (#10577)
This will make UI static files part of the release artefacts, for
consumption by downstream distributions.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-04-12 19:23:02 +02:00
Julien Pivotto 8abef6d661
Proper support for go modules. (#10486)
* Proper support for go modules.

This pull requests makes Prometheus go-mod compatible.

The general idea is to release the Prometheus libraries as v0.x
releases, next to the v2.x tags used by end users.

This is done by mirroring Prometheus 2.x tags with Prometheus 0.x tags.

When v2.X.0 is released, we would release v0.X.0.

Pre-go mod versions are retracted from go.mod. This is not nice but
should work.

Only v2.x tags will be built and released by CI. v0.x.x tags would just
be normal tags in the repo, not promoted as releases.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-04-12 11:00:54 +02:00
Julien Pivotto a236166c71
Store compiled web ui in CI (#10546)
Some downstream distros fail to compile Prometheus UI (Debian, NixOS).

This is an attempt to store compiled UI in circleci for them to consume
it. Currently we do not expose this outside of circleci.

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

Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-04-06 20:23:55 +02:00
Sylvain Rabot c31a3e4c92
Build with Go 1.18 (#10501)
* Build with Go 1.18
* Update golangci-lint version

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2022-03-31 00:16:54 +02:00
Augustin Husson 69e9eadfd3
stop codemirror sync (#10472)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-03-21 19:51:00 +01:00
Simon Pasquier 6fae98faa8 .circleci/config.yml: bump prometheus/prometheus orb
This change ensures that we don't use the deprecated Ubuntu images which
are going to be unavailable starting May 31 2022 [1].

[1] https://circleci.com/blog/ubuntu-14-16-image-deprecation/

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2022-03-10 10:00:49 +01:00
Jan Fajerski 2c3d45c88a
Replace vfsgen with embed for static web assets (#10220)
* remove vfsgen usages

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* web: use embed package for static assets

This requires go 1.16.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* circleci: drop go generate in web/ui

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* Makefile: compress web assets before build

This commit add compression before (and decompression after) prometheus
is build. This ensures that gzipped assets are embeded in the prometheus
binary, if the builtinassets build tag is passed. If the build tag is
not passed this step is still executed but has no effect.
All this is executed in a subshell so that we can run the decompress
step even if the build step fails, but retain the exit code of promu.
This cleanup could also cover interrupts, but I left that out for now.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2022-03-09 10:21:31 +01:00
Julien Pivotto 8cc7b7e577
Split remote storage example in its own go mod (#10244)
This commit removes the dependency between Prometheus and influx.

Note: Go keeps adding the indirect dependencies in go.mod, I can't
remove them.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-02-02 14:54:13 +01:00
Ben Kochie 4cc369ed1a
Update daily cron job (#10212)
Pick a more random time of day to run the daily cron sync to avoid
correlating with UTC 00:00.

Signed-off-by: SuperQ <superq@gmail.com>
2022-01-27 20:07:05 +01:00
SuperQ 41b43c3b87
Update minimum Go version
Update minimum required Go version to 1.16 due to use of standard
library package `io/fs`.

Signed-off-by: SuperQ <superq@gmail.com>
2021-12-31 17:29:00 +01:00
Julien Pivotto e1408510e1 Update circleci orb
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-12-14 15:01:12 +01:00
Julien Pivotto b48a1e9e9b
Revert "Replace vfsgen with embed for static web assets (#9719)" (#9870)
This reverts commit ddaddc2a7a.
2021-11-26 10:11:26 +01:00
Jan Fajerski ddaddc2a7a
Replace vfsgen with embed for static web assets (#9719)
* remove vfsgen usages

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* web: use embed package for static assets

This requires go 1.16.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* circleci: drop go generate in web/ui

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* Makefile: compress web assets before build

This commit add compression before (and decompression after) prometheus
is build. This ensures that gzipped assets are embeded in the prometheus
binary, if the builtinassets build tag is passed. If the build tag is
not passed this step is still executed but has no effect.
All this is executed in a subshell so that we can run the decompress
step even if the build step fails, but retain the exit code of promu.
This cleanup could also cover interrupts, but I left that out for now.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* [FIXME]: add new module dependency on common/assets and temp replace

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-11-25 15:04:51 +01:00
Darshan Chaudhary 9dcf8b2208
Add the ability to disable tsdb isolation (#9270)
* Disable isolation in isolation struct

Signed-off-by: darshanime <deathbullet@gmail.com>

* Run tsdb tests with isolation disabled

Signed-off-by: darshanime <deathbullet@gmail.com>

* Check for isolation disabled in isoState.Close()

Signed-off-by: darshanime <deathbullet@gmail.com>

* use t.Skip to skip isolation tests when disabled

Signed-off-by: darshanime <deathbullet@gmail.com>

* address review comments

Signed-off-by: darshanime <deathbullet@gmail.com>

* fix test for defaultIsolationState

Signed-off-by: darshanime <deathbullet@gmail.com>

* Change flag name. Set flag in DB. Do not init txRing. Close isoState.

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

* Test disabled isolation in CircleCI test_go

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

* Skip isolation related tests in db_test.go

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

Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-11-19 15:41:32 +05:30
Julien Pivotto c564984daa
Reduce Prometheus pull requests builds (#9666)
* Reduce Prometheus builds

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-11-09 00:02:23 +01:00
SuperQ 3cd2c033e2
Use Go 1.16+ install for mixin tests
Use new `go install` syntax to fetch tools.

Signed-off-by: SuperQ <superq@gmail.com>
2021-10-23 22:52:16 +02:00
Julien Pivotto 7c40eb52ef
Add sync_codemirror (#9379)
* Add sync_codemirror

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-09-24 15:54:25 +02:00
Julius Volz 47d6471bd7 Add UI linting to CircleCI
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2021-09-15 12:03:45 +02:00
Augustin Husson 27aec91914 review the UI ci and associated command
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-09-10 17:18:25 +02:00
SuperQ e167a45c65
Add new Go build tags.
Add new go:build comments based on 1.17 formatting[0].

[0]: https://golang.org/doc/go1.17#gofmt

Signed-off-by: SuperQ <superq@gmail.com>
2021-08-27 10:24:14 +02:00
SuperQ a1401c26b1
Build with Go 1.17
Update build to use Go 1.17.
* Use golang-builder images for testing.
* Update CircleCI go orb.
* Use tools from golang-builder image.

Signed-off-by: SuperQ <superq@gmail.com>
2021-08-27 00:32:49 +02:00
Augustin Husson 54dfee02b2
move codemirror-promql as a prometheus web module (#9188)
* move codemirror-promql as a prometheus web module

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* remove unecessary file for the codemirror module

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* change license for Apache

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* fix codemirror build

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-08-20 11:39:07 +02:00
Augustin Husson 7291563d4d
replace yarn by npm (#9198)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-08-12 20:25:26 +02:00
Levi Harrison 44e2834960
Split Go and React Tests (#8897)
* Added go-ci and react-ci

Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-08-10 16:50:09 +02:00
Michal Wasilewski 3f686cad8b
fixes yamllint errors
Signed-off-by: Michal Wasilewski <mwasilewski@gmx.com>
2021-06-12 12:47:47 +02:00
Michal Wasilewski b6f0a17367
Add circle-ci config to install yamllint in the CI env
Signed-off-by: Michal Wasilewski <mwasilewski@gmx.com>
2021-06-12 11:23:10 +02:00
Callum Styan 8fd73b1d28
Add Exemplar Remote Write support (#8296)
* Write exemplars to the WAL and send them over remote write.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Update example for exemplars, print data in a more obvious format.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Add metrics for remote write of exemplars.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Fix incorrect slices passed to send in remote write.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* We need to unregister the new metrics.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address review comments

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Order of exemplar append vs write exemplar to WAL needs to change.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Several fixes to prevent sending uninitialized or incorrect samples with an exemplar. Fix dropping exemplar for missing series. Add tests for queue_manager sending exemplars

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Store both samples and exemplars in the same timeseries buffer to remove the alloc when building final request, keep sub-slices in separate buffers for re-use

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Condense sample/exemplar delivery tests to parameterized sub-tests

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Rename test methods for clarity now that they also handle exemplars

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Rename counter variable. Fix instances where metrics were not updated correctly

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Add exemplars to LoadWAL benchmark

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* last exemplars timestamp metric needs to convert value to seconds with
ms precision

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Process exemplar records in a separate go routine when loading the WAL.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address review comments related to clarifying comments and variable
names. Also refactor sample/exemplar to enqueue prompb types.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Regenerate types proto with comments, update protoc version again.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Put remote write of exemplars behind a feature flag.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address some of Ganesh's review comments.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Move exemplar remote write feature flag to a config file field.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address Bartek's review comments.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Don't allocate exemplar buffers in queue_manager if we're not going to
send exemplars over remote write.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Add ValidateExemplar function, validate exemplars when appending to head
and log them all to WAL before adding them to exemplar storage.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address more reivew comments from Ganesh.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Add exemplar total label length check.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address a few last review comments

Signed-off-by: Callum Styan <callumstyan@gmail.com>

Co-authored-by: Martin Disibio <mdisibio@gmail.com>
2021-05-06 13:53:52 -07:00
Ben Kochie 18c5fce892
Update yq checksum
Use the correct release checksum, not the testing one.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-30 09:16:15 +02:00
Ben Kochie 651a560254
Fix writing of yq in repo_sync
Make sure binary path exists before writing.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-29 13:18:47 +02:00
Ben Kochie f55a3be90d
Fix typo in repo sync
Use correct curl option for downloading yq binary.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-28 10:37:40 +02:00
Ben Kochie e73930e3d5
Sync CircleCI Orb version
Add sync of the Prometheus CircleCI Orb version to the sync script.
* Add `yq` to the repo sync CI job.

NOTE: This will re-format the down-stream yaml config, it does not
preserve whitespace and enforces some indenting rules. It does preserve
comments.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-27 16:58:20 +01:00
Julien Pivotto c1f203a1b8 Use CircleCI parallelism
This commit uses the CircleCI parallelism features, combined with the
last changes in promu that enables this.

Now all the pull requests will be built with all the platforms again, in
less than 20 minutes.

A side effect is that we now build Prometheus for 7 more os/arch combos:
darwin-arm64 / illumos-amd64 / linux-mips / linux-mipsle /
freebsd-arm64 / netbsd-arm64 / openbsd-arm64

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-21 12:17:20 +01:00
Ben Kochie 35b49230eb
Speed up PR builds
* Update to latest promu.
* Split up builds for PRs into a build matrix.
* Keep non-matrix build pipeline for releases.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-17 21:16:13 +01:00
Julien Pivotto 75e505babb Upgrade to golang 1.16
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-05 00:59:25 +01:00
Julien Pivotto 432d5ebc6c Rename default branch to main
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-22 20:28:02 +01:00
Julien Pivotto bdf7759eeb Pin go version for windows to go1.15
Tests are failing with go 1.16 at the moment, and by default we test
with latest go version.

https://github.com/prometheus/prometheus/issues/8403

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-17 11:50:19 +01:00
Ben Kochie 000d7edec9 Remove inline Go vendor dir
Remove the inline Go vendoring per Prometheus 2020 Dev Summit[0].

[0]: https://docs.google.com/document/d/1yuaPKLDvhJNXMF1ubsOOm5kE2_6dvCxHowBQIDs0KdU/edit

Signed-off-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-11 11:53:22 +01:00
mikeee 52109966af
Change the CI workflow to powershell and fixes the missing env var issue
Signed-off-by: mikeee <hey@mike.ee>
2021-02-08 00:44:58 +00:00
mikeee 9ca24f9d24
Revert to get the latest version of Go
Signed-off-by: mikeee <hey@mike.ee>
2021-02-08 00:40:34 +00:00
Julien Pivotto 3ead3926d1 Windows CI: downgrade golang
Latest releases has a change in behaviour or a bug:

bash: go: command not found
bash: line 1: go: command not found
bash: line 1: go: command not found

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-05 17:17:54 +01:00
Julien Pivotto c666879e3f Remove fuzzit
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-12-09 21:10:31 +01:00
Simon Pasquier e693af6c01
.circleci/config.yml: check mixins (#6895)
* .circleci/config.yml: check mixins

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Run jsonnetfmt

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Install tools in the image instead of using coreos/jsonnet-ci

The latter is deprecated

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Update jsonnetfile.json

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-08-25 15:59:41 +02:00
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
Julien Pivotto e91f7e1c0a
Cache yarn corrctly (#7727)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-04 23:31:59 +02:00
Julien Pivotto 6f296594a8
Update go deps + use exclude directive (#7624)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-07-27 11:08:38 +02:00
Ben Kochie cbb1c26305
Improve repo sync script
* Change the Makefile.common update script to be more generic.
* Sync CODE_OF_CONDUCT.md and LICENSE files.
* Rename code-of-conduct.md to match github naming convention[0]

[0]: https://help.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-06-17 17:12:36 +02:00