Commit graph

93 commits

Author SHA1 Message Date
Jesus Vazquez e934d0f011 Merge 'main' into sparsehistogram
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
2022-10-05 22:14:49 +02:00
Augustin Husson f67f87c82b
Update npm deps for v2.39 and fix the script called to do it (#11332)
* fix the way to get the list of workspaces

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

* update UI dependencies

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

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-09-21 23:36:28 +02:00
SuperQ 82f53442c6
Stop syncing CircleCI orb version
Prometheus repo nolonger uses the CircleCI orb, remove the sync.

Signed-off-by: SuperQ <superq@gmail.com>
2022-09-16 10:55:26 +02:00
Matt 7541baff87
Make build script compatible with older gzip (#11256)
* Add RHEL7 compatibility for gzip options

Signed-off-by: Matthew Themis <matthew.themis@anatwine.com>
Signed-off-by: Matt <33697686+mttradebyte@users.noreply.github.com>
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-06 14:24:06 +02:00
beorn7 28f028e938 Merge branch 'main' into sparsehistogram 2022-07-12 19:07:13 +02:00
Julien Pivotto 7479cd95b0
Fix UI release script and bump UI release (#10981)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-07-05 15:12:59 +02:00
Augustin Husson 7b006e804c
enable ui module publication (#10876)
* enable ui module publication

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

* use main changelog of Prometheus to reflect the changes of the packages

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

* ignore changelog and license in the libs

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

* replace perses references

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-06-30 12:10:10 +02:00
beorn7 3bc711e333 Merge branch 'main' into sparsehistogram 2022-05-04 13:37:13 +02:00
Matthieu MOREL e2ede285a2
refactor: move from io/ioutil to io and os packages (#10528)
* refactor: move from io/ioutil to io and os packages
* use fs.DirEntry instead of os.FileInfo after os.ReadDir

Signed-off-by: MOREL Matthieu <matthieu.morel@cnp.fr>
2022-04-27 11:24:36 +02: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 344b272b3e
Fix assets tarball (#10548)
The tarball should be compressed and only use uncompressed assets. In
that way, uit can be used by downstream distros easily. they can either
download the assets and serve it as is or use the compress script to
have it in the binary.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-04-08 00:23:15 +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
beorn7 7ee1836ef5 Merge branch 'main' into sparsehistogram 2022-04-05 18:31:19 +02:00
Augustin Husson 043a2954f8
UI: stabilize dependencies and environment (#10517)
* create lezer-promql module + move codemirror to a pure esm module + unified dependencies

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

* ignore test utils file and remove the type "module" in package.json

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

* use jest to run the lezer-promql test

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

* give an automatic way to update the ui dependencies

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

* update all dependencies using make update-npm-deps

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

* fix react-app test

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

* remove generated file

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

* remove unnecessary backslash in script

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

* fix reviews

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

* rewording

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

* use npx to run lezer-generator

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-04-05 11:49:22 +02:00
beorn7 4210aac74a Merge branch 'main' into sparsehistogram 2022-03-22 14:47:42 +01: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
Julien Pivotto c901ebaf8d
ui/compress: Do not change git worktree (#10467)
This change makes sure that the git worktree is not changed while
compressing assets, making it better for local development.

To achieve this, the compression script keeps the un-compressed assets
and generates the go:embed directory when compressing the files.

A .gitignore file has been added to ignore generated files.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-03-20 15:08:32 +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 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
beorn7 5d4db805ac Merge branch 'main' into sparsehistogram 2021-11-17 19:57:31 +01:00
Augustin Husson 17fc57948a
codemirror-promql moved to prometheus org (#9651)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-11-03 12:46:58 +01:00
beorn7 fd5ea4e0b5 Merge branch 'main' into sparsehistogram 2021-10-07 23:16:42 +02:00
Julien Pivotto 0de0e1ee0e
codemirror_sync: Use reset and checkout instead of restore (#9396)
The git version we are using for CI is too old.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-09-25 12:38:57 +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
Augustin Husson 1b740aeb6e Merge branch 'main' into feature/use-npm-workspace
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-09-14 19:27:44 +02:00
Levi Harrison 6c290d212d
Create github workflows dir if not present
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-11 14:08:07 -04: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
Levi Harrison cc77593176
Switch golangci-lint to GitHub Actions (#9232)
* Added golangci-lint action

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-10 16:30:18 +02:00
Julien Pivotto d5676fb9e0
Merge pull request #9254 from prometheus/superq/go1.17
Build with Go 1.17 / npm 7 / node 16
2021-08-28 18:36:42 +02:00
Frederic Hemberger 16b8911b1a
docs: Replace go get with go install for command installation (#9098)
`go get` is deprecated for installation of commands as of go v1.17
Ref: https://go.googlesource.com/go/+/ced0fdbad0655d63d535390b1a7126fd1fef8348

Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
2021-08-27 11:08:21 +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
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
Björn Rabenstein df3b674f01
Add metrics.proto to other protobuf code (#8996)
We cannot just use prometheus/client_model directly because we want to
stay consistent with the use of gogo-protobuf. So this converts
metrics.proto to proto3 and edits it lightly so that it fits into
the framework how prometheus/prometheus handles protobuf.

Note that metrics.proto couldn't be merged into the prompb package
because prompb already has an Exemplar type, which is different from
the Exemplar type in metrics.proto. The directory structure seems to
play a role in the protobuf world, so I better kept it.

Signed-off-by: beorn7 <beorn@grafana.com>
2021-06-28 11:16:06 +01:00
Julien Pivotto e2557e4920
Revert "Update sync PRs" (#8998)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-06-27 00:29:56 +02:00
SuperQ c843314a9f
Update sync PRs
Push updates to the repo sync PRs if there is already a PR open. This
allows for cumulative updates to be synced.

Signed-off-by: SuperQ <superq@gmail.com>
2021-06-26 18:42:37 +02:00
Levi Harrison b0df5d9568
Added .yamllint to reposync
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-06-25 07:46:48 -04:00
Levi Harrison 0027389b41 Changed error exclude
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-06-11 12:29:03 -04:00
SuperQ 141dcbb87f
Fix sync of CircleCI orb
Fix the case where there is no circleci config in a repo.
* Add echo_yellow() for warnings.
* Send echo_COLOR output to stderr to not be in function output.
* Make check_circleci_orb curl failure a warning.

Signed-off-by: SuperQ <superq@gmail.com>
2021-06-01 12:45:31 +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 968d7f326c
Don't sync if no orb is used
Don't sync the Prometheus CircleCI orb version if it's not used by the
repo's config.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-31 09:05:59 +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
Ben Kochie a2bbe3e3bf
Update sync script
Add some more color to the sync script
* Make color vars for easy use.
* Add green to existing PR message.
* Add red to failure message.

Update repo finder
* Don't included archived or fork repos.
* Use orgs API endpoint.
* Only sync public repos.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-25 12:41:27 +01:00
Ben Kochie 2d9f3e34dd
Improve sync_repo_files.sh
* Add github_api function to make curl use consistent.
* Fix up some shellcheck warnings.
* Add some more output debugging to detect failed pushes.
* Fix git push auth string.
* Fix open PR pre-check.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-16 09:48:23 +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 0e24f246cc
Merge pull request #8540 from roidelapluie/fix-sync-repo
sync_repo_files: Normalize usage of git_user
2021-02-25 11:21:45 +01:00
Julien Pivotto c0173072e2 sync_repo_files: Normalize usage of git_user
Fix ./scripts/sync_repo_files.sh: line 141: GITHUB_USER: unbound variable

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-24 21:10:21 +01:00
Julien Pivotto f9e2748f6f Fix default branch detection
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-23 23:23:51 +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
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