Skip to content

Commit

Permalink
Merge remote-tracking branch 'grafana/master' into backend-service-in…
Browse files Browse the repository at this point in the history
…-grafanaui

* grafana/master: (92 commits)
  LDAP: remove unused function (grafana#17351)
  Enterprise: remove gofakeit dep (grafana#17344)
  Explore: Update time range before running queries (grafana#17349)
  Build(package.json): improve npm commands (grafana#17022)
  Chore: upgrade webpack analyser (grafana#17340)
  NewDataSourcePage: Add Grafana Cloud link (grafana#17324)
  CloudWatch: Avoid exception while accessing results (grafana#17283)
  Build: ignore absence of docker-compose (grafana#17331)
  Build(makefile): improve error handling (grafana#17281)
  adds auth example for the cli cherrypick task (grafana#17307)
  docs: remove my email from docs examples (grafana#17325)
  16365 change clashing variable names (grafana#17140)
  Frontend/SeriesData: Fix for convert SeriesData to Table format (grafana#17314)
  Frontend/utils: Import has only from lodash (grafana#17311)
  Frontend/utils: Add missing type  (grafana#17312)
  update v6.2-beta1 changelog with missing pr (grafana#17308)
  explore: don't parse log levels if provided by field or label (grafana#17180)
  HTTP Server: Serve Grafana with a custom URL path prefix (grafana#17048)
  update latest.json to latest stable version (grafana#17306)
  release: v6.2.1 changelog update (grafana#17303)
  ...
  • Loading branch information
ryantxu committed May 30, 2019
2 parents 2093d7e + a3092dc commit 69a1960
Show file tree
Hide file tree
Showing 260 changed files with 7,107 additions and 3,699 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ jobs:
- run:
name: cache server tests
command: './scripts/circle-test-cache-servers.sh'

end-to-end-test:
docker:
- image: circleci/node:8-browsers
- image: grafana/grafana:master
- image: grafana/grafana-dev:master-$CIRCLE_SHA1
steps:
- run: dockerize -wait tcp://127.0.0.1:3000 -timeout 120s
- checkout
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- run:
# Important: all words have to be in lowercase, and separated by "\n".
name: exclude known exceptions
command: 'echo -e "unknwon" > words_to_ignore.txt'
command: 'echo -e "unknwon\nreferer\nerrorstring" > words_to_ignore.txt'
- run:
name: check documentation spelling errors
command: 'codespell -I ./words_to_ignore.txt docs/'
Expand Down Expand Up @@ -588,6 +588,7 @@ jobs:
root: .
paths:
- dist/grafana-*.msi
- dist/grafana-*.msi.sha256

store-build-artifacts:
docker:
Expand Down Expand Up @@ -628,7 +629,7 @@ workflows:
- mysql-integration-test
- postgres-integration-test
- build-oss-msi
filters: *filter-only-master
filters: *filter-only-master
- grafana-docker-master:
requires:
- build-all
Expand Down Expand Up @@ -661,7 +662,6 @@ workflows:
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-master

release:
jobs:
- build-all:
Expand Down Expand Up @@ -722,7 +722,7 @@ workflows:
- backend-lint
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-master
filters: *filter-only-release

build-branches-and-prs:
jobs:
Expand Down
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
# 6.2.0 (unreleased)
# 6.3.0 (unreleased)

# 6.2.1 (2019-05-27)

### Features / Enhancements
* **CLI**: Add command to migrate all datasources to use encrypted password fields . [#17118](https://github.com/grafana/grafana/pull/17118), [@aocenas](https://github.com/aocenas)
* **Gauge/BarGauge**: Improvements to auto value font size . [#17292](https://github.com/grafana/grafana/pull/17292), [@torkelo](https://github.com/torkelo)

### Bug Fixes
* **Auth Proxy**: Resolve database is locked errors. [#17274](https://github.com/grafana/grafana/pull/17274), [@marefr](https://github.com/marefr)
* **Database**: Retry transaction if sqlite returns database is locked error. [#17276](https://github.com/grafana/grafana/pull/17276), [@marefr](https://github.com/marefr)
* **Explore**: Fixes so clicking in a Prometheus Table the query is filtered by clicked value. [#17083](https://github.com/grafana/grafana/pull/17083), [@hugohaggmark](https://github.com/hugohaggmark)
* **Singlestat**: Fixes issue with value placement and line wraps. [#17249](https://github.com/grafana/grafana/pull/17249), [@torkelo](https://github.com/torkelo)
* **Tech**: Update jQuery to 3.4.1 to fix issue on iOS 10 based browers as well as Chrome 53.x . [#17290](https://github.com/grafana/grafana/pull/17290), [@timbutler](https://github.com/timbutler)

# 6.2.0 (2019-05-22)

### Bug Fixes
* **BarGauge**: Fix for negative min values. [#17192](https://github.com/grafana/grafana/pull/17192), [@torkelo](https://github.com/torkelo)
* **Gauge/BarGauge**: Fix for issues editing min & max options. [#17174](https://github.com/grafana/grafana/pull/17174)
* **Search**: Make only folder name only open search with current folder filter. [#17226](https://github.com/grafana/grafana/pull/17226)
* **AzureMonitor**: Revert to clearing chained dropdowns. [#17212](https://github.com/grafana/grafana/pull/17212)

### Breaking Changes
* **Plugins**: Data source plugins that process hidden queries need to add a "hiddenQueries: true" attribute in plugin.json. [#17124](https://github.com/grafana/grafana/pull/17124), [@ryantxu](https://github.com/ryantxu)

### Removal of old deprecated package repository

5 months ago we deprecated our old package cloud repository and [replaced it](https://grafana.com/blog/2019/01/05/moving-to-packages.grafana.com/) with our own. We will remove the old depreciated
repo on July 1st. Make sure you have switched to the new repo by then. The new repository has all our old releases so you are not required to upgrade just to switch package repository.

# 6.2.0-beta2 (2019-05-15)

Expand Down Expand Up @@ -56,6 +85,7 @@
* **Provisioning**: Add API endpoint to reload provisioning configs. [#16579](https://github.com/grafana/grafana/pull/16579), [@aocenas](https://github.com/aocenas)
* **Provisioning**: Do not allow deletion of provisioned dashboards. [#16211](https://github.com/grafana/grafana/pull/16211), [@aocenas](https://github.com/aocenas)
* **Provisioning**: Interpolate env vars in provisioning files. [#16499](https://github.com/grafana/grafana/pull/16499), [@aocenas](https://github.com/aocenas)
* **Provisioning**: Support FolderUid in Dashboard Provisioning Config. [#16559](https://github.com/grafana/grafana/pull/16559), [@swtch1](https://github.com/swtch1)
* **Security**: Add new setting allow_embedding. [#16853](https://github.com/grafana/grafana/pull/16853), [@marefr](https://github.com/marefr)
* **Security**: Store datasource passwords encrypted in secureJsonData. [#16175](https://github.com/grafana/grafana/pull/16175), [@aocenas](https://github.com/aocenas)
* **UX**: Improve Grafana usage for smaller screens. [#16783](https://github.com/grafana/grafana/pull/16783), [@torkelo](https://github.com/torkelo)
Expand Down
29 changes: 26 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,30 @@ To setup a local development environment we recommend reading [Building Grafana

* Add tests relevant to the fixed bug or new feature.

* Follow [PR and commit messages guidelines](#PR-and-commit-messages-guidelines)

### Pull requests with new features
Commits should be as small as possible, while ensuring that each commit is correct independently (i.e., each commit should compile and pass tests).

Make sure to include `Closes #<issue number>` or `Fixes #<issue number>` in the pull request description.

### Pull requests with bug fixes
Please make all changes in one commit if possible. Include `Closes #<issue number>` in bottom of the commit message.
A commit message for a bug fix should look something like this.
A commit message for a bug fix should look something like this:

```
avoid infinite loop in the dashboard provisioner
Dashboard: Avoid infinite loop in the dashboard provisioner
if one dashboard with an uid is refered to by two
If one dashboard with an uid is refered to by two
provsioners each provisioner overwrite each other.
filling up dashboard_versions quite fast if using
default settings.
Closes #12864
```

For more details about PR naming and commit messages please see [PR and commit messages guidelines](#PR-and-commit-messages-guidelines)

If the pull request needs changes before its merged the new commits should be rebased into one commit before its merged.

## Backend dependency management
Expand Down Expand Up @@ -80,3 +84,22 @@ GO111MODULE=on go mod vendor
```

You have to commit the changes to `go.mod`, `go.sum` and the `vendor/` directory before submitting the pull request.

## PR and commit messages guidelines
PR title and squash commit messages should follow guidelines below:

```
Area of changes: Message
Detailed description
```

The `Area of changes` is related either to functional domain (i.e. Build, Release) or feature domain (i.e. Explore, Plugins, BarGaugePanel).


`Message` should be concise, written in present tense and start with capitalised verb. Detailed description should be provided as commit message body, by entering a blank line between commit title and the description.

### Examples of good PR titles/commit messages:
- `Explore: Adds Live option for supported datasources`
- `GraphPanel: Don't sort series when legend table & sort column is not visible`
- `Build: Support publishing MSI to grafana.com`
25 changes: 24 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-include local/Makefile

.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go test-go test-js test run clean gosec revive
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go test-go test-js test run clean gosec revive devenv devenv-down

GO := GO111MODULE=on go
GO_FILES := ./pkg/...
Expand Down Expand Up @@ -84,6 +84,29 @@ revive: scripts/go/bin/revive
-config ./scripts/go/configs/revive.toml \
$(GO_FILES)

# create docker-compose file with provided sources and start them
# example: make devenv sources=postgres,openldap
ifeq ($(sources),)
devenv:
@printf 'You have to define sources for this command \nexample: make devenv sources=postgres,openldap\n'
else
devenv: devenv-down
$(eval targets := $(shell echo '$(sources)' | tr "," " "))

@cd devenv; \
./create_docker_compose.sh $(targets) || \
(rm -rf docker-compose.yaml; exit 1)

@cd devenv; \
docker-compose up -d
endif

# drop down the envs
devenv-down:
@cd devenv; \
test -f docker-compose.yaml && \
docker-compose down || exit 0;

# TODO recheck the rules and leave only necessary exclusions
gosec: scripts/go/bin/gosec
@scripts/go/bin/gosec -quiet \
Expand Down
3 changes: 3 additions & 0 deletions conf/defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ enforce_domain = false
# The full public facing url
root_url = %(protocol)s://%(domain)s:%(http_port)s/

# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
serve_from_sub_path = false

# Log web requests
router_logging = false

Expand Down
3 changes: 3 additions & 0 deletions conf/sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
# If you use reverse proxy and sub path specify full url (with sub path)
;root_url = http://localhost:3000

# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
;serve_from_sub_path = false

# Log web requests
;router_logging = false

Expand Down
14 changes: 13 additions & 1 deletion devenv/datasources.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

apiVersion: 1

datasources:
- name: gdev-graphite
type: graphite
access: proxy
url: http://localhost:8080
url: http://localhost:8180
jsonData:
graphiteVersion: "1.1"

Expand Down Expand Up @@ -142,6 +143,17 @@ datasources:
timeField: "@timestamp"
esVersion: 70

- name: gdev-elasticsearch-v7-metricbeat
type: elasticsearch
access: proxy
database: "[metricbeat-]YYYY.MM.DD"
url: http://localhost:12200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 70
timeInterval: "10s"

- name: gdev-mysql
type: mysql
url: localhost:3306
Expand Down
40 changes: 9 additions & 31 deletions devenv/dev-dashboards/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,39 +48,39 @@
"y": 0
},
"headings": false,
"id": 8,
"id": 2,
"limit": 1000,
"links": [],
"query": "",
"recent": false,
"search": true,
"starred": false,
"tags": ["panel-demo"],
"tags": ["panel-tests"],
"timeFrom": null,
"timeShift": null,
"title": "tag: panel-demo",
"title": "tag: panel-tests",
"type": "dashlist"
},
{
"folderId": null,
"gridPos": {
"h": 13,
"h": 26,
"w": 6,
"x": 12,
"y": 0
},
"headings": false,
"id": 2,
"id": 3,
"limit": 1000,
"links": [],
"query": "",
"recent": false,
"search": true,
"starred": false,
"tags": ["panel-tests"],
"tags": ["gdev", "demo"],
"timeFrom": null,
"timeShift": null,
"title": "tag: panel-tests",
"title": "tag: dashboard-demo",
"type": "dashlist"
},
{
Expand Down Expand Up @@ -114,28 +114,6 @@
"y": 13
},
"headings": false,
"id": 3,
"limit": 1000,
"links": [],
"query": "",
"recent": false,
"search": true,
"starred": false,
"tags": ["gdev", "demo"],
"timeFrom": null,
"timeShift": null,
"title": "tag: dashboard-demo",
"type": "dashlist"
},
{
"folderId": null,
"gridPos": {
"h": 13,
"w": 6,
"x": 12,
"y": 13
},
"headings": false,
"id": 4,
"limit": 1000,
"links": [],
Expand All @@ -146,7 +124,7 @@
"tags": ["templating", "gdev"],
"timeFrom": null,
"timeShift": null,
"title": "tag: templating",
"title": "tag: templating ",
"type": "dashlist"
}
],
Expand All @@ -167,5 +145,5 @@
"timezone": "",
"title": "Grafana Dev Overview & Home",
"uid": "j6T00KRZz",
"version": 1
"version": 2
}
Loading

0 comments on commit 69a1960

Please sign in to comment.