* fix: separate dashboard api tests
* fix: typo
* refactor: revert file rename
* fix: compilable
* fix: trial
* fix: remove unused func
* Pass the right value for kubernetesDashboardsEnabled flag
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Enable mode 3 for remaining tests
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Disable integration tests for MySQL and Postgres
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Run go work use
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Update go.mod
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Remove TODO comment
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Revert to go 1.24.5
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* go.mod
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Remove duplicated block
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Experiment without reusing client
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Reenable integration tests on Postgres and MySQL
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Revert "Experiment without reusing client"
This reverts commit 0126e321a08dbafc482a623f2593edaf5561ed32.
* Reapply "Experiment without reusing client"
This reverts commit 5368b4c5318f78aef9b1a5c310846f3f5569fe78.
* Refactor how we get an adminClient
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Add TODO comments
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Maicon Costa <maiconscosta@gmail.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>
* parse via sse
I need to figure out how to handle the pipeline.execute with our own
client. I think this is important for MT reasons, just like using our
own cache (via legacy) is important.
parsing is done though!
* WIP nonsense
* horrible code but i think it works
* Add support for sql expressions config settings
* Cleanup:
- remove spew from nodes.go
- uncomment out plugin context and use in single tenant flow
- make code more readable and add comments
* Cleanup:
- create separate file for mt ds client builder
- ensure error handling is the same for both expressions and regular queries
- other cleanup
* not working but good thoughts
* WIP, vector not working for non sse
* super hacky but i think vectors work now
* delete delete delete
* Comments for future ref
* break out query handling and start test
* add prom debugger
* clean up: remove comments and commented out bits
* fix query_test
* add prom debugger
* create table-driven tests with testsdata files
* Fix test
* Add test
* go mod??
* idk
* Remove comment
* go enterprise issue maybe
* Fix codeowners
* Delete
* Remove test data
* Clean up
* logger
* Remove go changes hopefully
* idk go man
* sad
* idk i ran go mod tidy and this is what it wants
* Fix readme, with much help from adam
* some linting and testing errors
* lint
* fix lint
* fix lint register.go
* another lint
* address lint in test
* fix dead code and linters for query_test
* Go mod?
* Struggling with go mod
* Fix test
* Fix another test
* Revert headers change
* Its difficult to test this in OSS as it depends on functionality defined in enterprise, let's bring these tests back in some form in enterprise
* Fix codeowners
---------
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
* Add Create for User + DualWriter setup
* Add delete User
* Fix delete + access check
* Add tests for delete user
* Add tests for create user
* Fixes
* Use sqlx session to fix database locked issues
* wip authz checks
* legacyAccessClient
* Update legacyAccessClient, add tests for create user
* Close rows before running other queries
* Use ExecWithReturningId
* Verify deletion in the tests
* Add Validate and Mutate
* Other changes
* Address feedback
* Update tests
---------
Co-authored-by: Gabriel Mabille <gabriel.mabille@grafana.com>
- 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.
* Unistore: Fix dualwriter mode 3
Fallback to legacy if Unified is the main store and we get an error when
reading from it
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
- 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>
* static options for query variable
* add toggle
* fix and add tests
* run the hack codegen thing
* more test fixes
* make betterer happier
* also make typecheck happy
* make betterer happier
* fix i18n key
* tranalte static variables sort label
* gen translations
* update snapshot
* 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>
* Run TestIntegrationFoldersApp for all dualwriter modes on sqlite only
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Folders: disable TestIntegrationFoldersGetAPIEndpointK8S
it's breaking the enteprise CI pipeline
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Run only against sqlite
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* noop: force backend change
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* PoC: check if testing.Short is called from integration tests only.
* Rename helper function.
* Fix logic.
* Remove skipping of integration tests from non-integration tests.
* Remove skipping of integration tests from non-integration tests.
* Fix import.
* Folders: reenable unit test TestFoldersCreateAPIEndpointK8S
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* reenable unit test TestFoldersGetAPIEndpointK8S
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* introduce ExtraConfigsCrypto
* delete getLastConfiguration and move all code into method Get
* update legacy store to encrypt ExtraConfigs same way we do in MultiOrgAlertmanager
* update legacy store init
* delete PersistConfig
* remove unnecessary unmarshalling
* add better error
* add tests for legacy store
* add tests that cover extra config validation
* add integration test for conflicting routes
---------
Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* wip
* Use serviceaccount model from /apps/iam
* revert version update
* Add tembinding, userteam, other improvements
* Change serviceaccounttoken spec
* Revert the change of ServiceAccountToken
* Revert the change of UserTeam
* Clean up
* Remove files that are not needed for now
* Lint
* Update sql query's integration tests
* Fix tests
* update openapi spec
* Move LastSeenAt to the annotations
* Updte openapi_snapshots
* Change lastSeenAt annotation name