grafana/pkg
Rafael Bortolon Paulovic e34341472c
fix(unified): populate key_path during bulkimport (#117320)
* fix(unified): populate key_path during bulkimport

Rows in resource_history were being created with empty key_path values
during bulkimport (migration of dashboards/folders). This broke
functionality that depends on key_path for indexing/searching.

The fix adds a buildKeyPath helper function that constructs the key_path
in the same format as normal write operations, and updates processBulkWithTx
to set the KeyPath field when inserting into resource_history.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(unified): add verification for key_path population after bulkimport

Adds verifyKeyPathPopulated function to migration integration tests
that verifies no rows in resource_history have empty key_path values
after bulkimport completes.

Also changes actionStr fallback from "unknown" to the numeric action
value for better debugging.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 15:51:15 +00:00
..
aggregator Build: Bump authlib to latest version (#117296) 2026-02-03 11:07:53 +00:00
api Datasources: Fix permissions cleanup when deleting datasource by name (#117289) 2026-02-03 08:59:08 +01:00
apimachinery Build: Upgrade authlib and make update-workspace (#117311) 2026-02-03 13:50:08 +00:00
apis Fix sqlschemas API endpoint (#116868) 2026-01-27 14:06:55 -05:00
apiserver Build: Upgrade authlib and make update-workspace (#117311) 2026-02-03 13:50:08 +00:00
build daggerbuild: Cache builders (#109076) 2026-02-03 10:55:40 +01:00
bus Hackaton: Add more unit tests, take 3 (#101525) 2025-03-05 08:00:12 +01:00
clientauth Chore: Unify token exchange round trippers - provisioning (#116106) 2026-01-21 11:00:39 +01:00
cmd Grafana Cli: Add admin flush-rbac-seed-assignment command (#116716) 2026-01-22 19:58:18 +00:00
codegen Codegen: Add comment with cue path (#116835) 2026-01-27 10:40:26 +01:00
components DataSources: Improve resource model conversions (#116403) 2026-01-19 08:53:46 +03:00
configprovider Configprovider: Update the interface to propagate errors (#110814) 2025-09-11 17:26:54 +03:00
events Chore: Remove unused bus.Bus events (#110738) 2025-09-08 10:47:16 +00:00
expr SQLSchemas: Move the types to the query types package (#116745) 2026-01-23 17:32:46 +03:00
extensions Extensions: Add file for test-only imports to exclude it from binary (#116746) 2026-01-23 15:28:35 +01:00
generated Chore: Upgrade k8s.io/api v0.34.1 and grafana-app-sdk v0.43.1 (#111009) 2025-09-16 13:35:20 +03:00
ifaces/gcsifaces
infra logging: fix db_query_time always reporting zero (#116824) 2026-01-26 13:25:40 +01:00
kinds QueryVariable: Support preview, static options and autocomplete for multi-props (#116259) 2026-02-02 11:44:15 +01:00
login/social Auth: Cleanup duplicate isGroupMember methods from OAuth connectors (#115786) 2026-01-05 11:35:28 +01:00
middleware logging: fix db_query_time always reporting zero (#116824) 2026-01-26 13:25:40 +01:00
mocks/mock_gcsifaces Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
models Auth: Attach external session info to Grafana session (#93849) 2024-10-08 11:03:29 +02:00
modules refactor(unified): add separate target for search (#117059) 2026-01-30 11:26:21 +00:00
operators Provisioning: use min resync interval in Repo Controller (#117048) 2026-01-29 08:41:39 +01:00
plugins Build: Upgrade authlib and make update-workspace (#117311) 2026-02-03 13:50:08 +00:00
promlib Build: Bump authlib to latest version (#117296) 2026-02-03 11:07:53 +00:00
registry Alerting: add receivers schema app platform API (#117041) 2026-02-03 16:23:30 +01:00
semconv Go: Update to 1.25.6 (#116394) 2026-01-16 10:50:12 +01:00
server GSM: Implement DEK caching (#113894) 2026-02-02 12:46:16 -05:00
services Remove dashboardSceneSolo and dashboardSceneForViewers feature flags (#117083) 2026-02-03 15:05:23 +01:00
setting Cloudwatch: Add http proxy config setting (#117049) 2026-02-02 18:42:07 -05:00
storage fix(unified): populate key_path during bulkimport (#117320) 2026-02-03 15:51:15 +00:00
tests Alerting: add receivers schema app platform API (#117041) 2026-02-03 16:23:30 +01:00
tsdb Cloudwatch: Add http proxy config setting (#117049) 2026-02-02 18:42:07 -05:00
util Add non-boolean feature flags support to the StaticProvider (#115085) 2026-01-12 22:53:23 +01:00
web Security: Fixes for CVE-2025-6197 and CVE-2025-6023 (#108330) 2025-07-18 09:06:26 -06:00
README.md Chore: Move all backend contribution documents to a single directory (#61140) 2023-01-11 11:16:52 +01:00
ruleguard.rules.go

This directory contains the code for the Grafana backend.

The contributor documentation for Grafana's backend is in /contribute/backend/README.md.