The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Find a file
Roberto Jiménez Sánchez fa5ae0753d
Provisioning: Handle folder metadata deletion in incremental sync (#120865)
* Provisioning: Handle _folder.json deletion in incremental sync

When a _folder.json is deleted during incremental sync, the folder now
transitions from a stable UID (metadata.name) back to a hash-derived
UID. The sync detects the deletion, creates the folder with the new
hash-based UID, re-parents all direct children, and deletes the old
folder. This mirrors the UID-change handling added in the parent PR
but is triggered by metadata file removal.

Key changes:
- planFolderMetadataChanges: also scans for FileActionDeleted on
  _folder.json files. When the directory still exists in git, computes
  the hash-based UID via ParseFolder and emits synthetic child updates
  for re-parenting. When the directory is gone, skips the transition
  (orphan cleanup handles it).
- applyIncrementalChanges: extends the IsFolderMetadataFile guard to
  handle all actions (not just Created/Updated), so deleted metadata
  files are properly skipped instead of reaching RemoveResourceFromFile.
- Unit tests cover planning (UID transition, directory gone, folder not
  in Grafana, same UID, dedup, List error) and full flow (re-parenting
  + old folder deletion, apply-phase skip).
- Integration tests cover simple deletion, nested child folder, and
  combined deletion + dashboard update.

Made-with: Cursor

* Add integration test for re-parenting all direct children on metadata deletion

Adds a test case that verifies multiple dashboards (3) and a sub-folder
are all correctly re-parented from the old stable UID to the new
hash-derived UID when _folder.json is deleted. The test explicitly
asserts the grafana.app/folder annotation on both the child folder
and every dashboard before and after the deletion.

Made-with: Cursor

* Fix gofmt alignment in integration test map literals

Made-with: Cursor
2026-03-21 14:59:14 +01:00
.changelog-archive Update dependency prettier to v3.6.2 (#108689) 2025-07-25 17:47:44 +01:00
.citools Go: Update to 1.25.8 (#119692) 2026-03-06 10:27:09 +01:00
.github Viz: Delete the Graph portion of the grafana-ui graveyard (#119422) 2026-03-20 08:35:15 -05:00
.husky Chore: Remove colours from old husky cleanup pre-commit hook (#73395) 2023-08-18 13:10:18 +00:00
.vim Chore: Upgrade yarn and editor sdks (#42847) 2021-12-08 14:40:24 +01:00
.vscode Chore: Move betterer eslint rules to use eslint suppressions (#106267) 2025-09-04 10:47:13 +01:00
.yarn chore(deps): update dependency storybook to v8.6.17 [security] (#120651) 2026-03-19 12:58:01 +01:00
apps Alerting: Promote notifications.alerting.grafana.app resources to v1beta1 (#120738) 2026-03-21 00:00:43 +01:00
conf AuthZ: Introduce IAM client as a dependency to roles registrations (#119597) 2026-03-18 17:32:46 +01:00
contribute Update docs to be clearer about sqlite recommendation. Fix Makefile n… (#119591) 2026-03-05 11:07:12 +00:00
cue.mod Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00
devenv Gauge: Fix sparkline positioning issue in horizontal orientation (#120846) 2026-03-20 21:37:22 +00:00
docs Alerting: Remove DELETE and restrict GET/history legacy Alertmanager config API endpoints (#120579) 2026-03-21 00:02:45 +01:00
e2e Chore: Remove deprecated DataGrid panel from frontend code (#119152) 2026-03-12 08:05:20 -04:00
e2e-playwright Gauge: Fix sparkline positioning issue in horizontal orientation (#120846) 2026-03-20 21:37:22 +00:00
emails Emails: Fix template brackets in passwordless_verify_ templates (#107108) 2025-08-27 12:47:02 +02:00
grafana-mixin Log Details: Show embedded trace if available (#109926) 2025-08-25 14:06:01 +00:00
hack Go: Update to 1.25.8 (#119692) 2026-03-06 10:27:09 +01:00
kinds Dashboard: Add matcher scope to schema (#119684) 2026-03-11 17:49:13 +00:00
kindsv2 Chore: Remove Bingo as Drone is removed (#110020) 2025-08-22 13:49:44 +02:00
local Packaging: Dockerfile copy local folder (#64766) 2023-03-14 14:44:11 -05:00
packages Alerting: Promote notifications.alerting.grafana.app resources to v1beta1 (#120738) 2026-03-21 00:00:43 +01:00
packaging Chore: Bump Ubuntu base image from 22.04 to 24.04 (#120573) 2026-03-19 10:38:49 +00:00
pkg Provisioning: Handle folder metadata deletion in incremental sync (#120865) 2026-03-21 14:59:14 +01:00
public I18n: Download translations from Crowdin (#120760) 2026-03-21 00:35:11 +00:00
scripts CI: Remove validate-dockerfile script (#120704) 2026-03-19 14:21:16 +00:00
tools Alerting: Add alertmanager integration tests (#100106) 2025-02-13 11:36:45 +01:00
.air.toml make: build-go: add trimpath for non-dev, and debug-friendly flags for dev (#120264) 2026-03-13 10:40:45 +01:00
.bra.toml Makefile: Change build-go to only build the binaries, and deprecate build-go-fast (#111986) 2025-10-08 15:04:36 +02:00
.browserslistrc Babel: Target more modern browsers, updates browserlistrc (#32573) 2021-04-01 10:32:00 +02:00
.dockerignore fix: modify the grafana dev build (#116872) 2026-01-27 17:14:33 -06:00
.editorconfig Chore: Enable PR testing in Drone (#26189) 2020-07-10 16:09:21 +02:00
.gitattributes Chore: Mark more files as generated in gitattributes (#113776) 2025-11-13 09:09:15 +00:00
.gitignore OBO tokens: add GetAccessToken and update ext_jwt (#119452) 2026-03-09 22:06:02 -07:00
.golangci.yml Chore: Remove promlib (#120031) 2026-03-13 15:58:43 +01:00
.ignore Remove support for Google Spanner database. (#105846) 2025-05-23 11:35:59 +02:00
.levignore.js Adds levitate levignore configuration file to prevent breaking change notifications from expected typescript symbols (#74371) 2023-09-05 15:00:13 +02:00
.madgerc Exclude type only imports circular dependencies check (#120075) 2026-03-12 08:37:48 -04:00
.nvmrc Chore: Update node to v24 (#112649) 2025-10-29 17:17:07 +01:00
.nxignore Alerting/Chore: Mock API (MSW) in browser (#89223) 2024-09-04 10:22:03 +01:00
.prettierignore Theme: Regenerate schema and ignore from prettier (#117011) 2026-01-28 15:27:23 +00:00
.prettierrc.js Toolkit: Remove deprecated plugin:build (#67485) 2023-04-28 14:33:16 +02:00
.trivyignore CI: Add Trivy GitHub Action (#88987) 2024-06-10 16:53:48 -04:00
.vale.ini Lint only Markdown files (#101533) 2025-03-04 11:00:35 +00:00
.yarnrc.yml Yarn: Enable global cache (#120578) 2026-03-20 14:11:47 +00:00
AGENTS.md Agents: Cursor Cloud development environment setup (#118922) 2026-02-27 17:41:16 +01:00
CHANGELOG.md Release: update changelog for main (#119812) 2026-03-09 18:13:16 +00:00
CLAUDE.md agents: add CLAUDE.md (#120503) 2026-03-17 13:10:51 +01:00
CODE_OF_CONDUCT.md Fixing typos (#70487) 2023-06-22 09:43:38 +01:00
CONTRIBUTING.md Update CONTRIBUTING.md (#117033) 2026-01-30 11:17:02 +01:00
crowdin.yml Internationalisation: Mark up @grafana/prometheus package (#105861) 2025-06-12 11:29:33 +01:00
cypress.config.js e2e: improves flakiness and speed (#103533) 2025-04-16 05:21:06 +01:00
Dockerfile CI: Route downstream nightly builds to nightly workflow (#120774) 2026-03-20 10:26:14 +01:00
embed.go Core: Remove thema and kindsys dependencies (#84499) 2024-03-21 11:11:29 +01:00
eslint-suppressions.json Gauge: Drop v1 gauge (#120839) 2026-03-20 15:05:15 -05:00
eslint.config.js Alerting: add a custom "no-invalid-properties" eslint plugin (#118208) 2026-02-16 16:25:57 +01:00
go.mod Alerting: Update alerting module to c9a057d8d816dcdfef34c6b261e514d5c17d7594 (#120832) 2026-03-20 19:08:32 +01:00
go.sum Alerting: Update alerting module to c9a057d8d816dcdfef34c6b261e514d5c17d7594 (#120832) 2026-03-20 19:08:32 +01:00
go.work Use promlib from grafana/grafana-prometheus-datasource (#119647) 2026-03-09 16:12:25 +00:00
go.work.sum Dependencies: Update github.com/russellhaering/goxmldsig to v1.6.0 (#120776) 2026-03-20 10:36:55 +01:00
GOVERNANCE.md Update dependency prettier to v3.6.2 (#108689) 2025-07-25 17:47:44 +01:00
HALL_OF_FAME.md Update HALL_OF_FAME.md (#102267) 2025-03-17 08:25:02 +01:00
i18next.config.ts Add faceted labels filter for time series legend (#119918) 2026-03-12 15:57:58 +01:00
jest.config.codeowner.js Tests: Check frontend test coverage CI workflow (#116633) 2026-01-22 09:46:04 -04:00
jest.config.js Chore: Remove deprecated DataGrid panel from frontend code (#119152) 2026-03-12 08:05:20 -04:00
latest.json Release: Deprecate latest.json and replace with api call to grafana.com (#80537) 2024-01-16 11:19:32 +00:00
lefthook.rc Chore: Fix lefthook not running (#106196) 2025-05-29 11:06:33 +02:00
lefthook.yml Chore: remove betterer command from lefthook (#110600) 2025-09-04 15:16:21 +01:00
lerna.json Release: Bump version to 13.0.0-pre (#118398) 2026-02-18 10:08:25 -07:00
LICENSE Re-license Grafana to AGPLv3 (#33184) 2021-04-20 19:03:30 +02:00
LICENSING.md Actions: Introduce actionlint (#105224) 2025-05-13 08:23:59 +02:00
MAINTAINERS.md Adds johnny as codeowner for alerting docs (#99877) 2025-02-04 13:10:57 +01:00
Makefile Chore: Bump Ubuntu base image from 22.04 to 24.04 (#120573) 2026-03-19 10:38:49 +00:00
NOTICE.md Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
nx.json Chore: Disable tui for Nx (#109896) 2025-08-20 10:08:03 +00:00
package.json chore(deps): update dependency storybook to v8.6.17 [security] (#120651) 2026-03-19 12:58:01 +01:00
playwright.config.ts CI: Speed up Playwright e2e tests workflow (#119277) 2026-03-05 12:54:49 +00:00
playwright.storybook.config.ts E2E: migrate to playwright (#107241) 2025-07-11 10:31:33 +01:00
project.json Frontend: use custom conditions for development and build (#111685) 2025-12-18 11:47:38 +01:00
README.md add feedback survey to contributing related docs (#113168) 2025-10-30 09:36:44 +01:00
relyance.yaml Add Relyance github action (#107012) 2025-07-11 08:44:47 +02:00
ROADMAP.md Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
stylelint.config.js Update dependency stylelint to v16 (#83252) 2024-02-23 11:56:38 +02:00
SUPPORT.md Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
tsconfig.json Frontend: use custom conditions for development and build (#111685) 2025-12-18 11:47:38 +01:00
WORKFLOW.md Minor correction done in WORKFLOW.md (#80505) 2024-04-12 17:56:10 +02:00
yarn.lock Adding Query with assitant functionaliity to Tempo (#120531) 2026-03-19 08:14:58 -04:00

Grafana Logo (Light) Grafana Logo (Dark)

The open-source platform for monitoring and observability

License Go Report Card

Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture:

  • Visualizations: Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
  • Dynamic Dashboards: Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
  • Explore Metrics: Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
  • Explore Logs: Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.
  • Alerting: Visually define alert rules for your most important metrics. Grafana will continuously evaluate and send notifications to systems like Slack, PagerDuty, VictorOps, OpsGenie.
  • Mixed Data Sources: Mix different data sources in the same graph! You can specify a data source on a per-query basis. This works for even custom datasources.

Get started

Unsure if Grafana is for you? Watch Grafana in action on play.grafana.org!

Documentation

The Grafana documentation is available at grafana.com/docs.

Contributing

If you're interested in contributing to the Grafana project:

Share your contributor experience in our feedback survey to help us improve.

Get involved

This project is tested with BrowserStack.

License

Grafana is distributed under AGPL-3.0-only. For Apache-2.0 exceptions, see LICENSING.md.