Commit graph

143 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
Julien Pivotto 894354a03c
Merge pull request #6018 from simonpasquier/delete-remote-makefile-common-branch
scripts/sync_makefiles.sh: delete merged branch
2021-02-01 21:46:16 +01:00
Ben Kochie 2fd1243b0e
Enforce SECURITY.md updates
Add SECURITY.md to the enforced repo sync updates.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-01-16 20:07:55 +01:00
Julien Pivotto fd022965c0
Add SECURITY.md file (#8292)
* Add SECURITY.md file

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-01-09 09:58:53 +01:00
Julien Pivotto e208afcc95
web: Remove APIv2 (#7935)
* web: Remove APIv2

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-09-15 09:30:55 +02:00
Simon Pasquier ab5ea8d5e1 scripts/sync_makefiles.sh: delete merged branch
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-08-25 15:57:48 +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 9932ff648a
Update repo sync policies
* Don't try and sync non-apache license files.
* Force create CODE_OF_CONDUCT.md.
* Switch to using an array of files to update.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-06-22 12:37:07 +02:00
Julien Pivotto 89fd3ebdfe repo_sync: fix variable names
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-21 02:18:21 +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
Ben Kochie 84342fb184
Refactor makefile script
* Fix shellcheck issues
* Fix some shell style inconsistencies.
* Split out some functions.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-04-11 13:56:51 +02:00
Julien Pivotto b3cf6ef332
synchronize makefile.common for community (#7108)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-04-10 15:34:34 +02:00
Julien Pivotto ef63d8d16d Update vendors
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-25 10:33:41 +01:00
Julius Volz e8027ba515
React UI: Serve React UI under /new (#6229)
This makes React UI URLs look nicer than the previous
/static/graph-new/app.html, but internally still serves all React UI
files from the compiled-in static assets directory.

Also, to allow future usage of the React / Reach router, we need to
serve the main React app's index.html on certain sub-paths that
correspond to current Prometheus's UI pages, instead of trying to serve
actual files that match the provided path name.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-10-28 10:45:53 +01:00
Julius Volz bca6e90ea6
Integrate beginning of React UI (#5694)
* Initial commit from Create React App

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

* Initial Prometheus expression browser code

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

* Grpahing, try out echarts

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

* Switch to flot

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

* Add metrics fetching and stuff

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

* Autosuggest and graph improvements

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

* Start implementing graph controls, add loading spinner

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

* So many new features and fixes

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

* Fixed and built more features

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

* Make datetimepicker clear work

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

* Don't abort when executing empty expression

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

* Remove TabPaneAlert

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

* Split components into separate files

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

* Add table time input

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

* Move first files to TypeScript!

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

* More TypeScript conversions

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

* More TS conversions

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

* More TS conversions

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

* More TS conversions

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

* More TS conversions

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

* More TS fixes

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

* Convert Graph to TS

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

* Changes

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

* Resize detector, start building legend, axis font colors

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

* Make graph legend work

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

* Add URL params support and much more

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

* Put panel state into panel list, write URL options

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

* Change order of Graph and Table tabs

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

* Generalize time input naming more

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

* Work on history functionality

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

* npm updates

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

* Move loading indicator into "Execute" button

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

* Fix typo

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

* Revert "Move loading indicator into "Execute" button"

This reverts commit ce7daee1f1af35da6c0d8b5517272839285ccfec.

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

* Improve error message when failing to fetch server time

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

* Move all code to Prometheus repo target dir

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

* Add react-app Makefile step and check in generated assets

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

* Add preliminary npm packages notice to NOTICE file

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

* Update React app's favicon and metadata

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

* Remove RP server refs, cleanups

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

* Use CircleCI image that includes NodeJS

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

* Add some missing React output assets

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

* Preserve CRLF in generated React files

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

* Switch from npm to yarn for React UI

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

* Save npm licenses and include them in release tarball

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

* Install npm on Travis

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

* Remove npm license tarball from source

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

* Remove React graph bundle from source

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

* Don't check in any compiled web assets

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

* Update README.md with node/yarn/React UI info

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

* Fix asset build step on CircleCI promu crossbuild

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

* Try to fix multi-arch go generate

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

* Remove check_assets from Travis CI build

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

* Prevent rebuilding of unchanged React app parts

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

* Fix npm license tarball path for promu

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

* Simplify Makefile

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

* Clarify build instructions in README.md

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

* Make minimal JS test pass

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

* Integrate React app tests into Makefile

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

* Separate react-app-tests target, but run it from CI

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

* Fix working directory for React app tests

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

* Remove local modifications to Makefile.common

This means that CircleCI will not run the React app tests, but at least
Travis still will...

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

* Depend on node_modules path for npm_licenses target

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

* Simplify tarball/docker/build Makefile targets

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

* Include React tests in "test" target

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

* Remove reference to removed "check_assets" target

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

* Do initial resize of expression input field

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

* Add React app proxying to local Prometheus in dev mode

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-10-17 14:38:09 +02:00
Simon Pasquier 45506841e6
*: enable all default linters (#5504)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-05-03 15:11:28 +02:00
Simon Pasquier 7efb8e9480
scripts/sync_makefiles.sh: redirect git-push to /dev/null (#5478)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-18 12:01:49 +02:00
Simon Pasquier 0607462008
scripts/sync_makefiles.sh: mask token in logs (#5465)
Circle CI doesn't mask automatically secret environment variables in
logs.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-17 14:41:06 +02:00
Paweł Krupa 4d7417f5d4 *: add CI job to synchronize Makefile.common across all repos (#5444)
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2019-04-11 14:31:04 +02:00
Simon Pasquier 81c4248081
*: bump gRPC and protobuf dependencies (#5367)
The goal is to remove almost all references to the
golang.org/x/net/context package.

github.com/gogo/protobuf => v1.2.1
google.golang.org/grpc => v1.19.1
github.com/grpc-ecosystem/grpc-gateway => v1.18.5

It also replaces github.com/cockroachdb/cmux by github.com/soheilhy/cmux
because of [1] which fixes #3909 incidentally.

[1] https://github.com/grpc/grpc-go/issues/2636

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-04 11:55:32 +02:00
Simon Pasquier 375ad1185c
*: bump gRPC dependencies (#5075)
* *: bump gRPC dependencies

This change updates the gRPC dependencies to more recent versions:

* github.com/gogo/protobuf => v1.2.0
* github.com/grpc-ecosystem/grpc-gateway => v1.6.3
* google.golang.org/grpc => v1.17.0

In addition scripts/genproto.sh leverages Go modules information instead of
hardcoding SHA1 commits. This ensures that the code is generated from
the exact same sources.

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

* Run 'make proto' in CI

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

* Revert tabs -> spaces change

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

* Fix 'make proto' step

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

* 'go get' grpc/protobuf dependencies

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

* Prepopulate cache with go mod download

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-15 15:32:05 +01:00
Bartek Plotka c3434a39b7 proto: Allow reproducible proto generation.
Current way of setting prometheus project to generate repo is tedious.
If you just go install packages described in README.md
it ends up with those (non buildable code)
```
../../../prompb/remote.pb.go:61:34: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
../../../prompb/remote.pb.go:109:33: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
../../../prompb/remote.pb.go:164:34: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
../../../prompb/remote.pb.go:214:27: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
../../../prompb/remote.pb.go:284:33: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
```
The issue is that the guide presented in proto folder is asking to
install some GO packages. It does not mention from what version and
there is strong mismatch between those used to generate proto and those
that are vendored and used to run the code later...
The particular outdated packages in vendor are:
`github.com/gogo/protobuf` and `google.golang.org/grpc`.

Just updating vendor would be not enough, as it would only tmp fix.
I propose adding script that will parse version from vendor.json and install correct version.

Changes:
- Added script that uses packages in *exactly* the same version the Go code is build against later.
- Regenerated proto with those pinned deps.
- Updated REAMDE.md
- Added `make proto`Current way of setting prometheus project to generate code from proto files is tedious.
If you just go install packages described in README.md, it ends up with this (non buildable code)
```
../../../prompb/remote.pb.go:61:34: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
../../../prompb/remote.pb.go:109:33: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
../../../prompb/remote.pb.go:164:34: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
../../../prompb/remote.pb.go:214:27: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
../../../prompb/remote.pb.go:284:33: undefined: "github.com/prometheus/prometheus/vendor/github.com/gogo/protobuf/proto".InternalMessageInfo
```
The issue is that the guide presented in proto folder is asking to install some GO packages. It does not mention from what version and there is strong mismatch between those used to generate proto and those that are vendored and used to run the code later...
The particular outdated packages in vendor are:
`github.com/gogo/protobuf` and `google.golang.org/grpc`.

Just updating vendor would be not enough, as it would only tmp fix.
I propose adding script that will parse version from vendor.json and install correct version.

Changes:
- Added script that uses packages in *exactly* the same version the Go code is build against later.
- Regenerated proto with those pinned deps.
- Updated REAMDE.md
- Added `make proto`

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
2018-10-05 10:22:02 +01:00
Krasi Georgiev 3f2b2c50dd
use the Makefile.common (#3978)
split common targets in a  Makefile.common to reuse it across projects

Signed-off-by: Krasi Georgiev <krasi.root@gmail.com>
2018-04-19 12:07:10 +03:00
Krasi Georgiev 99e717ad18 revert ot using the gogofast plugin and regenerate grpc server 2018-03-01 11:57:31 +02:00
Ben Kochie e392b9a18b Cleanup licence check script (#3893)
* Cleanup licence check script

* `echo -e` is not supported by POSIX shell.
* Add a license to the check script.
* Split out license check loop into function for clarity.

* Exit 1
2018-02-27 10:06:38 +00:00
Krasi Georgiev a1229465b2 genproto.sh - update protoc to 3.5, gogofast is now gofast 2018-02-17 12:33:56 +02:00
Goutham Veeramachaneni 3de10e3b44
Add CleanTombstones API endpoint
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-11-30 19:51:44 +05:30
Krasi Georgiev 5d8f93a22a now using only github.com/gogo/protobuf
bumped all grpc-gateway packages to v1.2.2
updated and run  the denproto.sh script
2017-11-02 11:31:57 +00:00
Fabian Reinartz ccf9e62972 *: add admin grpc API 2017-07-10 09:14:14 +02:00
Steve Durrheimer 8688cf2579
New release process using docker, circleci and a centralized
building tool
2016-04-18 22:41:04 +02:00
Jonathan Boulle 1c8262be12 Add script to check for missing license headers
Also adds a `check_license` target to the Makefile to run the script
2016-04-13 16:08:14 +02:00
Fabian Reinartz 9f5ae819e2 Use runtime.Version() 2016-04-05 22:38:49 +02:00
beorn7 6ba379e256 Use UTC for build timestamp 2016-03-08 17:47:17 +01:00
Nick Owens 53777e7bc4 scripts: drop -f from hostname, openbsd does not support it 2016-03-04 19:59:28 -08:00
Björn Rabenstein d9eb624322 Merge pull request #1415 from prometheus/release-0.17
Forward-merge release-0.17 into master
2016-02-22 16:39:48 +01:00
Christian Svensson 69ebf45649 Allow custom ldflags for go build
This allows users to use CGO and external linker when building Prometheus.
2016-02-20 17:34:36 +01:00
Fabian Reinartz b040827945 Add changelog for 0.17.0 2016-01-27 17:03:44 +01:00
Julius Volz 999b1d23e0 Add tarballs target to build release tarballs. 2016-01-27 17:03:44 +01:00
rih d1c3f5de25 scripts/goenv.sh: Require Go 1.5.3 2016-01-20 13:25:03 +01:00
Fabian Reinartz dbb66d79ab Fix missing go version in build tags 2015-09-18 10:38:26 +02:00
Fabian Reinartz c8a092ebcc Add goenv script and fix Docker 2015-09-18 10:28:15 +02:00
Fabian Reinartz 5127963e93 Replace Makefile with simpler setup 2015-09-17 17:26:36 +02:00
Sindre Myren a081c9436b Building without a Makefile (on Windows)
Main changes:

- Switched to using `go-bindata` in place of `scripts/embed-static.sh`.
- Support for building Prometheus without a `Makefile`.
- Minor typo fix to make Prometheus build on Windows (without Makefiles).

Please note that this does not mean that prometheus will work on Windows.
There are still failing tests!
2015-06-10 20:43:59 +02:00
Fabian Reinartz 027d8968d5 Move embed-static.sh into scripts folder 2015-06-01 21:12:32 +02:00