Skip to content

Commit 6220dec

Browse files
committed
Merge remote-tracking branch 'upstream/master' into postgres-query-builder
2 parents 17b4680 + f5cf926 commit 6220dec

File tree

161 files changed

+9571
-2105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+9571
-2105
lines changed

.circleci/config.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,45 @@ aliases:
1212
version: 2
1313

1414
jobs:
15+
mysql-integration-test:
16+
docker:
17+
- image: circleci/golang:1.10
18+
- image: circleci/mysql:5.6-ram
19+
environment:
20+
MYSQL_ROOT_PASSWORD: rootpass
21+
MYSQL_DATABASE: grafana_tests
22+
MYSQL_USER: grafana
23+
MYSQL_PASSWORD: password
24+
working_directory: /go/src/github.com/grafana/grafana
25+
steps:
26+
- checkout
27+
- run: sudo apt update
28+
- run: sudo apt install -y mysql-client
29+
- run: dockerize -wait tcp://127.0.0.1:3306 -timeout 120s
30+
- run: cat docker/blocks/mysql_tests/setup.sql | mysql -h 127.0.0.1 -P 3306 -u root -prootpass
31+
- run:
32+
name: mysql integration tests
33+
command: 'GRAFANA_TEST_DB=mysql go test ./pkg/services/sqlstore/... ./pkg/tsdb/mysql/... '
34+
35+
postgres-integration-test:
36+
docker:
37+
- image: circleci/golang:1.10
38+
- image: circleci/postgres:9.3-ram
39+
environment:
40+
POSTGRES_USER: grafanatest
41+
POSTGRES_PASSWORD: grafanatest
42+
POSTGRES_DB: grafanatest
43+
working_directory: /go/src/github.com/grafana/grafana
44+
steps:
45+
- checkout
46+
- run: sudo apt update
47+
- run: sudo apt install -y postgresql-client
48+
- run: dockerize -wait tcp://127.0.0.1:5432 -timeout 120s
49+
- run: 'PGPASSWORD=grafanatest psql -p 5432 -h 127.0.0.1 -U grafanatest -d grafanatest -f docker/blocks/postgres_tests/setup.sql'
50+
- run:
51+
name: postgres integration tests
52+
command: 'GRAFANA_TEST_DB=postgres go test ./pkg/services/sqlstore/... ./pkg/tsdb/postgres/...'
53+
1554
codespell:
1655
docker:
1756
- image: circleci/python
@@ -188,13 +227,19 @@ workflows:
188227
filters: *filter-not-release
189228
- test-backend:
190229
filters: *filter-not-release
230+
- mysql-integration-test:
231+
filters: *filter-not-release
232+
- postgres-integration-test:
233+
filters: *filter-not-release
191234
- deploy-master:
192235
requires:
193236
- build-all
194237
- test-backend
195238
- test-frontend
196239
- codespell
197240
- gometalinter
241+
- mysql-integration-test
242+
- postgres-integration-test
198243
filters:
199244
branches:
200245
only: master
@@ -210,11 +255,17 @@ workflows:
210255
filters: *filter-only-release
211256
- test-backend:
212257
filters: *filter-only-release
258+
- mysql-integration-test:
259+
filters: *filter-only-release
260+
- postgres-integration-test:
261+
filters: *filter-only-release
213262
- deploy-release:
214263
requires:
215264
- build-all
216265
- test-backend
217266
- test-frontend
218267
- codespell
219268
- gometalinter
269+
- mysql-integration-test
270+
- postgres-integration-test
220271
filters: *filter-only-release

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ debug.test
6666
/vendor/**/.editorconfig
6767
/vendor/**/appengine*
6868
*.orig
69+
70+
/devenv/dashboards/bulk-testing/*.json

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
11
# 5.2.0 (unreleased)
22

3+
### New Features
4+
5+
* **Elasticsearch**: Alerting support [#5893](https://github.com/grafana/grafana/issues/5893), thx [@WPH95](https://github.com/WPH95)
6+
* **Alert list panel**: Updated to support filtering alerts by name, dashboard title, folder, tags [#11500](https://github.com/grafana/grafana/issues/11500), [#8168](https://github.com/grafana/grafana/issues/8168), [#6541](https://github.com/grafana/grafana/issues/6541)
7+
38
### Minor
49

10+
* **Dashboard**: Modified time range and variables are now not saved by default [#10748](https://github.com/grafana/grafana/issues/10748), [#8805](https://github.com/grafana/grafana/issues/8805)
511
* **Graph**: Show invisible highest value bucket in histogram [#11498](https://github.com/grafana/grafana/issues/11498)
612
* **Dashboard**: Enable "Save As..." if user has edit permission [#11625](https://github.com/grafana/grafana/issues/11625)
13+
* **Prometheus**: Query dates are now step-aligned [#10434](https://github.com/grafana/grafana/pull/10434)
714
* **Prometheus**: Table columns order now changes when rearrange queries [#11690](https://github.com/grafana/grafana/issues/11690), thx [@mtanda](https://github.com/mtanda)
815
* **Variables**: Fix variable interpolation when using multiple formatting types [#11800](https://github.com/grafana/grafana/issues/11800), thx [@svenklemm](https://github.com/svenklemm)
916
* **Dashboard**: Fix date selector styling for dark/light theme in time picker control [#11616](https://github.com/grafana/grafana/issues/11616)
1017
* **Discord**: Alert notification channel type for Discord, [#7964](https://github.com/grafana/grafana/issues/7964) thx [@jereksel](https://github.com/jereksel),
1118
* **InfluxDB**: Support SELECT queries in templating query, [#5013](https://github.com/grafana/grafana/issues/5013)
19+
* **InfluxDB**: Support count distinct aggregation [#11645](https://github.com/grafana/grafana/issues/11645), thx [@kichristensen](https://github.com/kichristensen)
1220
* **Dashboard**: JSON Model under dashboard settings can now be updated & changes saved, [#1429](https://github.com/grafana/grafana/issues/1429), thx [@jereksel](https://github.com/jereksel)
1321
* **Security**: Fix XSS vulnerabilities in dashboard links [#11813](https://github.com/grafana/grafana/pull/11813)
1422
* **Singlestat**: Fix "time of last point" shows local time when dashboard timezone set to UTC [#10338](https://github.com/grafana/grafana/issues/10338)
1523
* **Prometheus**: Add support for passing timeout parameter to Prometheus [#11788](https://github.com/grafana/grafana/pull/11788), thx [@mtanda](https://github.com/mtanda)
24+
* **Login**: Add optional option sign out url for generic oauth [#9847](https://github.com/grafana/grafana/issues/9847), thx [@roidelapluie](https://github.com/roidelapluie)
25+
* **Login**: Use proxy server from environment variable if available [#9703](https://github.com/grafana/grafana/issues/9703), thx [@iyeonok](https://github.com/iyeonok)
26+
* **Invite users**: Friendlier error message when smtp is not configured [#12087](https://github.com/grafana/grafana/issues/12087), thx [@thurt](https://github.com/thurt)
27+
* **Graphite**: Don't send distributed tracing headers when using direct/browser access mode [#11494](https://github.com/grafana/grafana/issues/11494)
28+
* **Sidenav**: Show create dashboard link for viewers if at least editor in one folder [#11858](https://github.com/grafana/grafana/issues/11858)
29+
* **SQL**: Second epochs are now correctly converted to ms. [#12085](https://github.com/grafana/grafana/pull/12085)
30+
* **Singlestat**: Fix singlestat threshold tooltip [#11971](https://github.com/grafana/grafana/issues/11971)
31+
* **Dashboard**: Hide grid controls in fullscreen/low-activity views [#11771](https://github.com/grafana/grafana/issues/11771)
32+
* **Dashboard**: Validate uid when importing dashboards [#11515](https://github.com/grafana/grafana/issues/11515)
1633

1734
# 5.1.3 (2018-05-16)
1835

Gopkg.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ ignored = [
8585

8686
[[constraint]]
8787
name = "github.com/go-xorm/core"
88-
version = "0.5.7"
88+
version = "=0.5.7"
8989

9090
[[constraint]]
9191
name = "github.com/go-xorm/xorm"
92-
version = "0.6.4"
92+
version = "=0.6.4"
9393

9494
[[constraint]]
9595
name = "github.com/gorilla/websocket"

build.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ func makeLatestDistCopies() {
156156
}
157157

158158
latestMapping := map[string]string{
159-
"_amd64.deb": "dist/grafana_latest_amd64.deb",
160-
".x86_64.rpm": "dist/grafana-latest-1.x86_64.rpm",
159+
"_amd64.deb": "dist/grafana_latest_amd64.deb",
160+
".x86_64.rpm": "dist/grafana-latest-1.x86_64.rpm",
161161
".linux-amd64.tar.gz": "dist/grafana-latest.linux-x64.tar.gz",
162162
}
163163

@@ -232,7 +232,7 @@ func createDebPackages() {
232232
previousPkgArch := pkgArch
233233
if pkgArch == "armv7" {
234234
pkgArch = "armhf"
235-
}
235+
}
236236
createPackage(linuxPackageOptions{
237237
packageType: "deb",
238238
homeDir: "/usr/share/grafana",
@@ -256,8 +256,10 @@ func createDebPackages() {
256256
func createRpmPackages() {
257257
previousPkgArch := pkgArch
258258
switch {
259-
case pkgArch == "armv7" : pkgArch = "armhfp"
260-
case pkgArch == "arm64" : pkgArch = "aarch64"
259+
case pkgArch == "armv7":
260+
pkgArch = "armhfp"
261+
case pkgArch == "arm64":
262+
pkgArch = "aarch64"
261263
}
262264
createPackage(linuxPackageOptions{
263265
packageType: "rpm",
@@ -416,6 +418,10 @@ func test(pkg string) {
416418

417419
func build(binaryName, pkg string, tags []string) {
418420
binary := fmt.Sprintf("./bin/%s-%s/%s", goos, goarch, binaryName)
421+
if isDev {
422+
//dont include os and arch in output path in dev environment
423+
binary = fmt.Sprintf("./bin/%s", binaryName)
424+
}
419425

420426
if goos == "windows" {
421427
binary += ".exe"

conf/defaults.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ disable_login_form = false
237237
# Set to true to disable the signout link in the side menu. useful if you use auth.proxy
238238
disable_signout_menu = false
239239

240+
# URL to redirect the user to after sign out
241+
signout_redirect_url =
242+
240243
#################################### Anonymous Auth ######################
241244
[auth.anonymous]
242245
# enable anonymous access

conf/sample.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ log_queries =
217217
# Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false
218218
;disable_signout_menu = false
219219

220+
# URL to redirect the user to after sign out
221+
;signout_redirect_url =
222+
220223
#################################### Anonymous Auth ##########################
221224
[auth.anonymous]
222225
# enable anonymous access

devenv/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
This folder contains useful scripts and configuration for...
2+
3+
* Configuring datasources in Grafana
4+
* Provision example dashboards in Grafana
5+
* Run preconfiured datasources as docker containers
6+
7+
want to know more? run setup!
8+
9+
```bash
10+
./setup.sh
11+
```
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: 1
2+
3+
providers:
4+
- name: 'Bulk dashboards'
5+
folder: 'Bulk dashboards'
6+
type: file
7+
options:
8+
path: devenv/dashboards/bulk-testing
9+

0 commit comments

Comments
 (0)