* Fix pkgs-with-tests-named.sh matching tests from subdirectories
The find command was recursive by default, causing packages to be
included in the results based on test functions in subdirectory packages.
Adding -maxdepth 1 matches Go's package semantics where only files in
the same directory belong to a package.
* ci: trigger integration tests for backend test script changes
* Extract shared OpenFeature setup code into a module
Include into module:
- HTTP client with optional token exchange authentication
- Support for OFREP and Grafana features service providers
* Go mod tidy
* Update .github/CODEOWNERS
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* Update pkg/infra/features/provider.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* Update pkg/infra/features/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply review feedback
* Refactor feature management to use pkg/infra/features module
Changes:
- Simplify openfeature.go by using features.InitOpenFeature()
- Extract token exchange setup to use features.CreateAuthenticatedHTTPClient()
- Update tests to use new infrastructure
- Clean up redundant middleware and client creation code
* Update workspace
* Fix lint
* Replage go-feature-flag provider with OFREP one
- Deleted features_service_provider.go — the go-feature-flag SDK provider is gone - createRemoteProvider in featuremgmt now uses features.NewOFREPProvider for both FeaturesServiceProviderType and OFREPProviderType
- Update tests
* Update workspace
* Revert workspace update noise from submodule go.mod/go.sum files
* Run make update-workspace
* make gen-apps
* Cleanup attempt
* make gen-apps
* Run go work sync after merging main
* Make gen-apps
---------
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix Dockerfile: remove reference to deleted build.go
PR #119297 removed build.go but the Dockerfile still references
it in a COPY command on line 126, causing Docker builds to fail with:
ERROR: "/build.go": not found
Remove build.go from the COPY instruction.
Fixes: 05c9ed18d6 ("chore: cleanup makefile (#119297)")
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Test Dockerfile changes when Makefile is changed
* Remove unnecessary deps from Dockerfile and add missing copy/add
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
* chore: grafana/openapi package
* Add attributes to mark specs as generated files
* chore: run yarn generate-apis
* chore: run yarn generate-apis
* chore: merge with main
* chore: trying to free up space
* chore: add custom cleanup of files
* chore: fixes in package.json
* chore: update pre and postpack scripts
* chore: change make name
* chore: yarn generate-apis
* chore: update openapi specs
* chore: updates after PR feedback
* chore: yarn generate:openapi
* chore: run yarn generate:openapi
* chore: trying with lower runner
* chore: yarn generate:openapi
* chore: update package version
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* provisioning: sync before assert in integration test to avoid race condition
* provisioning: integration tests - avoid initial sync as it may race with file copying
* provisioning: fix file integration test initial sync
* workflows: increase mysql integration test timeout to 12 min
* Suggestions: Handle no data panel flow
* Run i18n-extract
* Dial back emphasis on non data section styling
* Update CODEOWNERS to include wildcard for tests
* Dashboard: replace golden file comparison with checksums
- Add checksumStore that validates SHA-256 hashes of conversion
output against golden_checksums.json
- testConversion and writeOrCompareOutputFile now always write
golden files to disk and validate checksums
- Add REGENERATE_CHECKSUMS=true env var to update checksums
- Add Makefile targets: generate-golden-files,
regenerate-golden-checksums
- Frontend parity test fails fast when golden files are missing
* Dashboard: remove golden files from git, track checksums only
- Add testdata/.gitignore for output/ and
migrated_dashboards_output/
- Add golden_checksums.json with SHA-256 hashes for 840 files
- Remove ~38MB of golden files from git tracking
* Dashboard: generate golden files in frontend CI pipeline
- Add generate-golden-files job that runs Go conversion tests
once and uploads golden files as an artifact
- Frontend test shards download the artifact before running
* Extend golden file removal to migration package and consolidate test utilities (#118744)
* Dashboard: replace golden file comparison with checksums
- Add checksumStore that validates SHA-256 hashes of conversion
output against golden_checksums.json
- testConversion and writeOrCompareOutputFile now always write
golden files to disk and validate checksums
- Add REGENERATE_CHECKSUMS=true env var to update checksums
- Add Makefile targets: generate-golden-files,
regenerate-golden-checksums
- Frontend parity test fails fast when golden files are missing
* Dashboard: remove golden files from git, track checksums only
- Add testdata/.gitignore for output/ and
migrated_dashboards_output/
- Add golden_checksums.json with SHA-256 hashes for 840 files
- Remove ~38MB of golden files from git tracking
* Dashboard: generate golden files in frontend CI pipeline
- Add generate-golden-files job that runs Go conversion tests
once and uploads golden files as an artifact
- Frontend test shards download the artifact before running
* Add migration, share checksum logic and update docs
* fix(ci): set correct download path for golden file artifacts
The download-artifact action needs the common ancestor path since
upload-artifact stores files relative to it. Without this, golden
files end up at the repo root instead of under apps/dashboard/pkg/migration/.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(dashboard): skip TestMigratedDashboardsConversion when migration golden files missing
This test depends on files generated by the migration package tests.
Since these are now gitignored, skip gracefully in CI Go test runs
where migration tests haven't run first.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(ci): generate golden files before backend unit tests
TestMigratedDashboardsConversion reads from the migration package's
golden output directory. Since those files are no longer tracked in
git, they must be generated before the sharded Go tests run.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Remove dependencies between packages
* Fully regenerate checksum file to not preserve removed files checksums
* From frontend, check if golden files exist before running the test
* Fix CODEOWNERS
* gitignore updaate
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Alerting: Update snapshot file if JSON mismatch in integration test
* Use `assert.JSONEq` for improved error reporting in tests.
* Automatically update the snapshot file if it differs from the test output.
* Add error handling for snapshot file updates.
* Add snapshot updates to workflow
* Added integration test steps to update snapshots in the GitHub workflow.
* Ensures snapshots are refreshed for `TestIntegrationAvailableChannels` and `TestIntegrationTypeSchemaList`.
* Alerting: Pretty-print JSON in snapshot updates for integration tests
* Use `json.Indent` to format JSON before saving snapshot files.
* Ensure improved readability and consistency in snapshot files.
* Add error handling for JSON indentation.
* [chore] Update go to v1.26.0, and the golangci-lint action to v9.
* Use golangci-lint v2.9.0
* Use golang:1.26.0-alpine instead of 1.25.7-alpine
* chore: more go version upgrades
* chore: more updates
* chore: generate apis
* fix: golint issues prealloc etc
* fix: million tiny golint issues
---------
Co-authored-by: konsalex <konstantinos.alexoglou@grafana.com>
* CI: Use self-hosted runners for FE workflows
* Add login to dockerhub/gar to other jobs
* Try xlarge runner for Playwright tests
* Need to add id-token write permission
* Revert change to beefy runners, no difference
* Secrets: Add devenv seed script for keepers and secure values
Add a Go script to create test data for the Secrets Keeper UI via
Grafana's HTTP API. Follows the devenv/scopes pattern.
Supports:
- Seeding from YAML config: go run secrets.go
- Load testing with N resources: go run secrets.go -generate 50
- Cleanup of gdev- prefixed resources: go run secrets.go -clean
- Self-tests: go run secrets.go -test
- Helpful error messages for missing API setup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add lint for circular dependencies
* chore: add a circular dependency for testing
* chore: undo the extra circular dependency
* chore: updates after PR feedback
* chore: set specific branch
* chore: updates after PR feedback
What is this feature?
This PR introduce refactoring for role picker for teams and users. It uses RTK Query.
The related task: grafana/identity-access-team#1821
The previous PR with related logic: #113783
Why do we need this feature?
This refactoring is a cleaner way for handing refetching.
* daggerbuild: Cache builders
* cache-builders in e2e build
* cache-builders on non-forks
* dont attempt to login to gar or dockerhub in forks; it won't work anyways
* use npx install playwright
* Exclude dist & node_modules from mount
* remove yarn.go; it's not used
* use correct registry for cache builds
* rebuild cached artifacts every 2 weeks
* Use grafanalabs-dev/docker-grafana-dev
* make lint-go
* Fix bad conflict resolution
* fix ubuntu and alpine base