Skip to content

Commit 5a4c362

Browse files
Merge remote-tracking branch 'upstream/master' into graph-legend-to-react
2 parents 91636ec + 6c473d3 commit 5a4c362

File tree

177 files changed

+3698
-859
lines changed

Some content is hidden

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

177 files changed

+3698
-859
lines changed

.circleci/config.yml

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,17 @@ jobs:
238238
steps:
239239
- checkout
240240
- run:
241-
name: build, test and package grafana enterprise
242-
command: './scripts/build/build_enterprise.sh'
241+
name: prepare build tools
242+
command: '/tmp/bootstrap.sh'
243+
- run:
244+
name: checkout enterprise
245+
command: './scripts/build/prepare_enterprise.sh'
246+
- run:
247+
name: test enterprise
248+
command: 'go test ./pkg/extensions/...'
249+
- run:
250+
name: build and package enterprise
251+
command: './scripts/build/build.sh -enterprise'
243252
- run:
244253
name: sign packages
245254
command: './scripts/build/sign_packages.sh'
@@ -254,6 +263,53 @@ jobs:
254263
paths:
255264
- enterprise-dist/grafana-enterprise*
256265

266+
build-all-enterprise:
267+
docker:
268+
- image: grafana/build-container:1.2.0
269+
working_directory: /go/src/github.com/grafana/grafana
270+
steps:
271+
- checkout
272+
- run:
273+
name: prepare build tools
274+
command: '/tmp/bootstrap.sh'
275+
- run:
276+
name: checkout enterprise
277+
command: './scripts/build/prepare_enterprise.sh'
278+
- restore_cache:
279+
key: phantomjs-binaries-{{ checksum "scripts/build/download-phantomjs.sh" }}
280+
- run:
281+
name: download phantomjs binaries
282+
command: './scripts/build/download-phantomjs.sh'
283+
- save_cache:
284+
key: phantomjs-binaries-{{ checksum "scripts/build/download-phantomjs.sh" }}
285+
paths:
286+
- /tmp/phantomjs
287+
- run:
288+
name: test enterprise
289+
command: 'go test ./pkg/extensions/...'
290+
- run:
291+
name: build and package grafana
292+
command: './scripts/build/build-all.sh -enterprise'
293+
- run:
294+
name: sign packages
295+
command: './scripts/build/sign_packages.sh'
296+
- run:
297+
name: verify signed packages
298+
command: |
299+
mkdir -p ~/.rpmdb/pubkeys
300+
curl -s https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana > ~/.rpmdb/pubkeys/grafana.key
301+
./scripts/build/verify_signed_packages.sh dist/*.rpm
302+
- run:
303+
name: sha-sum packages
304+
command: 'go run build.go sha-dist'
305+
- run:
306+
name: move enterprise packages into their own folder
307+
command: 'mv dist enterprise-dist'
308+
- persist_to_workspace:
309+
root: .
310+
paths:
311+
- enterprise-dist/grafana-enterprise*
312+
257313
deploy-enterprise-master:
258314
docker:
259315
- image: circleci/python:2.7-stretch
@@ -267,6 +323,19 @@ jobs:
267323
name: deploy to s3
268324
command: 'aws s3 sync ./enterprise-dist s3://$ENTERPRISE_BUCKET_NAME/master'
269325

326+
deploy-enterprise-release:
327+
docker:
328+
- image: circleci/python:2.7-stretch
329+
steps:
330+
- attach_workspace:
331+
at: .
332+
- run:
333+
name: install awscli
334+
command: 'sudo pip install awscli'
335+
- run:
336+
name: deploy to s3
337+
command: 'aws s3 sync ./enterprise-dist s3://$ENTERPRISE_BUCKET_NAME/release'
338+
270339
deploy-master:
271340
docker:
272341
- image: circleci/python:2.7-stretch
@@ -313,7 +382,7 @@ workflows:
313382
jobs:
314383
- build-all:
315384
filters: *filter-only-master
316-
- build-enterprise:
385+
- build-all-enterprise:
317386
filters: *filter-only-master
318387
- codespell:
319388
filters: *filter-only-master
@@ -356,13 +425,15 @@ workflows:
356425
- gometalinter
357426
- mysql-integration-test
358427
- postgres-integration-test
359-
- build-enterprise
428+
- build-all-enterprise
360429
filters: *filter-only-master
361430

362431
release:
363432
jobs:
364433
- build-all:
365434
filters: *filter-only-release
435+
- build-all-enterprise:
436+
filters: *filter-only-release
366437
- codespell:
367438
filters: *filter-only-release
368439
- gometalinter:
@@ -385,6 +456,17 @@ workflows:
385456
- mysql-integration-test
386457
- postgres-integration-test
387458
filters: *filter-only-release
459+
- deploy-enterprise-release:
460+
requires:
461+
- build-all
462+
- build-all-enterprise
463+
- test-backend
464+
- test-frontend
465+
- codespell
466+
- gometalinter
467+
- mysql-integration-test
468+
- postgres-integration-test
469+
filters: *filter-only-release
388470
- grafana-docker-release:
389471
requires:
390472
- build-all

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,37 @@
22

33
### New Features
44

5+
* **Alerting**: Option to disable OK alert notifications [#12330](https://github.com/grafana/grafana/issues/12330) & [#6696](https://github.com/grafana/grafana/issues/6696), thx [@davewat](https://github.com/davewat)
56
* **Postgres/MySQL/MSSQL**: Adds support for configuration of max open/idle connections and connection max lifetime. Also, panels with multiple SQL queries will now be executed concurrently [#11711](https://github.com/grafana/grafana/issues/11711), thx [@connection-reset](https://github.com/connection-reset)
7+
* **MSSQL**: Add encrypt setting to allow configuration of how data sent between client and server are encrypted [#13629](https://github.com/grafana/grafana/issues/13629), thx [@ramiro](https://github.com/ramiro)
8+
* **MySQL**: Support connecting thru Unix socket for MySQL datasource [#12342](https://github.com/grafana/grafana/issues/12342), thx [@Yukinoshita-Yukino](https://github.com/Yukinoshita-Yukino)
69

710
### Minor
811

9-
* **Datasource Proxy**: Keep trailing slash for datasource proxy requests [#13326](https://github.com/grafana/grafana/pull/13326), thx [@ryantxu](https://github.com/ryantxu)
12+
* **Cloudwatch**: Show all available CloudWatch regions [#12308](https://github.com/grafana/grafana/issues/12308), thx [@mtanda](https://github.com/mtanda)
1013
* **Units**: New clock time format, to format ms or second values as for example `01h:59m`, [#13635](https://github.com/grafana/grafana/issues/13635), thx [@franciscocpg](https://github.com/franciscocpg)
14+
* **Datasource Proxy**: Keep trailing slash for datasource proxy requests [#13326](https://github.com/grafana/grafana/pull/13326), thx [@ryantxu](https://github.com/ryantxu)
1115

1216
### Breaking changes
1317

1418
* Postgres/MySQL/MSSQL datasources now per default uses `max open connections` = `unlimited` (earlier 10), `max idle connections` = `2` (earlier 10) and `connection max lifetime` = `4` hours (earlier unlimited)
1519

16-
# 5.3.1 (unreleased)
20+
# 5.3.2 (unreleased)
21+
22+
* **InfluxDB/Graphite/Postgres**: Prevent cross site scripting (XSS) in query editor [#13667](https://github.com/grafana/grafana/issues/13667), thx [@svenklemm](https://github.com/svenklemm)
23+
* **Postgres**: Fix template variables error [#13692](https://github.com/grafana/grafana/issues/13692), thx [@svenklemm](https://github.com/svenklemm)
24+
* **Cloudwatch**: Fix service panic because of race conditions [#13674](https://github.com/grafana/grafana/issues/13674), thx [@mtanda](https://github.com/mtanda)
25+
* **Stackdriver/Cloudwatch**: Allow user to change unit in graph panel if cloudwatch/stackdriver datasource response doesn't include unit [#13718](https://github.com/grafana/grafana/issues/13718), thx [@mtanda](https://github.com/mtanda)
26+
* **LDAP**: Fix super admins can also be admins of orgs [#13710](https://github.com/grafana/grafana/issues/13710), thx [@adrien-f](https://github.com/adrien-f)
27+
28+
# 5.3.1 (2018-10-16)
1729

1830
* **Render**: Fix PhantomJS render of graph panel when legend displayed as table to the right [#13616](https://github.com/grafana/grafana/issues/13616)
1931
* **Stackdriver**: Filter option disappears after removing initial filter [#13607](https://github.com/grafana/grafana/issues/13607)
2032
* **Elasticsearch**: Fix no limit size in terms aggregation for alerting queries [#13172](https://github.com/grafana/grafana/issues/13172), thx [@Yukinoshita-Yukino](https://github.com/Yukinoshita-Yukino)
2133
* **InfluxDB**: Fix for annotation issue that caused text to be shown twice [#13553](https://github.com/grafana/grafana/issues/13553)
2234
* **Variables**: Fix nesting variables leads to exception and missing refresh [#13628](https://github.com/grafana/grafana/issues/13628)
23-
* **Variables**: Prometheus: Single letter labels are not supported [#13641](https://github.com/grafana/grafana/issues/13641)
35+
* **Variables**: Prometheus: Single letter labels are not supported [#13641](https://github.com/grafana/grafana/issues/13641), thx [@olshansky](https://github.com/olshansky)
2436
* **Graph**: Fix graph time formatting for Last 24h ranges [#13650](https://github.com/grafana/grafana/issues/13650)
2537
* **Playlist**: Fix cannot add dashboards with long names to playlist [#13464](https://github.com/grafana/grafana/issues/13464), thx [@neufeldtech](https://github.com/neufeldtech)
2638
* **HTTP API**: Fix /api/org/users so that query and limit querystrings works

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ the latest master builds [here](https://grafana.com/grafana/download)
2424

2525
### Dependencies
2626

27-
- Go 1.11
27+
- Go (Latest Stable)
2828
- NodeJS LTS
2929

3030
### Building the backend
@@ -69,15 +69,27 @@ bra run
6969

7070
Open grafana in your browser (default: `http://localhost:3000`) and login with admin user (default: `user/pass = admin/admin`).
7171

72-
### Building a docker image (on linux/amd64)
72+
### Building a Docker image
7373

74-
This builds a docker image from your local sources:
74+
There are two different ways to build a Grafana docker image. If you're machine is setup for Grafana development and you run linux/amd64 you can build just the image. Otherwise, there is the option to build Grafana completely within Docker.
75+
76+
Run the image you have built using: `docker run --rm -p 3000:3000 grafana/grafana:dev`
77+
78+
#### Building on linux/amd64 (fast)
7579

7680
1. Build the frontend `go run build.go build-frontend`
7781
2. Build the docker image `make build-docker-dev`
7882

7983
The resulting image will be tagged as `grafana/grafana:dev`
8084

85+
#### Building anywhere (slower)
86+
87+
Choose this option to build on platforms other than linux/amd64 and/or not have to setup the Grafana development environment.
88+
89+
1. `make build-docker-full` or `docker build -t grafana/grafana:dev .`
90+
91+
The resulting image will be tagged as `grafana/grafana:dev`
92+
8193
### Dev config
8294

8395
Create a custom.ini in the conf directory to override default configuration options.
@@ -113,18 +125,6 @@ GRAFANA_TEST_DB=mysql go test ./pkg/...
113125
GRAFANA_TEST_DB=postgres go test ./pkg/...
114126
```
115127

116-
## Building custom docker image
117-
118-
You can build a custom image using Docker, which doesn't require installing any dependencies besides docker itself.
119-
```bash
120-
git clone https://github.com/grafana/grafana
121-
cd grafana
122-
docker build -t grafana:dev .
123-
docker run -d --name=grafana -p 3000:3000 grafana:dev
124-
```
125-
126-
Open grafana in your browser (default: `http://localhost:3000`) and login with admin user (default: `user/pass = admin/admin`).
127-
128128
## Contribute
129129

130130
If you have any idea for an improvement or found a bug, do not hesitate to open an issue.

UPGRADING_DEPENDENCIES.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Guide to Upgrading Dependencies
2+
3+
Upgrading Go or Node.js requires making changes in many different files. See below for a list and explanation for each.
4+
5+
## Go
6+
7+
- CircleCi
8+
- `grafana/build-container`
9+
- Appveyor
10+
- Dockerfile
11+
12+
## Node.js
13+
14+
- CircleCI
15+
- `grafana/build-container`
16+
- Appveyor
17+
- Dockerfile
18+
19+
## Go Dependencies
20+
21+
Updated using `dep`.
22+
23+
- `Gopkg.toml`
24+
- `Gopkg.lock`
25+
26+
## Node.js Dependencies
27+
28+
Updated using `yarn`.
29+
30+
- `package.json`
31+
32+
## Where to make changes
33+
34+
### CircleCI
35+
36+
Our builds run on CircleCI through our build script.
37+
38+
#### Files
39+
40+
- `.circleci/config.yml`.
41+
42+
#### Dependencies
43+
44+
- nodejs
45+
- golang
46+
- grafana/build-container (our custom docker build container)
47+
48+
### grafana/build-container
49+
50+
The main build step (in CircleCI) is built using a custom build container that comes pre-baked with some of the neccesary dependencies.
51+
52+
Link: [grafana-build-container](https://github.com/grafana/grafana-build-container)
53+
54+
#### Dependencies
55+
56+
- fpm
57+
- nodejs
58+
- golang
59+
- crosscompiling (several compilers)
60+
61+
### Appveyor
62+
63+
Master and release builds trigger test runs on Appveyors build environment so that tests will run on Windows.
64+
65+
#### Files:
66+
67+
- `appveyor.yml`
68+
69+
#### Dependencies
70+
71+
- nodejs
72+
- golang
73+
74+
### Dockerfile
75+
76+
There is a Docker build for Grafana in the root of the project that allows anyone to build Grafana just using Docker.
77+
78+
#### Files
79+
80+
- `Dockerfile`
81+
82+
#### Dependencies
83+
84+
- nodejs
85+
- golang
86+
87+
### Local developer environments
88+
89+
Please send out a notice in the grafana-dev slack channel when updating Go or Node.js to make it easier for everyone to update their local developer environments.

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ os: Windows Server 2012 R2
55
clone_folder: c:\gopath\src\github.com\grafana\grafana
66

77
environment:
8-
nodejs_version: "6"
8+
nodejs_version: "8"
99
GOPATH: C:\gopath
1010
GOVERSION: 1.11
1111

conf/defaults.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,3 +554,6 @@ container_name =
554554
# Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer
555555
server_url =
556556
callback_url =
557+
558+
[panels]
559+
enable_alpha = false

docs/sources/administration/provisioning.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ Since not all datasources have the same configuration settings we only have the
166166
| tsdbVersion | string | OpenTSDB | Version |
167167
| tsdbResolution | string | OpenTSDB | Resolution |
168168
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
169+
| encrypt | string | MSSQL | Connection SSL encryption handling. 'disable', 'false' or 'true' |
169170
| postgresVersion | number | PostgreSQL | Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, ..., v10 |
170171
| timescaledb | boolean | PostgreSQL | Enable usage of TimescaleDB extension |
171172
| maxOpenConns | number | MySQL, PostgreSQL & MSSQL | Maximum number of open connections to the database (Grafana v5.4+) |

docs/sources/alerting/notifications.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Example json body:
128128

129129
In DingTalk PC Client:
130130

131-
1. Click "more" icon on left bottom of the panel.
131+
1. Click "more" icon on upper right of the panel.
132132

133133
2. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage".
134134

docs/sources/features/datasources/cloudwatch.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Checkout AWS docs on [IAM Roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGu
4646
## IAM Policies
4747

4848
Grafana needs permissions granted via IAM to be able to read CloudWatch metrics
49-
and EC2 tags/instances. You can attach these permissions to IAM roles and
49+
and EC2 tags/instances/regions. You can attach these permissions to IAM roles and
5050
utilize Grafana's built-in support for assuming roles.
5151

5252
Here is a minimal policy example:
@@ -65,11 +65,12 @@ Here is a minimal policy example:
6565
"Resource": "*"
6666
},
6767
{
68-
"Sid": "AllowReadingTagsFromEC2",
68+
"Sid": "AllowReadingTagsInstancesRegionsFromEC2",
6969
"Effect": "Allow",
7070
"Action": [
7171
"ec2:DescribeTags",
72-
"ec2:DescribeInstances"
72+
"ec2:DescribeInstances",
73+
"ec2:DescribeRegions"
7374
],
7475
"Resource": "*"
7576
}

0 commit comments

Comments
 (0)