* Add ref option to stage options
* Fix the issue with ref in export worker
* Add unit tests for export stage options
* Do not fail if ref is equal to the stage branch
* Format code again
* fix test
---------
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Add warning job status
* Different strictness for export than for pulling
* Fix some unit tests
* Fix unit tests
* Update frontend to display the warning status
* Fix status badge
* Add missing return statement
* Improve text in alert
* Dashboards API: v2alpha2 missing pieces
* Fix issue with dashboard client scope for alpha versions
As we now have 2 different alpha versions for v2 we need to store the
clients separately.
* Improve debuggability of provisioning export test
- Add a helper function to print the tree structure.
- Be explicit about the expected file names expected in each case.
* Update pkg/registry/apis/dashboard/mutate.go
* Update pkg/services/authz/zanzana/server/server.go
Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
* Review
* go lint
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
* Move .git to repository packages
* Bump nanogit 2025-07-17
This version handles `.git` extension internally so that the client
doesn't have to worry about it
* Put back mutation for Github
* Mutate also git URL for clarity
* Register usage stats after lister is created
For enterprise where metrics are collected more frequently and in
different ways the collection was happening before the listing was
initialized.
* Move usage to separate package
* Use provider in Webhooks registration
* First stab at using the new client
* Simplify mock
* Able to generate graph in OSS
* Remove line already ensured by provider
* Handle the K8s not found error as well
* Commit regenerated wire file
* Add the hack also for deletion
* Fix secrets test util
* Format file
- Add hooks to git, github and github webhooks to remove the.
- Implement deletion in secrets package.
- Add `Mutator` interface and hooks so that we can register any mutator.
- Add unit test coverage to those mutators.
- Move provider specific mutation from the massive `register.go` to the respective packages (e.g. `git` , `github`, etc).
- Add integration test for removal.
- Change the decryption fallback to simply check for the repository prefix.
- Provisioning: Begin using secrets store
- Refactor integration with secrets store
- Add back the legacy service
- Separate concerns for encrypt and decrypt
- Handle update within Encrypt function
- Add interface for secure value service
- Add feature flag for using secrets service
- Add the dual service for temporary solution.
* Add first integration tests for encrypted tokens
* Add integration test for app platform secrets
* Validate it has the name or not
* Create wire provider
* Always save to the secret if provided secret
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Roberto Jiménez Sánchez <jszroberto@gmail.com>
* Add types for other repositories
* Inject the types from extras
* Fix go-lint
* Fix typecheck
* Add it to the tests
---------
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Bump nanogit 2025-07-09
This version contains significant performance improvements in memory and
CPU thanks to optimizing buffers, using a faster zlib library and using
streaming instead of loading everything in memory.
* Bump nanogit library
This version of nanogit will be optimized for performance, specially for
bulk writes. It will store packfiles in a temporary file if there are
too many and clean up after push or when the writer is removed.
* Format code in nanogit/git.go
* DeleteProvisionedDashboardDrawer: delete provisioned dashboard flow set up with drawer
* clean up
* add tests
* more test and clean up
* revert endpoint change
* adjust tests
* remove unuse codes
* fix type, fix test, add read only message
* small changes
* fix test, i18n fix
* comments
* Fix bug for file deletion using a branch
* PR comments update
* Use the provided ref for parser so that URLs work
* call useDeleteRepositoryFilesWithPathMutation in delete drawer component directly
* remove console log
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* PR comments
* use string for fields
* extract handle request logic from save form and delete form and put into one hook
* Add test for useProvisionedRequestHandler
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* use drawer close in both save form and delete form
* Add back panelEditor onDiscard
* add panelEditor onDiscard to delete flow
* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Add nanogit package
* Add nanoGit feature flag
* Put logger into nanogit context
* Commit go mod and go sum updates
* Add more stuff around logging
* Nanogit also in extra one
* Add owner to dependency
* Spike: Extras
* Attempt to wire it up
* Hack
* Fix issue with jobs
* Wire more things up
* Fix more wiring stuff
* Remove webhook secret key from main registration
* Move secret encryption also outside register
* Add TODOs in code
* Add more explanations
* Move connectors to different package
* Move pull request job into webhooks
* Separate registration
* Remove duplicate files
* Fix missing function
* Extract webhook repository logic out of the core github repository
* Use status patcher in webhook connector
* Fix change in go mod
* Change hooks signature
* Remove TODOs
* Remove Webhook methos from go-git
* Remove leftover
* Fix mistake in OpenAPI spec
* Fix some tests
* Fix some issues
* Fix linting
* Add some clone tests
* Add case to create ref if it doesn't not exist
* Add unit tests for context cancellation
* Bare repository not needed
* Make tests work without git command
* Add unit test for unimplemented methods
* Add unit test for GoGitRepo_Read
* Add tests for Delete
* Add more tests
* Add unit test for GoGitRepo_Push
* Add unit test for ReadTree
* Add test for GitHubRepository_LatestRef
* Add test for GitHubRepository_LatestRef
* Add test for GitHubRepository_CommentPullRequest
* Add remaining tests for GitHubRepository
* Add remaining tests for GitHubRepository
* Fix linting
* Add unit tests IsAuthenticated
* Add unit tests RepoExists
* Add unit tests GetContents
* Add initial unit tests GetTree
* Add unit tests for CreateFile
* Add unit test UpdateFile
* Add unit tests DeleteFile
* Add unit tests for Commits
* Add unit tests for helpers
* Add unit test CompareCommits
* Add GetBranch tests
* Add unit tests BranchExists and CreateBranch
* Add unit tests Webhooks
* Remove unused code
* Add unit tests CommentPullRequest
* Add more cases for GetTree
* Complete coverage
* Fix linting