Skip to content

Commit 4d719b0

Browse files
committed
Merge remote-tracking branch 'origin/master' into noop-services-poc
2 parents 6c41cfb + ed34907 commit 4d719b0

File tree

310 files changed

+16262
-2272
lines changed

Some content is hidden

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

310 files changed

+16262
-2272
lines changed

.circleci/config.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ jobs:
8383
- checkout
8484
- run: 'go get -u github.com/alecthomas/gometalinter'
8585
- run: 'go get -u github.com/tsenart/deadcode'
86+
- run: 'go get -u github.com/jgautheron/goconst/cmd/goconst'
8687
- run: 'go get -u github.com/gordonklaus/ineffassign'
8788
- run: 'go get -u github.com/opennota/check/cmd/structcheck'
8889
- run: 'go get -u github.com/mdempsky/unconvert'
8990
- run: 'go get -u github.com/opennota/check/cmd/varcheck'
9091
- run:
9192
name: run linters
92-
command: 'gometalinter --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=ineffassign --enable=structcheck --enable=unconvert --enable=varcheck ./...'
93+
command: 'gometalinter --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=goconst --enable=ineffassign --enable=structcheck --enable=unconvert --enable=varcheck ./...'
9394
- run:
9495
name: run go vet
9596
command: 'go vet ./pkg/...'
@@ -157,14 +158,18 @@ jobs:
157158
name: sha-sum packages
158159
command: 'go run build.go sha-dist'
159160
- run:
160-
name: Build Grafana.com publisher
161+
name: Build Grafana.com master publisher
161162
command: 'go build -o scripts/publish scripts/build/publish.go'
163+
- run:
164+
name: Build Grafana.com release publisher
165+
command: 'cd scripts/build/release_publisher && go build -o release_publisher .'
162166
- persist_to_workspace:
163167
root: .
164168
paths:
165169
- dist/grafana*
166170
- scripts/*.sh
167171
- scripts/publish
172+
- scripts/build/release_publisher/release_publisher
168173

169174
build:
170175
docker:
@@ -298,8 +303,8 @@ jobs:
298303
name: deploy to s3
299304
command: 'aws s3 sync ./dist s3://$BUCKET_NAME/release'
300305
- run:
301-
name: Trigger Windows build
302-
command: './scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} release'
306+
name: Deploy to Grafana.com
307+
command: './scripts/build/publish.sh'
303308

304309
workflows:
305310
version: 2

.github/CONTRIBUTING.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,5 @@ debug.test
7373

7474
/devenv/bulk-dashboards/*.json
7575
/devenv/bulk_alerting_dashboards/*.json
76+
77+
/scripts/build/release_publisher/release_publisher

CHANGELOG.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
11
# 5.4.0 (unreleased)
22

3+
### Minor
4+
5+
* **Datasource Proxy**: Keep trailing slash for datasource proxy requests [#13326](https://github.com/grafana/grafana/pull/13326), thx [@ryantxu](https://github.com/ryantxu)
6+
7+
# 5.3.0 (unreleased)
8+
9+
# 5.3.0-beta3 (2018-10-03)
10+
11+
* **Stackdriver**: Fix for missing ngInject [#13511](https://github.com/grafana/grafana/pull/13511)
12+
* **Permissions**: Fix for broken permissions selector [#13507](https://github.com/grafana/grafana/issues/13507)
13+
* **Alerting**: Alert reminders deduping not working as expected when running multiple Grafana instances [#13492](https://github.com/grafana/grafana/issues/13492)
14+
15+
# 5.3.0-beta2 (2018-10-01)
16+
317
### New Features
418

519
* **Annotations**: Enable template variables in tagged annotations queries [#9735](https://github.com/grafana/grafana/issues/9735)
20+
* **Stackdriver**: Support for Google Stackdriver Datasource [#13289](https://github.com/grafana/grafana/pull/13289)
621

722
### Minor
823

24+
* **Provisioning**: Dashboard Provisioning now support symlinks that changes target [#12534](https://github.com/grafana/grafana/issues/12534), thx [@auhlig](https://github.com/auhlig)
925
* **OAuth**: Allow oauth email attribute name to be configurable [#12986](https://github.com/grafana/grafana/issues/12986), thx [@bobmshannon](https://github.com/bobmshannon)
1026
* **Tags**: Default sort order for GetDashboardTags [#11681](https://github.com/grafana/grafana/pull/11681), thx [@Jonnymcc](https://github.com/Jonnymcc)
1127
* **Prometheus**: Label completion queries respect dashboard time range [#12251](https://github.com/grafana/grafana/pull/12251), thx [@mtanda](https://github.com/mtanda)
1228
* **Prometheus**: Allow to display annotations based on Prometheus series value [#10159](https://github.com/grafana/grafana/issues/10159), thx [@mtanda](https://github.com/mtanda)
1329
* **Prometheus**: Adhoc-filtering for Prometheus dashboards [#13212](https://github.com/grafana/grafana/issues/13212)
1430
* **Singlestat**: Fix gauge display accuracy for percents [#13270](https://github.com/grafana/grafana/issues/13270), thx [@tianon](https://github.com/tianon)
15-
16-
# 5.3.0 (unreleased)
17-
18-
### Minor
19-
31+
* **Dashboard**: Prevent auto refresh from starting when loading dashboard with absolute time range [#12030](https://github.com/grafana/grafana/issues/12030)
32+
* **Templating**: New templating variable type `Text box` that allows free text input [#3173](https://github.com/grafana/grafana/issues/3173)
2033
* **Alerting**: Link to view full size image in Microsoft Teams alert notifier [#13121](https://github.com/grafana/grafana/issues/13121), thx [@holiiveira](https://github.com/holiiveira)
34+
* **Alerting**: Fixes a bug where all alerts would send reminders after upgrade & restart [#13402](https://github.com/grafana/grafana/pull/13402)
35+
* **Alerting**: Concurrent render limit for graphs used in notifications [#13401](https://github.com/grafana/grafana/pull/13401)
2136
* **Postgres/MySQL/MSSQL**: Add support for replacing $__interval and $__interval_ms in alert queries [#11555](https://github.com/grafana/grafana/issues/11555), thx [@svenklemm](https://github.com/svenklemm)
2237

2338
# 5.3.0-beta1 (2018-09-06)

CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
# Contributing
3+
4+
Grafana uses GitHub to manage contributions.
5+
Contributions take the form of pull requests that will be reviewed by the core team.
6+
7+
* If you are a new contributor see: [Steps to Contribute](#steps-to-contribute)
8+
9+
* If you have a trivial fix or improvement, go ahead and create a pull request.
10+
11+
* If you plan to do something more involved, discuss your idea on the respective [issue](https://github.com/grafana/grafana/issues) or create a [new issue](https://github.com/grafana/grafana/issues/new) if it does not exist. This will avoid unnecessary work and surely give you and us a good deal of inspiration.
12+
13+
14+
## Steps to Contribute
15+
16+
Should you wish to work on a GitHub issue, check first if it is not already assigned to someone. If it is free, you claim it by commenting on the issue that you want to work on it. This is to prevent duplicated efforts from contributors on the same issue.
17+
18+
Please check the [`beginner friendly`](https://github.com/grafana/grafana/issues?q=is%3Aopen+is%3Aissue+label%3A%22beginner+friendly%22) label to find issues that are good for getting started. If you have questions about one of the issues, with or without the tag, please comment on them and one of the core team or the original poster will clarify it.
19+
20+
21+
22+
## Setup
23+
24+
Follow the setup guide in README.md
25+
26+
### Rebuild frontend assets on source change
27+
```
28+
yarn watch
29+
```
30+
31+
### Rerun tests on source change
32+
```
33+
yarn jest
34+
```
35+
36+
### Run tests for backend assets before commit
37+
```
38+
test -z "$(gofmt -s -l . | grep -v -E 'vendor/(github.com|golang.org|gopkg.in)' | tee /dev/stderr)"
39+
```
40+
41+
### Run tests for frontend assets before commit
42+
```
43+
yarn test
44+
go test -v ./pkg/...
45+
```
46+
47+
48+
## Pull Request Checklist
49+
50+
* Branch from the master branch and, if needed, rebase to the current master branch before submitting your pull request. If it doesn't merge cleanly with master you may be asked to rebase your changes.
51+
52+
* Commits should be as small as possible, while ensuring that each commit is correct independently (i.e., each commit should compile and pass tests).
53+
54+
* If your patch is not getting reviewed or you need a specific person to review it, you can @-reply a reviewer asking for a review in the pull request or a comment.
55+
56+
* Add tests relevant to the fixed bug or new feature.

Gopkg.lock

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

Gopkg.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,7 @@ ignored = [
203203
[[constraint]]
204204
name = "github.com/denisenkom/go-mssqldb"
205205
revision = "270bc3860bb94dd3a3ffd047377d746c5e276726"
206+
207+
[[constraint]]
208+
name = "github.com/VividCortex/mysqlerr"
209+
branch = "master"

PLUGIN_DEV.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ upgrading Grafana please check here before creating an issue.
66

77
## Links
88

9-
- [Datasource plugin written in typescript](https://github.com/grafana/typescript-template-datasource)
10-
- [Simple json dataource plugin](https://github.com/grafana/simple-json-datasource)
9+
- [Datasource plugin written in TypeScript](https://github.com/grafana/typescript-template-datasource)
10+
- [Simple JSON datasource plugin](https://github.com/grafana/simple-json-datasource)
1111
- [Plugin development guide](http://docs.grafana.org/plugins/developing/development/)
1212
- [Webpack Grafana plugin template project](https://github.com/CorpGlory/grafana-plugin-template-webpack)
1313

build.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ import (
2222
"time"
2323
)
2424

25+
const (
26+
windows = "windows"
27+
linux = "linux"
28+
)
29+
2530
var (
2631
//versionRe = regexp.MustCompile(`-[0-9]{1,3}-g[0-9a-f]{5,10}`)
2732
goarch string
@@ -110,13 +115,13 @@ func main() {
110115
case "package":
111116
grunt(gruntBuildArg("build")...)
112117
grunt(gruntBuildArg("package")...)
113-
if goos == "linux" {
118+
if goos == linux {
114119
createLinuxPackages()
115120
}
116121

117122
case "package-only":
118123
grunt(gruntBuildArg("package")...)
119-
if goos == "linux" {
124+
if goos == linux {
120125
createLinuxPackages()
121126
}
122127

@@ -378,7 +383,7 @@ func ensureGoPath() {
378383
}
379384

380385
func grunt(params ...string) {
381-
if runtime.GOOS == "windows" {
386+
if runtime.GOOS == windows {
382387
runPrint(`.\node_modules\.bin\grunt`, params...)
383388
} else {
384389
runPrint("./node_modules/.bin/grunt", params...)
@@ -420,7 +425,7 @@ func build(binaryName, pkg string, tags []string) {
420425
binary = fmt.Sprintf("./bin/%s", binaryName)
421426
}
422427

423-
if goos == "windows" {
428+
if goos == windows {
424429
binary += ".exe"
425430
}
426431

@@ -484,11 +489,11 @@ func clean() {
484489

485490
func setBuildEnv() {
486491
os.Setenv("GOOS", goos)
487-
if goos == "windows" {
492+
if goos == windows {
488493
// require windows >=7
489494
os.Setenv("CGO_CFLAGS", "-D_WIN32_WINNT=0x0601")
490495
}
491-
if goarch != "amd64" || goos != "linux" {
496+
if goarch != "amd64" || goos != linux {
492497
// needed for all other archs
493498
cgo = true
494499
}

conf/defaults.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ error_or_timeout = alerting
474474
# Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok)
475475
nodata_or_nullvalues = no_data
476476

477+
# Alert notifications can include images, but rendering many images at the same time can overload the server
478+
# This limit will protect the server from render overloading and make sure notifications are sent out quickly
479+
concurrent_render_limit = 5
480+
477481
#################################### Explore #############################
478482
[explore]
479483
# Enable the Explore section

0 commit comments

Comments
 (0)