Commit Graph
640 Commits
Author SHA1 Message Date
Ryan McKinley c9701c37bf merge main 2024-12-21 11:32:17 +03:00
1a46039037 K8s/Dashboards: Pass the legacy internal ID into labels (#98311)
---------

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-12-20 21:33:49 +02:00
owensmallwood 4837585cab Unified Storage Search: Add sprinkles (#97820)
* Wire up sprinkles to oss and enterprise. Fetching sprinkles not implemented yet.

* Adds wireset for initializing document builders. Had to init it when creating the service to avoid cyclical imports.

* updates to int64 for stats

* adds config for sprinklesApiServer and gets sprinkles from there when its present

* add comment for later

* adds feature toggle for sprinkles. returns empty results when flag not enabled.

* adds unified storage config setting for sprinkles apiserver page limit

* fixes bug where dashboard uid was not getting set

* when creating dashboard summary, use metadata.name as the dashboard uid

* cleans up wire. use existing oss and enterprise sets to generate doc builders

* remove old wireset

* fix linter - adds missing arg for doc builders

* update dashboard stats in tests

* updates test-data dashboards

* log a warning instead of returning an error if we can't get sprinkles for a namespace

* dont read uid from dashboard json
2024-12-18 11:00:54 -06:00
Ryan McKinley f0dc718a67 POC/Provisioning: Use cards layout to show more status info (#98155) 2024-12-18 12:37:45 +03:00
Ryan McKinley b322f65243 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-18 08:39:03 +03:00
Adam Simpson 57d94ed01f ds-querier: return error if failed to get ds client (#97698)
* ds-querier: return error if failed to get ds client

* add log line

* no empty ref

* fix test
2024-12-17 10:38:44 -05:00
Mariell Hoversholm 0ad2f2ac47 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-17 15:11:35 +01:00
Ryan McKinley a01878332a K8s/Storage: Deprecate StorageTypeLegacy (#98096) 2024-12-17 17:00:35 +03:00
Ryan McKinley bb20d128f0 POC/Provisioning: Minor cleanups (#98089) 2024-12-17 16:27:40 +03:00
Ryan McKinleyandMariell Hoversholm 4e90c34b64 POC/Provisioning: Use healthy repositories (#97999)
Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
2024-12-17 11:13:30 +03:00
Ryan McKinley efc0b6802f fix test 2024-12-17 09:30:41 +03:00
Ryan McKinley 751b11b5bd fix test 2024-12-17 08:00:55 +03:00
Ryan McKinley a75c39bfe7 merge main 2024-12-16 19:14:52 +03:00
Ryan McKinley e4837d452e Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-16 19:07:54 +03:00
Alex KhomenkoandRyan McKinley dfb7d5110e POC/Provisioning: update generator (#98027)
* Add source

* Update filters

* Exclude all namespace endpoints

* Remove watch endpoints

* Exclude collection endpoint

* Update arg names

* Add parser script

* Update spec

* Update @rtk-query/codegen-openapi

* Update params for list endpoints

* Use new hooks and types in hooks

* alternative operation ID

* alternative operation ID

* alt operation

* alt operation

* Move some transformations to BE

* Update endpoints

* Update types after generation

* Remove spec and generated endpoints

* Add tags automatically

* Update pkg/services/apiserver/builder/helper.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* add static openapi

* Use generated spec

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-12-16 16:27:31 +02:00
Todd TreeceandRyan McKinley 8b0cd9dbb9 K8s: Increment generation in generic strategy (#97946)
---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-12-16 08:18:43 -05:00
Leonor OliveiraandBruno Abrantes 62c1735a61 Implement k8s count handler (#97955)
* Implement k8s count handler

* Fix endpoint

* Fix type converstions

* Add tests for foldercounts

* Add more tests

* Only use sql-fallback if no values in unistore

* Update gomod

* Fix test

* Update pkg/api/folder_test.go

Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>

* Go.mod

---------

Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
2024-12-16 14:08:29 +01:00
Ryan McKinley 2f4f727758 POC/Provisioning: Add id mapping utility (#97997) 2024-12-16 14:42:31 +03:00
Mariell Hoversholm 37456b7747 test: correct returned type from export endpoint 2024-12-16 08:54:06 +01:00
Ryan McKinley 1689c51b0d POC/Provisioning: Replace the /import endpoint with /sync (#97933) 2024-12-13 16:04:01 +03:00
Ryan McKinleyandTodd Treece de2bff1d07 POC/Provisioning: Add informer (with healthcheck) (#97806)
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-12-13 13:45:22 +03:00
Mariell Hoversholm 4127741ea8 POC/Provisioning: Local repo: Test importing a panel (#97900) 2024-12-13 08:59:05 +01:00
Mariell Hoversholm 708c6ca800 fix: reintroduce removed code 2024-12-12 16:33:38 +01:00
Ryan McKinley d57c2078e5 merge main 2024-12-12 18:04:02 +03:00
Mariell Hoversholm e6a6fc6f74 Tests: Require GrafanaOpts when creating Grafana dir (#97825)
I don't see a reason to accept a variable amount here, as we never use it. The only use I can see is optionally
including the opts, which isn't necessary and only complicates matters when an empty struct would do just as well: the
options are all created to be assumed zero-values already, in case a test doesn't need that option set.
2024-12-12 15:13:06 +01:00
Mariell Hoversholm f62ab80430 test: set permitted provisioning paths 2024-12-12 13:16:39 +01:00
Mariell Hoversholm e5f43521a4 POC/Provisioning: Allow specific local path prefixes (#97822) 2024-12-12 10:38:41 +01:00
Mariell Hoversholm 22e0e952c7 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-11 12:15:47 +01:00
Mariell Hoversholm 1974f9c583 POC/Provisioning: Use forward-slashes everywhere (#97740)
* POC/Provisioning: Create utility for joining paths safely

* POC/Provisioning: Clarify ./ prefixes

* POC/Provisioning: Apply safe path rules

* POC/Provisioning: Linter: Fix comment

* POC/Provisioning: Test: Ensure invalid paths fail
2024-12-11 12:13:27 +01:00
Stephanie Hingtgen b05d60e5b5 k8s: dashboards: remove FT (#97758) 2024-12-10 12:35:36 -06:00
Ryan McKinleyandRoberto Jimenez Sanchez d33424e265 POC/Provisioning: Support test method for repository configuration (#97485)
* add test method

* support new

* show test failure in the UI

* update betterer

* fix lint/test

* merge

* merge

* frontend more cleanup

* move common validation functions

* cleanup

* Add github repository tests

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
2024-12-10 16:03:20 +01:00
Ryan McKinley ef5dacd289 POC/Provisioning: Add multiple commits to one job w/ Watch (#97716) 2024-12-10 13:10:34 +03:00
Matheus Macabu dd969f8a54 Chore: Attempt to reduce flakiness in integration tests (#97247)
* sqlstore/sqlutil: set sync=OFF for sqlite in tests if wal=true

* testinfra: set max open/idle conn to 2 to match e2e tests
2024-12-10 10:55:18 +01:00
Mariell Hoversholm 76a265ce3e POC/Provisioning: Remove hello world resource (#97717)
It feels like it's time to get rid of this. It has been useful for testing, but ultimately replaced by proper
subresources in their own paths and files.
2024-12-10 08:54:23 +01:00
Ryan McKinley 06a3297669 merge magin 2024-12-10 08:09:36 +03:00
Ryan McKinleyandRoberto Jimenez Sanchez 7e777b18ef POC/Provisioning: Create work queue (#97637)
* split the webhook behavior

* keep sync for now

* keep sync for now

* fix lint

* parsing jobs... not yet processing

* parsing jobs...

* lint fix

* respond with the parsed job

* Fix issues

* Fix job spec

* fix test

* job queue

* job queue

* update test

* use checkout/complete

* fix tests

* add logging

* fixed comments

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
2024-12-09 18:50:07 +01:00
Yuri Tseretyan 2d386e6704 Alerting: Migrate notification models to generated by grafnaa-app-sdk (#95430)
* create notifications module and generate models

* switch template group to app models

* switch time intervals to use app models

* switch receiver to use app models

* switch routing tree to use app models

* move schema registration to resource packages

* fix package names to match app

* fix codeowners

* fix UI to use metadata.name instead of uid

* update dockerfile

* move generated models to pkg

* remove provenance from field selector

* move client factories to test files

* rename GenericClient to TypedClient
2024-12-09 10:29:05 -05:00
Ryan McKinley 4104a5a883 remove experimental FF 2024-12-06 07:46:20 +03:00
Ryan McKinley 6c83756539 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-12-04 16:18:55 +03:00
Roberto Jiménez Sánchez a722b485da [Prototyping] Add repository history endpoint (#97345) 2024-12-03 16:42:07 +01:00
Jean-Philippe Quéméner 5bf0872d14 fix(short-url): redirect to main page if not found (#97347) 2024-12-03 16:32:53 +01:00
Roberto Jiménez Sánchez 48feba66e6 [Prototyping] Lint dashboard in pull requests (#97199)
* Make lint issues comment

* Make it work

* Delete previous comments

* Move linting to separate package

* Fix issue with refactoring

* Update test fixture
2024-11-29 16:24:45 +01:00
Mariell Hoversholm ea8d46dfd3 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2024-11-28 15:31:03 +01:00
Kévin GomezandIvan Ortega c8d3ea58f8 Support importing local cue modules when generating TS types with cog (#96876)
* Support importing local cue modules when generating TS types with cog

* Generate enums as unions of values instead of an actual `enum` statement

* Update transformers to use the new TS enums

* Update go workspaces

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-11-28 10:45:31 +01:00
Mariell Hoversholm 46640cd882 POC/Provisioning: Resources: Move resource interactions to own package (#97107)
* POC/Provisioning: Resources: Move client to its own package

* POC/Provisioning: Resources: Move parsing to resources package

* POC/Provisioning: Test: Align disco response
2024-11-28 08:06:49 +01:00
Carl Bergquist 722af820a5 Scopes: Use new flag + app_mode=prod in integration tests (#97081)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2024-11-27 09:38:54 +01:00
Ryan McKinley ab2f168b71 fix test 2024-11-27 11:19:05 +03:00
Ryan McKinley 03c43ae467 merge main 2024-11-27 09:26:00 +03:00
Arati R. 6d04023aa6 K8s/Folders: Improve k8s client implementation of get (#96434)
* Enable getting folders with kubernetes client
* Add TestIntegrationFolderGetPermissions
* Set full path as part of legacy get
* Replace implementation for setting fullpath
* Add folder get test
* Escape forward slash in parent titles
* Replace test for access control metadata
* Add test case to TestIntegrationFolderGetPermissions
* Improve fetching of access control
2024-11-26 16:20:00 +02:00
Mariell Hoversholm 42e9570808 POC/Provisioning: Fix: Make github client not call prod GH in tests (#96926)
* refactor: create repository package

* refactor: abstract GH client

* feat: generate mock

* feat: wire in factories

* test: make tests pass

* chore: go fmt
2024-11-25 11:51:29 +01:00