Commit Graph

561 Commits

Author SHA1 Message Date
Arve Knudsen
d4e4cb4c71
Chore: Enable Go linter gocritic (#26224)
* Chore: Enable gocritic linter

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-16 14:39:01 +02:00
Arve Knudsen
35f7f7b50a
Drone: Rename publish-storybook to build-storybook (#26360)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-16 09:25:07 +02:00
Arve Knudsen
9360d96f13
Drone: Tighten grafana-enterprise access to token (#26321)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-14 13:31:26 +02:00
Arve Knudsen
c5bdea5cec
Chore: Upgrade build pipeline tool; refactor Drone config (#26292)
* Upgrade grabpl; refactor Drone config
2020-07-13 16:43:56 +02:00
Arve Knudsen
d28d495235
Chore: Enable PR testing in Drone (#26189)
* Add Drone configuration

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build front-end before testing it

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade grafana/build-container

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add packaging step

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Trigger on push

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove some steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Enable steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Install Dockerize

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use node image for test-frontend

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Increase number of test workers

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Make plugin installation depend on frontend tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Make integration tests depend on frontend tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grafana/build-container also for front-end tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade dependencies in order to fix front-end tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Depend on es-check

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Dont' depend on tests before building front-end

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix packaging

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Simplify

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Try to build images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Install netcat

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Include golangci-lint with grafana/build-container

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build storybook and docs website

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use build image with root user

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drop CircleCI dependencies

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e under Drone

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Execute e2e server separately

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use own plugin for building Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use Starlark to configure Drone

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add enterprise steps to pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more enterprise steps to pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Maintain Yarn cache

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build enterprise Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build Ubuntu Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add Postgres integration test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add MySQL integration test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Parameterize integration test DB connections

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Categorize integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grabpl integration-tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unintended change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Disable Ubuntu Docker images for PR pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Regenerate yarn.lock

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade grabpl

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Restore Yarn cache before installing in grafana-enterprise

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use separate pipelines for OSS and enterprise

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Let OSS builds depend on tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Restore Go cache before building back-end

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Reduce number of variants built for PRs

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix building of Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Simplify logic

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Use Starlark

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Fix syntax error

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Convert .drone.star to YAML

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade AWS Go SDK

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Fix Go linting

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo irrelevant changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Revert "Undo irrelevant changes"

This reverts commit 5152f65972.

* Undo irrelevant changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* e2e: Support Circle

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* TypeScript fixes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* TypeScript fixes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* More Drone support

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix build on Circle

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove TODO comment

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-10 16:09:21 +02:00
Torkel Ödegaard
fd44c01675
Chore: Fix typescript strict null fixes now at 298 (#26125)
* Chore: Fix typescript strict null errors

* Added new limit

* Fixed ts issue

* fixed tests

* trying to fix type inference

* Fixing more ts errors

* Revert tsconfig option

* Fix

* Fixed code

* More fixes

* fix tests

* Updated snapshot

* Chore: More ts strict null fixes

* More fixes in some really messed up azure config components

* More fixes, current count: 441

* 419

* More fixes

* Fixed invalid initial state in explore

* Fixing tests

* Fixed tests

* Explore fix

* More fixes

* Progress

* Sub 300

* Fixed incorrect type

* removed unused import
2020-07-08 11:05:20 +02:00
Arve Knudsen
586d26c729
Chore: Replace scopelint with exportloopref (#26075)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-07 10:01:39 +02:00
Torkel Ödegaard
7e8bd0c1b7
Chore: Fix typescript strict null errors from 674 -> 565 (#26057)
* Chore: Fix typescript strict null errors

* Added new limit

* Fixed ts issue

* fixed tests

* trying to fix type inference

* Fixing more ts errors

* Revert tsconfig option

* Fix

* Fixed code

* More fixes

* fix tests

* Updated snapshot
2020-07-06 21:16:27 +02:00
Arve Knudsen
41d432b5ae
Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Arve Knudsen
5321360021
Chore: Upgrade golangci-lint (#26074)
* Chore: Upgrade golangci-lint
2020-07-06 09:43:26 +02:00
Ryan McKinley
bbd24cd93a
Monaco: add suggestions for template variables (#25921)
* now with suggestions

* using suggestions API

* using variable suggestions

* using variable suggestions

* show variables

* minor cleanup

* add @alpha warning

* Do not produce data variables if panel does not support queries

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-07-01 09:36:34 +02:00
Arve Knudsen
3651a8e976
Chore: Disable scopelint for tests (#25923)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-30 11:05:47 +02:00
Ryan McKinley
1a711e7df0
Panel Inspect: use monaco for json display (#25251) 2020-06-29 10:58:47 -07:00
Arve Knudsen
d1e6214a4a
Chore: Enable scopelint Go linter (#25896)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 17:04:38 +02:00
Arve Knudsen
5070f7a75b
Chore: Start harmonizing linting with plugin SDK (#25854)
* Chore: Harmonize linting with plugin SDK

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 14:08:32 +02:00
Arve Knudsen
084542a006
Chore: Consolidate on golangci-lint (#25834)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-26 08:46:08 +02:00
Kyle Brandt
bc9c53389c
Azure: Split insights into two services (#25410)
Azure Application Insights Analytics is no longer accessed by the edit button from within the Application Insights service. Instead, there is now an Insights Analytics option in the Service drop down.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-06-25 12:48:18 -04:00
Zoltán Bedi
c16890c22d
Chore: use fork-ts-checker plugin for eslint check (#25631)
* Use fork-ts-checker for eslint check

* Fix lint issue

* Add packages to lint

* Add comments to webpack configs
2020-06-22 16:15:29 +02:00
Ryan McKinley
d1b230f84a
Chore: upgrade to Typescript 3.9.3 (#25154)
* upgrade to typescript 3.9.3

* Fix errors that surfaced with update

* Null check fixs

* FIx null checks

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-06-17 12:26:01 +02:00
Lukas Siatka
7b7000c5bc
Explore: updates ExploreItemState type, reduces strict null errors count to 702 (#25250)
* Chore: changes null values to undefined in explore reducer

* Chore: changes sortLogsResult param type from null to undefined

* Chore: changes null values to undefined in explore reducer

* Chore: updates strict null errors count

* Revert "Chore: changes null values to undefined in explore reducer"

This reverts commit b82d841611.

* Revert "Chore: changes sortLogsResult param type from null to undefined"

This reverts commit 21073b5d30.

* Revert "Chore: changes null values to undefined in explore reducer"

This reverts commit 798559688c.

* Chore: updates ExploreItemState type

* Chore: updates initial ExploreItemState in Explore reducer

* Chore: updates strict null errors count to 699

* Chore: changed ExploreMode and Emitter type in ExploreStateItem

* Revert "Chore: changed ExploreMode and Emitter type in ExploreStateItem"

This reverts commit 7e0e2027fc.
2020-06-17 10:08:19 +02:00
Arve Knudsen
048f6f5301
CircleCI: Upgrade Grafana build image (#25624)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-17 09:53:39 +02:00
Marcus Andersson
a5b38b799a
Build: scripts to build and measure packages reference docs (#24876)
* added script to check docs metrics.

* added information link on how to add code comments.

* added script for build and measure code comment metrics.

* fixed issues according to shellcheck.

* Added so we build the metrics if report folder is missing.

* added some spacing and a devider.

* Added so we can send metrics to grafana.

* added shellcheck attribute.

* Fixed spelling according to feedback.

* see if shellcheck passes.

* fixed issue with shellcheck.

* Explore/Logs: Fix tooltip display for log graph (#25544)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2020-06-16 09:33:23 +02:00
Arve Knudsen
3e81a626a4
ci-build: Upgrade Dockerfile to latest Debian Stretch (#25590)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-16 09:31:41 +02:00
Marcus Andersson
fb7d036fa4
Typescript: Fixed strict null errors. (#25609) 2020-06-16 07:34:27 +02:00
Arve Knudsen
7a27dfdffa
Include golangci-lint with grafana/build-container (#25587)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-15 09:44:53 +02:00
Arve Knudsen
1d9f47b6a6
release_publisher: Fix Debian/RPM naming (#25276)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-02 11:01:40 +02:00
Arve Knudsen
01ecbae2ee
CircleCI: Upgrade to Go 1.14.3 and Node 12.17.0 (#25215)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-01 11:21:57 +02:00
Arve Knudsen
b703f21622
CircleCI: Upgrade grafana/build-container in order to fix arm32v7-musl (#25213)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-05-29 16:17:00 +02:00
Arve Knudsen
f0eb124278
CircleCI: Upgrade build image (#25189)
* CircleCI: Upgrade build image
* CircleCI: Upgrade grabpl

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-05-29 11:39:30 +02:00
Arve Knudsen
170abf2e3d
Build container: Base build image on Debian Stretch (#24967)
* scripts/build/ci-build: Fix Makefile
* scripts/build/ci-build: Base Docker image on Debian Stretch
* scripts/build/ci-build: Modify Dockerfile for fewer RUN directives
2020-05-26 15:45:49 +02:00
Josh Soref
4db782fd5b
ci-build: spelling (#24386) 2020-05-18 16:41:06 +03:00
Andrej Ocenas
a50cb6aa1f
Loki: Allow multiple derived fields with the same name (#24437) 2020-05-12 17:20:00 +02:00
Dominik Prokop
2f5003ebf1
Packages: Fix cross dependencies version for canary releases (#24489) 2020-05-11 08:20:13 +02:00
Lukas Siatka
2c9eed360d
Chore: fixes few strict-null errors (#23775)
* Chore: fixes strict-null-error in Login > ChangePassword component

* Chore: fixes strict-null-error in Login > LoginForm component

* Chore: fixes strict-null-errors in OrgActionBar component and components that render it

* Chore: fixes strict-null-errors in PageHeader component

* Chore: fixes strict-null-errors in PermissionList components

* Chore: fixes strict-null-errors in loki language provider

* Chore: fixes strict-null-errors in loki datasource

* Chore: fixes strict-null-errors in panel_editor > EditorTabBody component

* Chore: fixes strict-null-errors in flatten utility

* Chore: fixes strict-null-errors in search component

* Chore: fixes strict-null-errors in SharedPreferences component

* Chore: fixes strict-null-errors in MetricSelect component

* Chore: updates type on a param to type on argument

* Chore: updates strict-null errors count from 791 to 757

* Chore: updates PageHeader - adds null checks

* Chore: updates PageHeader - updates null checks

* Chore: updates PageHeader null checks to longer format

* Chore: updates strict-null fixes

* Chore: updates error count limit in ci-frontend-metrics
2020-05-07 13:53:05 +02:00
Torkel Ödegaard
92a16d2e10
Transforms: Adds beta notice and updates transform descriptions (#24158)
* Transforms: Adds beta notice and updates transform descriptions

* Rename organize fields

* Webpack - enable images import

* Introduce FeatureState type

* Alow Container component grow/shrink config

* Enable svg import in main app

* Jest + webpack for svgs

* InfoBox refactor (+ added feature info box), Badge component introduced

* Update packages/grafana-ui/src/components/TransformersUI/FilterByNameTransformerEditor.tsx

Co-authored-by: Carl Bergquist <carl@grafana.com>

* Minor fixes

* Update packages/grafana-ui/src/components/TransformersUI/OrganizeFieldsTransformerEditor.tsx

Co-authored-by: Carl Bergquist <carl@grafana.com>

* Update packages/grafana-ui/src/components/TransformersUI/SeriesToFieldsTransformerEditor.tsx

Co-authored-by: Carl Bergquist <carl@grafana.com>

* fix typo

* Build storybook fixed

* Fix padding

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Carl Bergquist <carl@grafana.com>
2020-05-04 15:05:31 +02:00
Arve Knudsen
22840241ed
scripts/tag_release.sh: Push only tag, not branch (#24055)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-30 17:24:21 +02:00
Arve Knudsen
8d8d9aac64
CircleCI: Bump grafana/build-container revision (#24043)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-29 14:47:31 +02:00
Arve Knudsen
33ba9bb21b
verify-repo-update: Fix Dockerfile.deb (#24030)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-29 10:14:35 +02:00
Arve Knudsen
2a57e1108c
Chore: Put what's new and release notes URLs in package.json (#24006)
* Put what's new and release notes URLs in package.json
* Upgrade build pipeline tool
2020-04-28 21:26:36 +02:00
Torkel Ödegaard
2c0a1d8428
Search: Adds search to main nav and removes open search click on dashboard name (#23943)
* Search: Adds search to main nav and removes open search click on dashboard name

* Updated snapshots

* Fixed strict null errors

* Fixed type issue
2020-04-27 16:38:04 +02:00
Sofia Papagiannaki
bace47d40e
Fix build-container (#23942) 2020-04-27 15:12:11 +03:00
Hugo Häggmark
b09b49fb37
e2e: creates a separate package for selectors (#23858)
* Initial commit

* Chore: fixes after merge

* Chore: removes todos

* Chore: uncomment test

* Chore: adds missing externals to rollup config

* Refactor: selectors is master for everything

* Docs: updates Docs

* Chore: adds e2e-selectors to publish
2020-04-27 09:09:05 +02:00
Andrej Ocenas
58b566a252
Tracing: Zipkin datasource (#23829) 2020-04-24 17:02:25 +02:00
Arve Knudsen
51c19da98d
Docker: Upgrade to Ubuntu 20.04 in Dockerfiles (#23852)
* Chore: Upgrade to Ubuntu 20.04
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-04-24 14:03:18 +02:00
Arve Knudsen
f4d40224f2
CircleCI: Upgrade shellcheck to v0.7.1 and pin version (#23815)
* CircleCI: Upgrade shellcheck to v0.7.1 and pin version

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-23 12:22:51 +02:00
Peter Holmberg
e16213724c
DevEnv: Revert to clean stale assets (#23742) 2020-04-22 07:49:04 +02:00
Marcus Efraimsson
871ad73414
Backend plugins: Renderer v2 plugin (#23625)
grafana-plugin-model is legacy and is replaced by new backend 
plugins SDK and architecture. Renderer is not part of SDK and 
we want to keep it that way for now since it's highly unlikely there 
will be more than one kind of renderer plugin.
So this PR adds support for renderer plugin v2.
Also adds support sending a Device Scale Factor parameter to the 
plugin v2 remote rendering service and by that replaces #22474.
Adds support sending a Headers parameter to the plugin v2 and
remote rendering service which for now only include 
Accect-Language header (the user locale in browser when using 
Grafana), ref grafana/grafana-image-renderer#45.
Fixes health check json details response.
Adds image renderer plugin configuration settings in defaults.ini 
and sample.ini.

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-21 16:16:41 +02:00
Andrej Ocenas
e5dd7efdee
Provisioning: Allows specifying uid for datasource and use that in derived fields (#23585)
* Add uid to datasource

* Fix uid passing when provisioning

* Better error handling and Uid column type change

* Fix test and strict null error counts

* Add backend tests

* Add tests

* Fix strict null checks

* Update test

* Improve tests

* Update pkg/services/sqlstore/datasource.go

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>

* Variable rename

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-20 15:48:38 +02:00
Carl Bergquist
9652a1410b
Build: Stricter linting should break the build (#23606) 2020-04-16 16:09:27 +02:00
Marcus Efraimsson
6e313e7d37
Image Rendering: Remove PhantomJS support (#23460)
Removes all references and usage of PhantomJS #23375.
Remove direct link rendered image e2e smoke test for now.
Docker: Fix installing chrome in ubuntu custom docker image.
Improve handling of image renderer not available/installed #23593.
Add PhantomJS breaking change and upgrading notes.
Use grabpl v0.2.10.

Closes #13802

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-04-15 22:17:41 +02:00