Skip to content

Commit

Permalink
Merge branch 'master' into jrockway-zipkin
Browse files Browse the repository at this point in the history
* master: (166 commits)
  Cloudwatch: Add AWS DocDB metrics (grafana#17241)
  Provisioning: Support folder that doesn't exist yet in dashboard provisioning (grafana#17407)
  Codestyle: Fix govet issues (grafana#17178)
  @grafana/runtime: expose location update (grafana#17428)
  Fix: Adds context to list of keys that are not part of query (grafana#17423)
  Prometheus: Correctly escape '|' literals in interpolated PromQL variables (grafana#16932)
  Explore: Makes it possible to use a different query field per mode (grafana#17395)
  DataSourceApi: remove ExploreDataSourceApi (grafana#17424)
  Fix: change angular loader paths (grafana#17421)
  Build: specify build flag for `docker-compose up` (grafana#17411)
  Add a @grafana/runtime package with backendSrv interface (grafana#16533)
  Database: Initialize xorm with an empty schema for postgres (grafana#17357)
  docs: configuring custom headers in the dataproxy (grafana#17367)
  Explore: Queries the datasource once per run query and uses DataStreamObserver (grafana#17263)
  Feature: Adds redux action logging toggle from url params (grafana#17368)
  Build: Adds e2e tests back to master workflow with better error messages and with artifacts (grafana#17374)
  Explore: Handle datasources with long names better in ds picker (grafana#17393)
  Annotations: Improve annotation option tooltips (grafana#17384)
  InfluxDB: Fixes single quotes are not escaped (grafana#17398)
  Chore: Bump axios to 0.19.0 (grafana#17403)
  ...
  • Loading branch information
bergquist committed Jun 5, 2019
2 parents 9eb9d79 + a9da7b5 commit a3b57ba
Show file tree
Hide file tree
Showing 622 changed files with 15,628 additions and 7,558 deletions.
22 changes: 16 additions & 6 deletions .circleci/config.yml
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 All @@ -91,6 +91,12 @@ jobs:
name: run end-to-end tests
command: 'env BASE_URL=http://127.0.0.1:3000 yarn e2e-tests'
no_output_timeout: 5m
- store_artifacts:
path: public/e2e-test/screenShots/theTruth
destination: expected-screenshots
- store_artifacts:
path: public/e2e-test/screenShots/theOutput
destination: output-screenshots

codespell:
docker:
Expand All @@ -103,7 +109,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 +594,7 @@ jobs:
root: .
paths:
- dist/grafana-*.msi
- dist/grafana-*.msi.sha256

store-build-artifacts:
docker:
Expand Down Expand Up @@ -628,7 +635,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 +668,10 @@ workflows:
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-master

- end-to-end-test:
requires:
- grafana-docker-master
filters: *filter-only-master
release:
jobs:
- build-all:
Expand Down Expand Up @@ -722,7 +732,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
6 changes: 4 additions & 2 deletions .gitignore
Expand Up @@ -79,10 +79,12 @@ debug.test
/scripts/build/release_publisher/release_publisher
*.patch


# Ignoring frontend packages specifics
/packages/**/dist
/packages/**/compiled
/packages/**/.rpt2_cache

theOutput/
theOutput/

# Ignore go local build dependencies
/scripts/go/bin/**
58 changes: 57 additions & 1 deletion CHANGELOG.md
@@ -1,4 +1,59 @@
# 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)

### Features / Enhancements
* **Plugins**: Support templated urls in plugin routes. [#16599](https://github.com/grafana/grafana/pull/16599), [@briangann](https://github.com/briangann)
* **Packaging**: New MSI windows installer package**. [#17073](https://github.com/grafana/grafana/pull/17073), [@briangann](https://github.com/briangann)

### Bug Fixes
* **Dashboard**: Fixes blank dashboard after window resize with panel without title. [#16942](https://github.com/grafana/grafana/pull/16942), [@torkelo](https://github.com/torkelo)
* **Dashboard**: Fixes lazy loading & expanding collapsed rows on mobile. [#17055](https://github.com/grafana/grafana/pull/17055), [@torkelo](https://github.com/torkelo)
* **Dashboard**: Fixes scrolling issues for Edge browser. [#17033](https://github.com/grafana/grafana/pull/17033), [@jschill](https://github.com/jschill)
* **Dashboard**: Show refresh button in first kiosk(tv) mode. [#17032](https://github.com/grafana/grafana/pull/17032), [@torkelo](https://github.com/torkelo)
* **Explore**: Fix empty result from datasource should render logs container. [#16999](https://github.com/grafana/grafana/pull/16999), [@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)
* **Explore**: Makes it possible to zoom in Explore/Loki/Graph without exception. [#16991](https://github.com/grafana/grafana/pull/16991), [@hugohaggmark](https://github.com/hugohaggmark)
* **Gauge**: Fixes orientation issue after switching from BarGauge to Gauge. [#17064](https://github.com/grafana/grafana/pull/17064), [@torkelo](https://github.com/torkelo)
* **GettingStarted**: Fixes layout issues in getting started panel. [#16941](https://github.com/grafana/grafana/pull/16941), [@torkelo](https://github.com/torkelo)
* **InfluxDB**: Fix HTTP method should default to GET. [#16949](https://github.com/grafana/grafana/pull/16949), [@StephenSorriaux](https://github.com/StephenSorriaux)
* **Panels**: Fixed alert icon position in panel header. [#17070](https://github.com/grafana/grafana/pull/17070), [@torkelo](https://github.com/torkelo)
* **Panels**: Fixes panel error tooltip not showing. [#16993](https://github.com/grafana/grafana/pull/16993), [@torkelo](https://github.com/torkelo)
* **Plugins**: Fix how datemath utils are exposed to plugins. [#16976](https://github.com/grafana/grafana/pull/16976), [@marefr](https://github.com/marefr)
* **Singlestat**: fixed centering issue for very small panels. [#16944](https://github.com/grafana/grafana/pull/16944), [@torkelo](https://github.com/torkelo)
* **Search**: Scroll issue in dashboard search in latest Chrome. [#17054](https://github.com/grafana/grafana/pull/17054), [@jschill](https://github.com/jschill)
* **Docker**: Prevent a permission denied error when writing files to the default provisioning directory. [#16831](https://github.com/grafana/grafana/pull/16831), [@wmedlar](https://github.com/wmedlar)
* **Gauge**: Adds background shade to gauge track and improves height usage. [#17019](https://github.com/grafana/grafana/pull/17019), [@torkelo](https://github.com/torkelo)
* **RemoteCache**: Avoid race condition in Set causing error on insert. . [#17082](https://github.com/grafana/grafana/pull/17082), [@bergquist](https://github.com/bergquist)

# 6.2.0-beta1 (2019-05-07)

Expand Down Expand Up @@ -30,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
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`
2 changes: 2 additions & 0 deletions Dockerfile
Expand Up @@ -35,6 +35,8 @@ RUN ./node_modules/.bin/grunt build
# Final container
FROM debian:stretch-slim

LABEL maintainer="Grafana team <hello@grafana.com>"

ARG GF_UID="472"
ARG GF_GID="472"

Expand Down
54 changes: 53 additions & 1 deletion Makefile
@@ -1,6 +1,9 @@
-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
.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 revive-alerting

GO := GO111MODULE=on go
GO_FILES := ./pkg/...

all: deps build

Expand Down Expand Up @@ -66,3 +69,52 @@ clean:
node_modules: package.json yarn.lock
@echo "install frontend dependencies"
yarn install --pure-lockfile --no-progress

scripts/go/bin/revive: scripts/go/go.mod
@cd scripts/go; \
$(GO) build -o ./bin/revive github.com/mgechev/revive

scripts/go/bin/gosec: scripts/go/go.mod
@cd scripts/go; \
$(GO) build -o ./bin/gosec github.com/securego/gosec/cmd/gosec

revive: scripts/go/bin/revive
@scripts/go/bin/revive \
-formatter stylish \
-config ./scripts/go/configs/revive.toml \
$(GO_FILES)

revive-alerting: scripts/go/bin/revive
@scripts/go/bin/revive \
-formatter stylish \
./pkg/services/alerting/...

# 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 --build
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 \
-exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \
-conf=./scripts/go/configs/gosec.json \
$(GO_FILES)
3 changes: 3 additions & 0 deletions conf/defaults.ini
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
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
@@ -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

0 comments on commit a3b57ba

Please sign in to comment.