diff --git a/.drone.yml b/.drone.yml index 327e54b779f..51c1739dd1c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -23,7 +23,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl verify-drone @@ -43,13 +43,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition oss @@ -57,7 +57,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -68,19 +68,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition oss depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition oss depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -88,7 +88,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-frontend trigger: event: @@ -114,7 +114,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -126,15 +126,15 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} - --variants linux-x64,linux-x64-musl,osx64,win64,armv6 --no-pull-enterprise + --variants linux-amd64,linux-amd64-musl,darwin-amd64,windows-amd64,armv6 --no-pull-enterprise depends_on: - initialize environment: {} - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id @@ -143,20 +143,29 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps depends_on: - initialize environment: null - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# It is required that the generated Typescript be in sync with the input CUE @@ -169,17 +178,18 @@ steps: - ./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . --diff depends_on: - validate-scuemata - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --jobs 8 --edition oss - --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64,linux-x64-musl,osx64,win64,armv6 + --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-amd64,linux-amd64-musl,darwin-amd64,windows-amd64,armv6 depends_on: - build-plugins - build-backend - build-frontend + - build-frontend-packages environment: null - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: package - commands: - ./scripts/grafana-server/start-server @@ -187,11 +197,12 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -266,9 +277,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - yarn wait-on http://$HOST:$PORT @@ -288,7 +300,7 @@ steps: - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition oss -archs amd64 @@ -346,7 +358,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -363,7 +375,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -378,7 +390,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: mysql-integration-tests trigger: event: @@ -410,7 +422,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -422,16 +434,44 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - - yarn packages:build - - yarn packages:docsExtract - - yarn packages:docsToMarkdown - - ./scripts/ci-reference-docs-lint.sh ci + - |- + echo -e "unknwon + referer + errorstring + eror + iam + wan" > words_to_ignore.txt + - codespell -I words_to_ignore.txt docs/ + - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 + name: codespell +- commands: + - yarn run prettier:checkDocs + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: lint-docs +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages +- commands: + - ./scripts/ci-reference-docs-lint.sh ci + depends_on: + - build-frontend-packages + image: grafana/build-container:1.5.3 name: build-frontend-docs - commands: - mkdir -p /hugo/content/docs/grafana @@ -466,7 +506,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -478,16 +518,44 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - - yarn packages:build - - yarn packages:docsExtract - - yarn packages:docsToMarkdown - - ./scripts/ci-reference-docs-lint.sh ci + - |- + echo -e "unknwon + referer + errorstring + eror + iam + wan" > words_to_ignore.txt + - codespell -I words_to_ignore.txt docs/ + - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 + name: codespell +- commands: + - yarn run prettier:checkDocs + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: lint-docs +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages +- commands: + - ./scripts/ci-reference-docs-lint.sh ci + depends_on: + - build-frontend-packages + image: grafana/build-container:1.5.3 name: build-frontend-docs - commands: - mkdir -p /hugo/content/docs/grafana @@ -519,7 +587,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -531,7 +599,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl verify-drone @@ -551,13 +619,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition oss @@ -565,7 +633,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -576,19 +644,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition oss depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition oss depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -596,7 +664,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-frontend trigger: branch: main @@ -620,7 +688,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -632,7 +700,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - image: grafana/drone-downstream name: trigger-enterprise-downstream @@ -651,7 +719,7 @@ steps: depends_on: - initialize environment: {} - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id @@ -660,8 +728,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin depends_on: @@ -669,13 +746,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# It is required that the generated Typescript be in sync with the input CUE @@ -688,7 +765,7 @@ steps: - ./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . --diff depends_on: - validate-scuemata - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise @@ -697,6 +774,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages environment: GITHUB_TOKEN: from_secret: github_token @@ -708,7 +786,7 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: package - commands: - ./scripts/grafana-server/start-server @@ -716,11 +794,12 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -795,9 +874,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json @@ -837,14 +917,14 @@ steps: GRAFANA_MISC_STATS_API_KEY: from_secret: grafana_misc_stats_api_key failure: ignore - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: publish-frontend-metrics - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition oss @@ -916,7 +996,7 @@ steps: environment: NPM_TOKEN: from_secret: npm_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: release-canary-npm-packages - commands: - ./bin/grabpl upload-packages --edition oss --packages-bucket grafana-downloads @@ -991,7 +1071,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1008,7 +1088,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -1023,7 +1103,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: mysql-integration-tests trigger: branch: main @@ -1059,7 +1139,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -1142,7 +1222,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1152,7 +1232,7 @@ steps: name: identify-runner - commands: - make gen-go - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl store-packages --edition oss --gcp-key /tmp/gcpkey.json --build-id @@ -1224,7 +1304,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1237,7 +1317,7 @@ steps: - ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl gen-version ${DRONE_TAG} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} @@ -1247,7 +1327,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps @@ -1256,8 +1336,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --github-token $${GITHUB_TOKEN} + --edition oss --no-pull-enterprise ${DRONE_TAG} + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin depends_on: @@ -1265,13 +1354,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# It is required that the generated Typescript be in sync with the input CUE @@ -1284,7 +1373,7 @@ steps: - ./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . --diff depends_on: - validate-scuemata - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise @@ -1293,6 +1382,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages environment: GITHUB_TOKEN: from_secret: github_token @@ -1304,14 +1394,14 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: package - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition oss --shouldSave @@ -1343,11 +1433,12 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -1422,9 +1513,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - ./bin/grabpl upload-cdn --edition oss --src-bucket "$${PRERELEASE_BUCKET}" --src-dir @@ -1474,7 +1566,7 @@ steps: - ./scripts/build/build-npm-packages.sh ${DRONE_TAG} depends_on: - store-storybook - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-npm-packages - commands: - ./bin/grabpl artifacts npm store --tag ${DRONE_TAG} @@ -1520,7 +1612,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1533,7 +1625,7 @@ steps: - ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl gen-version ${DRONE_TAG} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - |- @@ -1547,13 +1639,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition oss @@ -1561,7 +1653,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -1572,19 +1664,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition oss depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition oss depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -1592,7 +1684,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-frontend trigger: event: @@ -1641,7 +1733,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1654,7 +1746,7 @@ steps: - ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl gen-version ${DRONE_TAG} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -1669,7 +1761,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -1684,7 +1776,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: mysql-integration-tests trigger: event: @@ -1725,7 +1817,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -1784,7 +1876,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1799,7 +1891,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -1819,7 +1911,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} @@ -1829,7 +1921,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps @@ -1838,8 +1930,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --github-token $${GITHUB_TOKEN} + --edition enterprise --no-pull-enterprise ${DRONE_TAG} + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin @@ -1848,13 +1949,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# It is required that the generated Typescript be in sync with the input CUE @@ -1867,7 +1968,7 @@ steps: - ./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . --diff depends_on: - validate-scuemata - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} @@ -1877,7 +1978,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-backend-enterprise2 - commands: - ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} @@ -1886,6 +1987,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages - build-backend-enterprise2 environment: GITHUB_TOKEN: @@ -1898,14 +2000,14 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: package - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition enterprise --shouldSave @@ -1937,12 +2039,13 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 RUNDIR: scripts/grafana-server/tmp-grafana-enterprise - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -2042,6 +2145,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages - build-backend-enterprise2 environment: GITHUB_TOKEN: @@ -2054,7 +2158,7 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: package-enterprise2 - commands: - ./bin/grabpl upload-cdn --edition enterprise2 --src-bucket "$${PRERELEASE_BUCKET}" @@ -2116,7 +2220,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2131,7 +2235,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -2151,7 +2255,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - |- @@ -2165,13 +2269,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition enterprise @@ -2179,7 +2283,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -2190,19 +2294,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition enterprise depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition enterprise depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -2210,7 +2314,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-frontend - commands: - ./bin/grabpl lint-backend --edition enterprise2 @@ -2218,19 +2322,19 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-backend-enterprise2 - commands: - ./bin/grabpl test-backend --edition enterprise2 depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-enterprise2 - commands: - ./bin/grabpl integration-tests --edition enterprise2 depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-integration-enterprise2 trigger: event: @@ -2289,7 +2393,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2304,7 +2408,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -2324,7 +2428,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -2339,7 +2443,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -2354,7 +2458,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: mysql-integration-tests - commands: - dockerize -wait tcp://redis:6379/0 -timeout 120s @@ -2363,7 +2467,7 @@ steps: - initialize environment: REDIS_URL: redis://redis:6379/0 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: redis-integration-tests - commands: - dockerize -wait tcp://memcached:11211 -timeout 120s @@ -2372,7 +2476,7 @@ steps: - initialize environment: MEMCACHED_HOSTS: memcached:11211 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: memcached-integration-tests trigger: event: @@ -2417,7 +2521,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -2492,7 +2596,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2570,7 +2674,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2631,7 +2735,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2710,7 +2814,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2772,7 +2876,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2808,7 +2912,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2851,11 +2955,11 @@ steps: - ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl gen-version ${DRONE_TAG} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2877,7 +2981,7 @@ steps: environment: NPM_TOKEN: from_secret: npm_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: release-npm-packages trigger: event: @@ -2903,7 +3007,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2966,7 +3070,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2978,7 +3082,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} @@ -2986,7 +3090,7 @@ steps: depends_on: - initialize environment: {} - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id @@ -2995,8 +3099,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin depends_on: @@ -3004,13 +3117,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# It is required that the generated Typescript be in sync with the input CUE @@ -3023,7 +3136,7 @@ steps: - ./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . --diff depends_on: - validate-scuemata - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise @@ -3032,6 +3145,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages environment: GITHUB_TOKEN: from_secret: github_token @@ -3043,14 +3157,14 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: package - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition oss --shouldSave @@ -3082,11 +3196,12 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -3161,9 +3276,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - ./bin/grabpl upload-cdn --edition oss --src-bucket "grafana-static-assets" @@ -3217,7 +3333,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3229,7 +3345,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - |- @@ -3243,13 +3359,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition oss @@ -3257,7 +3373,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -3268,19 +3384,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition oss depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition oss depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -3288,7 +3404,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-frontend trigger: ref: @@ -3331,7 +3447,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3343,7 +3459,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -3358,7 +3474,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -3373,7 +3489,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: mysql-integration-tests trigger: ref: @@ -3408,7 +3524,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -3456,7 +3572,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3471,7 +3587,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -3487,7 +3603,7 @@ steps: depends_on: - clone-enterprise environment: {} - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER} @@ -3495,7 +3611,7 @@ steps: depends_on: - initialize environment: {} - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition enterprise --build-id @@ -3504,8 +3620,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition enterprise --build-id + ${DRONE_BUILD_NUMBER} --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin @@ -3514,13 +3639,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# It is required that the generated Typescript be in sync with the input CUE @@ -3533,15 +3658,15 @@ steps: - ./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . --diff depends_on: - validate-scuemata - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER} - --variants linux-x64 --no-pull-enterprise + --variants linux-amd64 --no-pull-enterprise depends_on: - initialize environment: {} - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-backend-enterprise2 - commands: - ./bin/grabpl package --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER} @@ -3550,6 +3675,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages - build-backend-enterprise2 environment: GITHUB_TOKEN: @@ -3562,14 +3688,14 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: package - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition enterprise --shouldSave @@ -3601,12 +3727,13 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 RUNDIR: scripts/grafana-server/tmp-grafana-enterprise - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -3681,9 +3808,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - ./bin/grabpl upload-cdn --edition enterprise --src-bucket "grafana-static-assets" @@ -3709,11 +3837,12 @@ steps: name: upload-packages - commands: - ./bin/grabpl package --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER} - --no-pull-enterprise --variants linux-x64 --sign + --no-pull-enterprise --variants linux-amd64 --sign depends_on: - build-plugins - build-backend - build-frontend + - build-frontend-packages - build-backend-enterprise2 environment: GITHUB_TOKEN: @@ -3726,7 +3855,7 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: package-enterprise2 - commands: - ./bin/grabpl upload-cdn --edition enterprise2 --src-bucket "grafana-static-assets" @@ -3781,7 +3910,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3796,7 +3925,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -3812,7 +3941,7 @@ steps: depends_on: - clone-enterprise environment: {} - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - |- @@ -3826,13 +3955,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition enterprise @@ -3840,7 +3969,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -3851,19 +3980,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition enterprise depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition enterprise depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -3871,7 +4000,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-frontend - commands: - ./bin/grabpl lint-backend --edition enterprise2 @@ -3879,19 +4008,19 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: lint-backend-enterprise2 - commands: - ./bin/grabpl test-backend --edition enterprise2 depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-enterprise2 - commands: - ./bin/grabpl integration-tests --edition enterprise2 depends_on: - initialize - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: test-backend-integration-enterprise2 trigger: ref: @@ -3944,7 +4073,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3959,7 +4088,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -3975,7 +4104,7 @@ steps: depends_on: - clone-enterprise environment: {} - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -3990,7 +4119,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -4005,7 +4134,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: mysql-integration-tests - commands: - dockerize -wait tcp://redis:6379/0 -timeout 120s @@ -4014,7 +4143,7 @@ steps: - initialize environment: REDIS_URL: redis://redis:6379/0 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: redis-integration-tests - commands: - dockerize -wait tcp://memcached:11211 -timeout 120s @@ -4023,7 +4152,7 @@ steps: - initialize environment: MEMCACHED_HOSTS: memcached:11211 - image: grafana/build-container:1.5.1 + image: grafana/build-container:1.5.3 name: memcached-integration-tests trigger: ref: @@ -4062,7 +4191,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.5/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.25/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -4259,6 +4388,6 @@ kind: secret name: gcp_upload_artifacts_key --- kind: signature -hmac: 2990e0351ffd3bf432e64621ec7d82ffd619ab8cf0aa0e3c648f54392c5f0e6e +hmac: 62bc3b786fa1499c0524bc15ca374d8190dbe797d1d72817ac1cca9532205ed8 ... diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index debee02c499..38c56c50106 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -4,7 +4,7 @@ on: inputs: version: required: true - default: '7.x.x' + default: '8.x.x' workflow_call: inputs: version_call: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a85334d4ec..75e6acb70bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ + + +# 8.4.3 (2022-03-02) + +### Features and enhancements + +- **Alerting:** Grafana uses > instead of >= when checking the For duration. [#46010](https://github.com/grafana/grafana/issues/46010) +- **Alerting:** Use expanded labels in dashboard annotations. [#45726](https://github.com/grafana/grafana/pull/45726), [@grobinson-grafana](https://github.com/grobinson-grafana) +- **Logs:** Escape windows newline into single newline. [#45771](https://github.com/grafana/grafana/pull/45771), [@perosb](https://github.com/perosb) + +### Bug fixes + +- **Alerting:** Fix use of > instead of >= when checking the For duration. [#46011](https://github.com/grafana/grafana/pull/46011), [@grobinson-grafana](https://github.com/grobinson-grafana) +- **Azure Monitor:** Fixes broken log queries that use workspace. [#45820](https://github.com/grafana/grafana/pull/45820), [@sunker](https://github.com/sunker) +- **CloudWatch:** Remove error message when using multi-valued template vars in region field. [#45886](https://github.com/grafana/grafana/pull/45886), [@sunker](https://github.com/sunker) +- **Middleware:** Fix IPv6 host parsing in CSRF check. [#45911](https://github.com/grafana/grafana/pull/45911), [@ying-jeanne](https://github.com/ying-jeanne) + +### Plugin development fixes & changes + +- **ClipboardButton:** Use a fallback when the Clipboard API is unavailable. [#45831](https://github.com/grafana/grafana/pull/45831), [@ashharrison90](https://github.com/ashharrison90) + + # 8.4.2 (2022-02-23) diff --git a/Dockerfile b/Dockerfile index 20aa6b5b3e1..711dc84fb05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ COPY emails emails ENV NODE_ENV production RUN yarn build -FROM golang:1.17.7-alpine3.15 as go-builder +FROM golang:1.17.8-alpine3.15 as go-builder RUN apk add --no-cache gcc g++ make diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 4c3f2325a8f..a8c2760a639 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -21,7 +21,7 @@ COPY emails emails ENV NODE_ENV production RUN yarn build -FROM golang:1.17.7 AS go-builder +FROM golang:1.17.8 AS go-builder WORKDIR /src/grafana diff --git a/conf/defaults.ini b/conf/defaults.ini index ad610c4d112..722c6a480cd 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -122,7 +122,7 @@ path = grafana.db # For "sqlite3" only. cache mode setting used for connecting to the database cache_mode = private -# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0. +# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0. locking_attempt_timeout_sec = 0 #################################### Cache server ############################# @@ -561,6 +561,7 @@ ldap_sync_ttl = 60 sync_ttl = 60 whitelist = headers = +headers_encoded = false enable_login_token = false #################################### Auth JWT ########################## diff --git a/conf/sample.ini b/conf/sample.ini index 9f1e822933d..71abc3ac3fa 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -123,7 +123,7 @@ # For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared) ;cache_mode = private -# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0. +# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0. ;locking_attempt_timeout_sec = 0 ################################### Data sources ######################### @@ -542,6 +542,8 @@ ;sync_ttl = 60 ;whitelist = 192.168.1.1, 192.168.2.1 ;headers = Email:X-User-Email, Name:X-User-Name +# Non-ASCII strings in header values are encoded using quoted-printable encoding +;headers_encoded = false # Read the auth proxy docs for details on what the setting below enables ;enable_login_token = false diff --git a/devenv/dev-dashboards/feature-templating/templating-dashboard-links-and-variables.json b/devenv/dev-dashboards/feature-templating/templating-dashboard-links-and-variables.json index f5751ec42f5..ab94db3f055 100644 --- a/devenv/dev-dashboards/feature-templating/templating-dashboard-links-and-variables.json +++ b/devenv/dev-dashboards/feature-templating/templating-dashboard-links-and-variables.json @@ -16,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": null, - "iteration": 1601526910610, + "iteration": 1646409057541, "links": [ { "icon": "external link", @@ -73,6 +73,61 @@ "timeShift": null, "title": "${custom.text}", "type": "text" + }, + { + "id": 4, + "gridPos": { + "h": 9, + "w": 9, + "x": 12, + "y": 0 + }, + "type": "stat", + "title": "Panel Title", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "color": { + "mode": "thresholds" + }, + "links": [ + { + "title": "Var Link", + "url": "/d/vmie2cmWz/bar-gauge-demo?var-custom=$custom" + } + ] + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "lastNotNull" + ], + "fields": "" + }, + "orientation": "auto", + "textMode": "auto", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "pluginVersion": "8.5.0-pre", + "datasource": null } ], "schemaVersion": 26, @@ -112,6 +167,11 @@ "selected": false, "text": "p3", "value": "p3" + }, + { + "selected": false, + "text": "p4", + "value": "test%25value" } ], "query": "p1,p2,p3", diff --git a/docs/sources/administration/configuration.md b/docs/sources/administration/configuration.md index a5f6fab22eb..7e66ccdf428 100644 --- a/docs/sources/administration/configuration.md +++ b/docs/sources/administration/configuration.md @@ -361,6 +361,8 @@ Defaults to `private`. ## [remote_cache] +Caches authentication details and session information in the configured database, Redis or Memcached. This setting does not configure [Query Caching in Grafana Enterprise]({{< relref "../enterprise/query-caching.md" >}}). + ### type Either `redis`, `memcached`, or `database`. Defaults to `database` diff --git a/docs/sources/administration/preferences/change-grafana-name.md b/docs/sources/administration/preferences/change-grafana-name.md index 69d4394a8e2..7924ffcc2b4 100644 --- a/docs/sources/administration/preferences/change-grafana-name.md +++ b/docs/sources/administration/preferences/change-grafana-name.md @@ -53,4 +53,4 @@ To change the team name or email, follow these steps: ## Change user name or email -To learn how to edit your user information, refer to [Grafana user account profile]({{< relref "../../manage-users/user-admin/user-profile.md" >}}). +To learn how to edit your user information, refer to [Edit your profile]({{< relref "../manage-user-preferences/_index.md#edit-your-profile" >}}). diff --git a/docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md b/docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md index e7b634905c5..0b88bb1b866 100644 --- a/docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md +++ b/docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md @@ -11,7 +11,7 @@ Annotations and labels are key value pairs associated with alerts originating fr ## Annotations -Annotations are key-value pairs that provide additional meta-information about an alert. For example: a description, a summary, and runbook URL. These are displayed in rule and alert details in the UI and can be used in contact point message templates. +Annotations are key-value pairs that provide additional meta-information about an alert. You can use the following annotations: `description`, `summary`, `runbook_url`, `alertId`, `dashboardUid`, and `panelId`. For example, a description, a summary, and a runbook URL. These are displayed in rule and alert details in the UI and can be used in contact point message templates. ## Labels diff --git a/docs/sources/auth/auth-proxy.md b/docs/sources/auth/auth-proxy.md index b01a2efb451..13d6c092214 100755 --- a/docs/sources/auth/auth-proxy.md +++ b/docs/sources/auth/auth-proxy.md @@ -32,6 +32,8 @@ whitelist = # Optionally define more headers to sync other user attributes # Example `headers = Name:X-WEBAUTH-NAME Role:X-WEBAUTH-ROLE Email:X-WEBAUTH-EMAIL Groups:X-WEBAUTH-GROUPS` headers = +# Non-ASCII strings in header values are encoded using quoted-printable encoding +;headers_encoded = false # Check out docs on this for more details on the below setting enable_login_token = false ``` diff --git a/docs/sources/auth/ldap.md b/docs/sources/auth/ldap.md index 15b3f29cbd3..a289fc12038 100644 --- a/docs/sources/auth/ldap.md +++ b/docs/sources/auth/ldap.md @@ -68,7 +68,7 @@ ssl_skip_verify = false bind_dn = "cn=admin,dc=grafana,dc=org" # Search user bind password # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" -bind_password = 'grafana' +bind_password = "grafana" # User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)" # Allow login from email or username, example "(|(sAMAccountName=%s)(userPrincipalName=%s))" @@ -236,7 +236,7 @@ use_ssl = false start_tls = false ssl_skip_verify = false bind_dn = "cn=admin,dc=grafana,dc=org" -bind_password = 'grafana' +bind_password = "grafana" search_filter = "(cn=%s)" search_base_dns = ["dc=grafana,dc=org"] @@ -263,7 +263,7 @@ use_ssl = false start_tls = false ssl_skip_verify = false bind_dn = "cn=admin,dc=grafana,dc=org" -bind_password = 'grafana' +bind_password = "grafana" search_filter = "(cn=%s)" search_base_dns = ["ou=users,dc=grafana,dc=org"] @@ -286,7 +286,7 @@ start_tls = false ssl_skip_verify = false bind_dn = "cn=admin,dc=grafana,dc=org" -bind_password = 'grafana' +bind_password = "grafana" search_filter = "(cn=%s)" search_base_dns = ["ou=users,dc=grafana,dc=org"] diff --git a/docs/sources/dashboards/time-range-controls.md b/docs/sources/dashboards/time-range-controls.md index 0aa3d7208c0..7b85ec078c1 100644 --- a/docs/sources/dashboards/time-range-controls.md +++ b/docs/sources/dashboards/time-range-controls.md @@ -36,7 +36,7 @@ Here are some examples: ### Note about Grafana alerting -For Grafana alerting, we do not support are the following syntaxes at this time. +For Grafana alerting, we do not support the following syntaxes at this time. - now+n for future timestamps. - now-1n/n for "start of n until end of n" since this is an absolute timestamp. diff --git a/docs/sources/datasources/aws-cloudwatch/_index.md b/docs/sources/datasources/aws-cloudwatch/_index.md index 7311be8cec5..22833348ea2 100644 --- a/docs/sources/datasources/aws-cloudwatch/_index.md +++ b/docs/sources/datasources/aws-cloudwatch/_index.md @@ -26,7 +26,77 @@ For authentication options and configuration details, see [AWS authentication]({ Grafana needs permissions granted via IAM to be able to read CloudWatch metrics and EC2 tags/instances/regions/alarms. You can attach these permissions to the IAM role or IAM user configured in the previous step. -Here is a minimal policy example: +##### Metrics only example: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowReadingMetricsFromCloudWatch", + "Effect": "Allow", + "Action": [ + "cloudwatch:DescribeAlarmsForMetric", + "cloudwatch:DescribeAlarmHistory", + "cloudwatch:DescribeAlarms", + "cloudwatch:ListMetrics", + "cloudwatch:GetMetricData", + "cloudwatch:GetInsightRuleReport" + ], + "Resource": "*" + }, + { + "Sid": "AllowReadingTagsInstancesRegionsFromEC2", + "Effect": "Allow", + "Action": ["ec2:DescribeTags", "ec2:DescribeInstances", "ec2:DescribeRegions"], + "Resource": "*" + }, + { + "Sid": "AllowReadingResourcesForTags", + "Effect": "Allow", + "Action": "tag:GetResources", + "Resource": "*" + } + ] +} +``` + +##### Logs only example: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowReadingLogsFromCloudWatch", + "Effect": "Allow", + "Action": [ + "logs:DescribeLogGroups", + "logs:GetLogGroupFields", + "logs:StartQuery", + "logs:StopQuery", + "logs:GetQueryResults", + "logs:GetLogEvents" + ], + "Resource": "*" + }, + { + "Sid": "AllowReadingTagsInstancesRegionsFromEC2", + "Effect": "Allow", + "Action": ["ec2:DescribeTags", "ec2:DescribeInstances", "ec2:DescribeRegions"], + "Resource": "*" + }, + { + "Sid": "AllowReadingResourcesForTags", + "Effect": "Allow", + "Action": "tag:GetResources", + "Resource": "*" + } + ] +} +``` + +##### Metrics and Logs example: ```json { @@ -40,7 +110,6 @@ Here is a minimal policy example: "cloudwatch:DescribeAlarmHistory", "cloudwatch:DescribeAlarms", "cloudwatch:ListMetrics", - "cloudwatch:GetMetricStatistics", "cloudwatch:GetMetricData", "cloudwatch:GetInsightRuleReport" ], diff --git a/docs/sources/developers/plugins/add-authentication-for-data-source-plugins.md b/docs/sources/developers/plugins/add-authentication-for-data-source-plugins.md index c4a8e4e0bda..4cb9c2bbc0b 100644 --- a/docs/sources/developers/plugins/add-authentication-for-data-source-plugins.md +++ b/docs/sources/developers/plugins/add-authentication-for-data-source-plugins.md @@ -303,4 +303,16 @@ func (ds *dataSource) QueryData(ctx context.Context, req *backend.QueryDataReque } ``` +In addition, if the user's token includes an ID token, Grafana will pass the user's ID token to the plugin in an `X-ID-Token` header, available on the `QueryDataRequest` object on the `QueryData` request in your backend data source. + +```go +func (ds *dataSource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) { + idToken := req.Headers["X-ID-Token"] + + for _, q := range req.Queries { + // ... + } +} +``` + > **Note:** Due to a bug in Grafana, using this feature with PostgreSQL can cause a deadlock. For more information, refer to [Grafana causes deadlocks in PostgreSQL, while trying to refresh users token](https://github.com/grafana/grafana/issues/20515). diff --git a/docs/sources/developers/plugins/migration-guide.md b/docs/sources/developers/plugins/migration-guide.md index 7f6056af876..6bc76e47e6e 100644 --- a/docs/sources/developers/plugins/migration-guide.md +++ b/docs/sources/developers/plugins/migration-guide.md @@ -12,31 +12,42 @@ This guide helps you identify the steps you need to take based on the Grafana ve ## Table of contents -- [From version 8.3.x to 8.4.x](#from-version-83x-to-84x) - - [Value Mapping Editor has been removed from @grafana-ui library](#value-mapping-editor-has-been-removed-from-grafana-ui-library) - - [Thresholds Editor has been removed from @grafana-ui library](#thresholds-editor-has-been-removed-from-grafana-ui-library) - - [8.4 Deprecations](#84-deprecations) - - [LocationService replaces getLocationSrv](#locationservice-replaces-getlocationsrv) -- [From version 7.x.x to 8.x.x](#from-version-7xx-to-8xx) - - [Backend plugin v1 support has been dropped](#backend-plugin-v1-support-has-been-dropped) - - [1. Add dependency on grafana-plugin-sdk-go](#1-add-dependency-on-grafana-plugin-sdk-go) - - [2. Update the way you bootstrap your plugin](#2-update-the-way-you-bootstrap-your-plugin) - - [3. Update the plugin package](#3-update-the-plugin-package) - - [Sign and load backend plugins](#sign-and-load-backend-plugins) - - [Update react-hook-form from v6 to v7](#update-react-hook-form-from-v6-to-v7) - - [Update the plugin.json](#update-the-pluginjson) - - [Update imports to match emotion 11](#update-imports-to-match-emotion-11) - - [8.0 Deprecations](#80-deprecations) - - [Grafana theme v1](#grafana-theme-v1) -- [From version 6.2.x to 7.4.0](#from-version-62x-to-740) - - [Legend components](#legend-components) -- [From version 6.x.x to 7.0.0](#from-version-6xx-to-700) - - [What's new in Grafana 7.0?](#whats-new-in-grafana-70) - - [Migrate a plugin from Angular to React](#migrate-a-plugin-from-angular-to-react) - - [Migrate a panel plugin](#migrate-a-panel-plugin) - - [Migrate a data source plugin](#migrate-a-data-source-plugin) - - [Migrate to data frames](#migrate-to-data-frames) - - [Troubleshoot plugin migration](#troubleshoot-plugin-migration) +- [Plugin migration guide](#plugin-migration-guide) + - [Introduction](#introduction) + - [Table of contents](#table-of-contents) + - [From version 8.3.x to 8.4.x](#from-version-83x-to-84x) + - [Value Mapping Editor has been removed from @grafana-ui library](#value-mapping-editor-has-been-removed-from-grafana-ui-library) + - [Thresholds Editor has been removed from @grafana-ui library](#thresholds-editor-has-been-removed-from-grafana-ui-library) + - [8.4 deprecations](#84-deprecations) + - [LocationService replaces getLocationSrv](#locationservice-replaces-getlocationsrv) + - [From version 7.x.x to 8.x.x](#from-version-7xx-to-8xx) + - [Backend plugin v1 support has been dropped](#backend-plugin-v1-support-has-been-dropped) + - [1. Add dependency on grafana-plugin-sdk-go](#1-add-dependency-on-grafana-plugin-sdk-go) + - [2. Update the way you bootstrap your plugin](#2-update-the-way-you-bootstrap-your-plugin) + - [3. Update the plugin package](#3-update-the-plugin-package) + - [Sign and load backend plugins](#sign-and-load-backend-plugins) + - [Update react-hook-form from v6 to v7](#update-react-hook-form-from-v6-to-v7) + - [Update the plugin.json](#update-the-pluginjson) + - [Update imports to match emotion 11](#update-imports-to-match-emotion-11) + - [Update needed for app plugins using dashboards](#update-needed-for-app-plugins-using-dashboards) + - [8.0 deprecations](#80-deprecations) + - [Grafana theme v1](#grafana-theme-v1) + - [From version 6.2.x to 7.4.0](#from-version-62x-to-740) + - [Legend components](#legend-components) + - [From version 6.5.x to 7.3.0](#from-version-65x-to-730) + - [getColorForTheme changes](#getcolorfortheme-changes) + - [From version 6.x.x to 7.0.0](#from-version-6xx-to-700) + - [What's new in Grafana 7.0?](#whats-new-in-grafana-70) + - [New data format](#new-data-format) + - [Improved TypeScript support](#improved-typescript-support) + - [Grafana Toolkit](#grafana-toolkit) + - [Field options](#field-options) + - [Backend plugins](#backend-plugins) + - [Migrate a plugin from Angular to React](#migrate-a-plugin-from-angular-to-react) + - [Migrate a panel plugin](#migrate-a-panel-plugin) + - [Migrate a data source plugin](#migrate-a-data-source-plugin) + - [Migrate to data frames](#migrate-to-data-frames) + - [Troubleshoot plugin migration](#troubleshoot-plugin-migration) ## From version 8.3.x to 8.4.x @@ -308,6 +319,42 @@ import { cx, css } from 'emotion'; import { cx, css } from '@emotion/css'; ``` +### Update needed for app plugins using dashboards + +To make side navigation work properly - app plugins targeting Grafana `8.+` and integrating into the side menu via [addToNav]({{< relref "metadata.md#properties-4" >}}) property need to adjust their `plugin.json` and all dashboard json files to have a matching `uid`. + +**`plugin.json`** + +```json "linenos=inline,hl_lines=7,linenostart=1" +{ + "id": "plugin-id", + // ... + "includes": [ + { + "type": "dashboard", + "name": "(Team) Situation Overview", + "path": "dashboards/example-dashboard.json", + "addToNav": true, + "defaultNav": false, + "uid": "l3KqBxCMz" + } + ] + // ... +} +``` + +**`dashboards/example-dashboard.json`** + +```json +{ + // ... + "title": "Example Dashboard", + "uid": "l3KqBxCMz", + "version": 1 + // ... +} +``` + ### 8.0 deprecations #### Grafana theme v1 diff --git a/docs/sources/developers/plugins/sign-a-plugin.md b/docs/sources/developers/plugins/sign-a-plugin.md index 9138ae8644e..d8db5c53798 100644 --- a/docs/sources/developers/plugins/sign-a-plugin.md +++ b/docs/sources/developers/plugins/sign-a-plugin.md @@ -32,9 +32,9 @@ To verify ownership of your plugin, you need to generate an API key that you'll Public plugins need to be reviewed by the Grafana team before you can sign them. -1. Submit your plugin for review by creating a pull request in the [grafana-plugin-repository](https://github.com/grafana/grafana-plugin-repository). -1. When your plugin is approved, you're granted a plugin signature level. **Without a plugin signature level, you won't be able to sign your plugin**. -1. In your plugin directory, sign the plugin with the API key you just created. Grafana Toolkit creates a [MANIFEST.txt](#plugin-manifest) file in the `dist` directory of your plugin. +1. Submit your plugin for [review]({{< relref "package-a-plugin.md#publishing-your-plugin-for-the-first-time" >}}) +2. When your plugin is approved, you're granted a plugin signature level. **Without a plugin signature level, you won't be able to sign your plugin**. +3. In your plugin directory, sign the plugin with the API key you just created. Grafana Toolkit creates a [MANIFEST.txt](#plugin-manifest) file in the `dist` directory of your plugin. ```bash export GRAFANA_API_KEY= diff --git a/docs/sources/enterprise/enterprise-encryption/using-aws-kms-to-encrypt-database-secrets.md b/docs/sources/enterprise/enterprise-encryption/using-aws-kms-to-encrypt-database-secrets.md index b91655c753c..9cf0cd04040 100644 --- a/docs/sources/enterprise/enterprise-encryption/using-aws-kms-to-encrypt-database-secrets.md +++ b/docs/sources/enterprise/enterprise-encryption/using-aws-kms-to-encrypt-database-secrets.md @@ -23,7 +23,7 @@ You can use an encryption key from AWS Key Management Service to encrypt secrets 3. Create a [programmatic credential](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) (access key ID and secret access key), which has permission to view the key that you created.

In AWS, you can control access to your KMS keys by using [key policies](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html), [IAM policies](https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html), and [grants](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html). You can also create [temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html), which must provide a session token along with an access key ID and a secret access key. -4. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/envelope-encryption.md" >}}). +4. From within Grafana, turn on [envelope encryption]({{< relref "../../administration//database-encryption.md" >}}). 5. Add your AWS KMS details to the Grafana configuration file; depending on your operating system, it is usually named `grafana.ini`:

a. Add a new section to the configuration file, with a name in the format of `[security.encryption.awskms.]`, where `` is any name that uniquely identifies this key among other provider keys.

b. Fill in the section with the following values: diff --git a/docs/sources/enterprise/enterprise-encryption/using-azure-key-vault-to-encrypt-database-secrets.md b/docs/sources/enterprise/enterprise-encryption/using-azure-key-vault-to-encrypt-database-secrets.md index 8747fa81394..489649f24cd 100644 --- a/docs/sources/enterprise/enterprise-encryption/using-azure-key-vault-to-encrypt-database-secrets.md +++ b/docs/sources/enterprise/enterprise-encryption/using-azure-key-vault-to-encrypt-database-secrets.md @@ -24,7 +24,7 @@ You can use an encryption key from Azure Key Vault to encrypt secrets in the Gra 5. In the Key Permissions section, set encrypt and decrypt permissions, and click **Save**. -6. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/envelope-encryption.md" >}}). +6. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/database-encryption.md" >}}). 7. Add your Azure Key Vault details to the Grafana configuration file; depending on your operating system, is usually named `grafana.ini`:

a. Add a new section to the configuration file, with a name in the format of `[security.encryption.azurekv.]`, where `` is any name that uniquely identifies this key among other provider keys. diff --git a/docs/sources/enterprise/enterprise-encryption/using-google-cloud-kms-to-encrypt-database-secrets.md b/docs/sources/enterprise/enterprise-encryption/using-google-cloud-kms-to-encrypt-database-secrets.md index 0d66b4a89a4..0ef4491ce27 100644 --- a/docs/sources/enterprise/enterprise-encryption/using-google-cloud-kms-to-encrypt-database-secrets.md +++ b/docs/sources/enterprise/enterprise-encryption/using-google-cloud-kms-to-encrypt-database-secrets.md @@ -22,7 +22,7 @@ You can use an encryption key from Google Cloud Key Management Service to encryp 4. [Create a service account key and save its JSON file](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating) to you computer, for example, as `~/.config/gcloud/sample-project-credentials.json`. -5. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/envelope-encryption.md" >}}). +5. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/database-encryption.md" >}}). 6. Add your Google Cloud KMS details to the Grafana configuration file; depending on your operating system, is usually named `grafana.ini`:

a. Add a new section to the configuration file, with a name in the format of `[security.encryption.azurekv.]`, where `` is any name that uniquely identifies this key among other provider keys. diff --git a/docs/sources/enterprise/enterprise-encryption/using-hashicorp-key-vault-to-encrypt-database-secrets.md b/docs/sources/enterprise/enterprise-encryption/using-hashicorp-key-vault-to-encrypt-database-secrets.md index b09bd2d582b..83d843bbab2 100644 --- a/docs/sources/enterprise/enterprise-encryption/using-hashicorp-key-vault-to-encrypt-database-secrets.md +++ b/docs/sources/enterprise/enterprise-encryption/using-hashicorp-key-vault-to-encrypt-database-secrets.md @@ -20,7 +20,7 @@ You can use an encryption key from Hashicorp Vault to encrypt secrets in the Gra 3. [Create a periodic service token](https://learn.hashicorp.com/tutorials/vault/tokens#periodic-service-tokens). -4. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/envelope-encryption.md" >}}). +4. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/database-encryption.md" >}}). 5. Add your Hashicorp Vault details to the Grafana configuration file; depending on your operating system, is usually named `grafana.ini`:

a. Add a new section to the configuration file, with a name in the format of `[security.encryption.hashicorpvault.]`, where `` is any name that uniquely identifies this key among other provider keys. diff --git a/docs/sources/panels/library-panels/_index.md b/docs/sources/panels/library-panels/_index.md index 4faa00668ef..8b78baf7eb8 100644 --- a/docs/sources/panels/library-panels/_index.md +++ b/docs/sources/panels/library-panels/_index.md @@ -1,6 +1,6 @@ +++ title = "Create reusable Grafana panels" -aliases = ["/docs/grafana/latest/panels/panel-library/" "/docs/sources/panels/library-panels/"] +aliases = ["/docs/grafana/latest/panels/panel-library/", "/docs/sources/panels/library-panels/"] weight = 700 +++ diff --git a/docs/sources/release-notes/_index.md b/docs/sources/release-notes/_index.md index 8cb3c83df60..5b4dca9698b 100644 --- a/docs/sources/release-notes/_index.md +++ b/docs/sources/release-notes/_index.md @@ -8,6 +8,7 @@ weight = 10000 Here you can find detailed release notes that list everything that is included in every release as well as notices about deprecations, breaking changes as well as changes that relate to plugin development. +- [Release notes for 8.4.3]({{< relref "release-notes-8-4-3" >}}) - [Release notes for 8.4.2]({{< relref "release-notes-8-4-2" >}}) - [Release notes for 8.4.1]({{< relref "release-notes-8-4-1" >}}) - [Release notes for 8.4.0-beta1]({{< relref "release-notes-8-4-0-beta1" >}}) diff --git a/docs/sources/release-notes/release-notes-8-4-3.md b/docs/sources/release-notes/release-notes-8-4-3.md new file mode 100644 index 00000000000..90f989988f3 --- /dev/null +++ b/docs/sources/release-notes/release-notes-8-4-3.md @@ -0,0 +1,25 @@ ++++ +title = "Release notes for Grafana 8.4.3" +hide_menu = true ++++ + + + +# Release notes for Grafana 8.4.3 + +### Features and enhancements + +- **Alerting:** Grafana uses > instead of >= when checking the For duration. [#46010](https://github.com/grafana/grafana/issues/46010) +- **Alerting:** Use expanded labels in dashboard annotations. [#45726](https://github.com/grafana/grafana/pull/45726), [@grobinson-grafana](https://github.com/grobinson-grafana) +- **Logs:** Escape windows newline into single newline. [#45771](https://github.com/grafana/grafana/pull/45771), [@perosb](https://github.com/perosb) + +### Bug fixes + +- **Alerting:** Fix use of > instead of >= when checking the For duration. [#46011](https://github.com/grafana/grafana/pull/46011), [@grobinson-grafana](https://github.com/grobinson-grafana) +- **Azure Monitor:** Fixes broken log queries that use workspace. [#45820](https://github.com/grafana/grafana/pull/45820), [@sunker](https://github.com/sunker) +- **CloudWatch:** Remove error message when using multi-valued template vars in region field. [#45886](https://github.com/grafana/grafana/pull/45886), [@sunker](https://github.com/sunker) +- **Middleware:** Fix IPv6 host parsing in CSRF check. [#45911](https://github.com/grafana/grafana/pull/45911), [@ying-jeanne](https://github.com/ying-jeanne) + +### Plugin development fixes & changes + +- **ClipboardButton:** Use a fallback when the Clipboard API is unavailable. [#45831](https://github.com/grafana/grafana/pull/45831), [@ashharrison90](https://github.com/ashharrison90) diff --git a/docs/sources/visualizations/node-graph.md b/docs/sources/visualizations/node-graph.md index 1f4ba8c435b..2545d108325 100644 --- a/docs/sources/visualizations/node-graph.md +++ b/docs/sources/visualizations/node-graph.md @@ -76,7 +76,7 @@ Click on the node and select "Show in Graph layout" option to switch back to gra This visualization needs a specific shape of the data to be returned from the data source in order to correctly display it. -Data source needs to return two data frames, one for nodes and one for edges, and you also have to set `frame.meta.preferredVisualisationType = 'nodeGraph'` on both data frames if you want them to be automatically shown in node graph in Explore. +Data source needs to return two data frames, one for nodes and one for edges. You have to set `frame.meta.preferredVisualisationType = 'nodeGraph'` on both data frames or name them `nodes` and `edges` respectively for the node graph to render. ### Node parameters diff --git a/e2e/dashboards-suite/dashboard-templating.spec.ts b/e2e/dashboards-suite/dashboard-templating.spec.ts index a7c4db01033..4a6187e4be1 100644 --- a/e2e/dashboards-suite/dashboard-templating.spec.ts +++ b/e2e/dashboards-suite/dashboard-templating.spec.ts @@ -27,7 +27,7 @@ e2e.scenario({ `Server:pipe = A'A"A|BB\\B|CCC`, `Server:distributed = A'A"A,Server=BB\\B,Server=CCC`, `Server:csv = A'A"A,BB\\B,CCC`, - `Server:html = A'A"A, BB\\B, CCC`, + `Server:html = A'A"A, BB\\B, CCC`, `Server:json = ["A'A\\"A","BB\\\\B","CCC"]`, `Server:percentencode = %7BA%27A%22A%2CBB%5CB%2CCCC%7D`, `Server:singlequote = 'A\\'A"A','BB\\B','CCC'`, diff --git a/e2e/dashboards-suite/templating-dashboard-links-and-variables.spec.ts b/e2e/dashboards-suite/templating-dashboard-links-and-variables.spec.ts index 39c87b73448..40f04467c75 100644 --- a/e2e/dashboards-suite/templating-dashboard-links-and-variables.spec.ts +++ b/e2e/dashboards-suite/templating-dashboard-links-and-variables.spec.ts @@ -31,7 +31,7 @@ e2e.scenario({ expect(links).to.have.length.greaterThan(13); for (let index = 0; index < links.length; index++) { - expect(Cypress.$(links[index]).attr('href')).contains(`var-custom=${variableValue}`); + expect(Cypress.$(links[index]).attr('href')).contains(`var-custom=${encodeURI(variableValue)}`); } }); }; @@ -45,6 +45,14 @@ e2e.scenario({ // verify all links, should have All value verifyLinks('All'); + // Data links should percent encode var values + e2e() + .get('[aria-label="Data link"]') + .should('exist') + .and((link) => { + expect(link.attr('href')).contains(encodeURI('test%25value')); + }); + e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click(); e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('p2').should('be.visible').click(); diff --git a/latest.json b/latest.json index 537d81c0610..360c9f7b7d9 100644 --- a/latest.json +++ b/latest.json @@ -1,4 +1,4 @@ { - "stable": "8.4.0", - "testing": "8.4.0" + "stable": "8.4.3", + "testing": "8.4.3" } diff --git a/package.json b/package.json index c431ca56cba..24d165828fd 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,8 @@ "e2e:dev": "./e2e/start-and-run-suite dev", "e2e:benchmark:live": "./e2e/start-and-run-suite benchmark live", "test": "jest --notify --watch", + "test:coverage": "jest --coverage", + "test:coverage:changes": "jest --coverage --changedSince=origin/main", "test:accessibility-report": "./scripts/generate-a11y-report.sh", "lint": "yarn run lint:ts && yarn run lint:sass", "lint:ts": "eslint . --ext .js,.tsx,.ts --cache", @@ -36,6 +38,7 @@ "packages:clean": "lerna run clean", "precommit": "yarn run lint-staged", "prettier:check": "prettier --check --list-different=false --loglevel=warn \"**/*.{scss,md,mdx}\"", + "prettier:checkDocs": "prettier --check --list-different=false --loglevel=warn \"docs/**.md\" \"packages/**.{ts,tsx,scss,md,mdx}\"", "prettier:write": "prettier --list-different \"**/*.{scss,md,mdx}\" --write", "start": "yarn themes:generate && yarn dev --watch", "start:noTsCheck": "yarn start --env noTsCheck=1", diff --git a/packages/grafana-data/src/dataframe/frameComparisons.ts b/packages/grafana-data/src/dataframe/frameComparisons.ts index 478bbbfff37..c4c6cb4dae9 100644 --- a/packages/grafana-data/src/dataframe/frameComparisons.ts +++ b/packages/grafana-data/src/dataframe/frameComparisons.ts @@ -60,6 +60,9 @@ export function compareDataFrameStructures(a: DataFrame, b: DataFrame, skipConfi return false; } + if (key === 'interval') { + continue; + } if (key === 'custom') { if (!shallowCompare(cfgA[key], cfgB[key])) { return false; diff --git a/packages/grafana-data/src/field/fieldOverrides.ts b/packages/grafana-data/src/field/fieldOverrides.ts index a2292847c2f..d6358395d80 100644 --- a/packages/grafana-data/src/field/fieldOverrides.ts +++ b/packages/grafana-data/src/field/fieldOverrides.ts @@ -1,7 +1,6 @@ import { ApplyFieldOverrideOptions, DataFrame, - DataLink, DisplayProcessor, DisplayValue, DynamicConfigValue, @@ -353,7 +352,7 @@ export const getLinksSupplier = const timeRangeUrl = locationUtil.getTimeRangeUrlParams(); const { timeField } = getTimeField(frame); - return field.config.links.map((link: DataLink) => { + return field.config.links.map((link) => { const variablesQuery = locationUtil.getVariablesUrlParams(); let dataFrameVars = {}; let valueVars = {}; @@ -439,7 +438,7 @@ export const getLinksSupplier = } let href = locationUtil.assureBaseUrl(link.url.replace(/\n/g, '')); - href = replaceVariables(href, variables); + href = replaceVariables(href, variables, encodeURIComponent); href = locationUtil.processUrl(href); const info: LinkModel = { diff --git a/packages/grafana-data/src/transformations/transformers/labelsToFields.ts b/packages/grafana-data/src/transformations/transformers/labelsToFields.ts index b203c6f6d91..f60e68cb86c 100644 --- a/packages/grafana-data/src/transformations/transformers/labelsToFields.ts +++ b/packages/grafana-data/src/transformations/transformers/labelsToFields.ts @@ -70,7 +70,7 @@ export const labelsToFieldsTransformer: SynchronousDataTransformerInfo extends PluginMeta { export class AppPlugin extends GrafanaPlugin> { // Content under: /a/${plugin-id}/* - root?: ComponentClass>; + root?: ComponentType>; rootNav?: NavModel; // Initial navigation model /** @@ -66,7 +66,7 @@ export class AppPlugin extends GrafanaPlugin> { * * NOTE: this structure will change in 7.2+ so that it is managed with a normal react router */ - setRootPage(root: ComponentClass>, rootNav?: NavModel) { + setRootPage(root: ComponentType>, rootNav?: NavModel) { this.root = root; this.rootNav = rootNav; return this; diff --git a/packages/grafana-data/src/types/plugin.ts b/packages/grafana-data/src/types/plugin.ts index e663be6a0d8..d2f027a1f92 100644 --- a/packages/grafana-data/src/types/plugin.ts +++ b/packages/grafana-data/src/types/plugin.ts @@ -1,4 +1,4 @@ -import { ComponentClass } from 'react'; +import { ComponentType } from 'react'; import { KeyValue } from './data'; /** Describes plugins life cycle status */ @@ -159,7 +159,7 @@ export interface PluginConfigPage { icon?: string; id: string; // Unique, in URL - body: ComponentClass>; + body: ComponentType>; } export class GrafanaPlugin { diff --git a/packages/grafana-ui/src/components/Card/Card.mdx b/packages/grafana-ui/src/components/Card/Card.mdx index e3364418c5a..0d1b1aaa386 100644 --- a/packages/grafana-ui/src/components/Card/Card.mdx +++ b/packages/grafana-ui/src/components/Card/Card.mdx @@ -126,7 +126,7 @@ Tags can be rendered inside the Card, by being wrapped in `Card.Tags` component. ### As a link -Card can be used as a clickable link item by specifying `href` prop. In this case the Card's content will be rendered inside `a`. +Card can be used as a clickable link item by specifying `href` prop. ```jsx @@ -142,6 +142,45 @@ Card can be used as a clickable link item by specifying `href` prop. In this cas +### As a button + +Card can be used as a clickable buttons item by specifying `onClick` prop. + +```jsx + alert('Hello, Grafana!')}> + Hello, Grafana + Clicking this card will create an alert + +``` + + + alert('Hello, Grafana!')}> + Hello, Grafana + Clicking this card will create an alert + + + +> **Note**: When used in conjunction with [Metadata elements](#multiple-metadata-elements), clicking on any element +> inside `` will prevent the card action to be executed (either `href` to be followed or `onClick` to be called). +> +> Example: + +```jsx + alert('Hello, Grafana!')}> + Hello, Grafana + Clicking on this text (Meta) WILL NOT trigger the alert! + Clicking on this text (Description) WILL trigger the alert! + +``` + + + alert('Hello, Grafana!')}> + Hello, Grafana + Clicking on this text (Meta) WILL NOT trigger the alert! + Clicking on this text (Description) WILL trigger the alert! + + + ### Inside a list item To render cards in a list, it is possible to nest them inside `li` items. diff --git a/packages/grafana-ui/src/components/Card/Card.tsx b/packages/grafana-ui/src/components/Card/Card.tsx index 92466b9315e..424a93481f5 100644 --- a/packages/grafana-ui/src/components/Card/Card.tsx +++ b/packages/grafana-ui/src/components/Card/Card.tsx @@ -256,6 +256,7 @@ const getMetaStyles = (theme: GrafanaTheme2) => ({ margin: theme.spacing(0.5, 0, 0), lineHeight: theme.typography.bodySmall.lineHeight, overflowWrap: 'anywhere', + zIndex: 0, }), separator: css({ margin: `0 ${theme.spacing(1)}`, diff --git a/packages/grafana-ui/src/components/DataLinks/DataLinksContextMenu.tsx b/packages/grafana-ui/src/components/DataLinks/DataLinksContextMenu.tsx index 7eb4714a71b..2756b65ae41 100644 --- a/packages/grafana-ui/src/components/DataLinks/DataLinksContextMenu.tsx +++ b/packages/grafana-ui/src/components/DataLinks/DataLinksContextMenu.tsx @@ -60,7 +60,7 @@ export const DataLinksContextMenu: React.FC = ({ chil onClick={linkModel.onClick} target={linkModel.target} title={linkModel.title} - style={{ display: 'flex' }} + style={{ display: 'flex', width: '100%' }} aria-label={selectors.components.DataLinksContextMenu.singleLink} > {children({})} diff --git a/packages/grafana-ui/src/components/DataSourceSettings/CertificationKey.tsx b/packages/grafana-ui/src/components/DataSourceSettings/CertificationKey.tsx index 1b8406ca8ff..56e238464a8 100644 --- a/packages/grafana-ui/src/components/DataSourceSettings/CertificationKey.tsx +++ b/packages/grafana-ui/src/components/DataSourceSettings/CertificationKey.tsx @@ -3,6 +3,7 @@ import { Input } from '../Input/Input'; import { Button } from '../Button'; import { TextArea } from '../TextArea/TextArea'; import { InlineField } from '../Forms/InlineField'; +import { InlineFieldRow } from '../Forms/InlineFieldRow'; interface Props { label: string; @@ -15,17 +16,19 @@ interface Props { export const CertificationKey: FC = ({ hasCert, label, onChange, onClick, placeholder }) => { return ( - - {hasCert ? ( - <> - - - - ) : ( -