* ds-querier: add new metric for the total request
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* fix logger and trace
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* ds-querier: rewrite downstream 500s to 400
---------
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* replace usage of folder guardians with access control evaluators
* remove NewByFolderUID guardian
* bring up to date
* fix test
* more test fixes, and don't fetch the folder before evaluating lib element access
* change what error is returned
* fix alerting test
* try to fix linter errors
* replace the use of newByFolder guardian with direct access control evaluator checks
* remove newByFolder guardian
* remove unintentional changes
* remove unintentional changes
* undo unwanted change
* ds-querier: handle execute errors better
* fix: change how GetResponseCode works to return 418 if rsp is nil
418 is a bit of an easter egg which in this case works since we don't
have an rsp but we do know something went wrong, so a 200 won't work.
Also changed this to return the code in the frame, not sure why we
weren't.
* tests: fix GetResponseCode tests
* log no rsp case
* bring back og error log
* 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
* introduce alerting notification app
* move code as is and remove from old registry
* update api server registration
* update make file and remove unnecessary args, copy some useful make commands from dashboards
* update codeowners
* move constants inside module and remove dependency from grafana
* add support for selectors to the app builder
* 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
* make sure that user permission cache is cleared after new dashboard and folder creation
* more test fixes
* Update pkg/services/dashboards/service/dashboard_service.go
* check identity type in SetDefaultPermissionsAfterCreate, set default permissions for service accounts
* set SA permissions for folders as well
* fix tests
* 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
---------
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com>
Co-authored-by: Marco de Abreu <marco.deabreu@grafana.com>
Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
* 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