76 Commits

Author SHA1 Message Date
e128c36127 Codegen: Cog and go fixes (#101408)
* Update to latest cog version and update workspaces

* Update generated go files

* Try to avoid concurrency issues

* Update workspaces

* Try to remove the sync...

* Remove grafana dependency from xorm go.mod file
2025-03-12 10:12:56 +01:00
510c76df49 Chore: Update to latest go plugin SDK (#101939)
* update to latest go plugin SDK

* add missing changes
2025-03-11 14:57:19 +00:00
ea89a68028 K8s/Dashboards: Generate Dashboards k8s APIs using Grafana App SDK (#99966)
* Generate Dashboard kinds with `grafana-app-sdk`

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Hack together a fix for invalid TS codegen for v0 & v1

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Address Go linter issues

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Address TS linter issues

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Add new app to CODEOWNERS

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Fix a couple of issues detected by tests

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update OpenAPI definitions and test files

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Remove title from Dashboard v1alpha1 spec

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Remove unused CUE schemas

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* remove unrelated files

* allow any in the generated betterer

* Add a comment explaining why we don't use deepcopy-gen

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Default to v2alpha1 if dashboards v2 FF is enabled

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-03-11 13:00:37 +02:00
8142aef64d Advisor: Avoid evaluating a check for another namespace (#101885) 2025-03-10 17:09:11 +01:00
caabb06cd8 Chore: Bump dependencies to address security issues (#101620)
* Chore: Bump golang.org/x/net to v0.36.0

* Chore: Use github.com/moby/moby version 27.5.1 instead of 26.0.0

* Chore: Bump github.com/ua-parser/uap-go to v0.0.0-20250213224047-9c035f085b90

* Chore: Bump github.com/grpc-ecosystem/go-grpc-middleware/v2 to fix 32-bit overflow issue
2025-03-06 10:12:05 +01:00
61eb837dd6 Chore: Bump Go to 1.23.7 (#101576) 2025-03-05 14:55:36 +01:00
01899d761e Zanzana: Upgrade to OpenFGA v1.8.6 (#101553)
* Zanzana: Upgrade to OpenFGA v1.8.6

* upgrade openfga
2025-03-05 11:58:31 +01:00
165bca6417 Chore: Add initial/experimental xorm spanner driver (#101398)
* make it build and start

* run some migrations

* add build tags, remove log

* remove unused code

* revert go.mod changes

* move initialisation into dialect file

* update workspace

* update workspace once again

* clean up dependencies

* further cleanup

* Address some review feedback.

* Fix go.sum.

---------

Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
2025-03-03 17:02:10 +01:00
b16904651f Chore: Bump grafana-plugin-sdk-go to v0.267.0 (#101376)
* bump grafana-plugin-sdk-go to v0.267.0

* make update-workspace
2025-02-27 11:13:58 +01:00
120b277664 Advisor: Cloud fixes (#101136) 2025-02-25 11:41:44 +01:00
3aedb9159e Chore: Update golang.org/x/crypto and golang.org/x/ouath2 to address security issues (#101268)
- CVE-2025-22869 and Go issue https://go.dev/issue/71931.
- CVE-2025-22868 and Go issue https://go.dev/issue/71490.
2025-02-25 11:15:41 +01:00
2313eca636 Chore: Update local go dependencies (#101088) 2025-02-20 12:55:28 -05:00
a24fd1b722 Advisor: Redefine check properties (#100874) 2025-02-19 15:11:55 +01:00
ff7ba54cbc Investigations: Add experimental app platform backend (#100584)
* add investigations group?

* Investigations: Add experimental app platform backend

* change `grafana-app-sdk/logging` version

* investigations: add feature flag to test

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
2025-02-17 19:19:22 +01:00
37ee1c427d Plugins: Upgrade grafana-plugin-sdk to 0.266.0 (#100727) 2025-02-14 16:33:45 +01:00
12bb50f97f Advisor: Make evaluation interval and max history configurable (#100534) 2025-02-14 10:05:34 +01:00
b6c0db31d9 Advisor: Clean up old checks (#100375) 2025-02-11 09:36:46 +01:00
42170ad23a Advisor: Create checks following a schedule (#100282) 2025-02-10 13:15:41 +01:00
390b5eb6d4 go.mod: updated grafana-plugin-sdk-go (#100342)
* go.mod: update grafana-plugin-sdk-go

* make update-workspace
2025-02-10 11:38:30 +01:00
f607bcd43f Advisor: Replace Error naming with Failure (#100262) 2025-02-07 15:48:18 +01:00
e291140be3 Advisor: Run check steps in parallel (#100200) 2025-02-07 10:57:26 +01:00
9da423045e Advisor: Enable frontend code generation for the checktype kind (#100208)
nit: enabling frontend code generation for the `checktype`
2025-02-07 10:49:27 +01:00
ae33d49036 Advisor: Assert new fields (#100199) 2025-02-06 16:29:54 +02:00
52db2070a0 Advisor: Expose check types as a resource (#100058) 2025-02-06 13:35:40 +01:00
36275a5510 Advisor: Refactor check interfaces (#100043) 2025-02-06 09:55:17 +01:00
6d159b6240 Advisor: Fix Healtcheck check (#100115) 2025-02-05 14:59:40 +01:00
4cd2ebe186 Grafana Advisor: Automatically generate frontend types (#99807)
* Grafana Advisor: Frontend types

* fix bad merge
2025-02-03 11:45:17 +01:00
b683724bec Upgrade grafana-app-sdk to 0.31.0 (#99739)
* Upgrade grafana-app-sdk to 0.31.0

What

This commit upgrades the app SDK to 0.31.0 and re-generates codegen files.
It doesn't touch alerting schemas, because those are quite old and
should be upgraded separately.

This commit slightly alters the schemas for the investigations app,
because the codegen is not happy with the current syntax, for some
reason (probably has to do with CUE upgrades in `cog`).

Why

To make sure we use up-to-date SDK version and remove the workaround for
the `defencoding=none` bug that required us to clean up generated CRD
files.

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Revert changes to golden file for store tests

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-01-30 16:10:42 +02:00
1e3783cc11 Grafana Advisor: Add links to suggested actions (#99764)
Grafana Advisor: Add links to proposed actions
2025-01-30 13:40:37 +01:00
b0e74cf737 Grafana Advisor: Plugin checks (#99502) 2025-01-27 16:39:46 +01:00
571f20676d Azure: Bump grafana-azure-sdk-go to 2.1.6 (#99524)
* added changes for rebase

* ran go mod tidy and ran a build

* ran a build

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* updated go.work.sum to upstream

* added newline to match upstream

* added more specificity in documentation

* bump grafana-azure-sdk-go to update package for currentuser auth support

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2025-01-27 14:50:31 +00:00
3993d691f4 Advisor: Implement authorizer (#99440) 2025-01-23 18:00:02 +02:00
b066a63131 Grafana Advisor: Datasource checks (#99313) 2025-01-23 16:19:50 +01:00
f1e9c5b1ef chore: Use non-zero version to reference github.com/grafana/grafana Go module (#99343)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2025-01-21 23:59:22 +02:00
1740ee82ba Chore: Avoid authlib/claims in go.mod (#99311) 2025-01-21 14:01:21 +01:00
e747350fee Grafana Advisor: Skeleton app (#99242) 2025-01-21 12:31:33 +01:00
414f8d14f4 Azure: User-auth updates (#99113)
* Bump Azure sdk

* Minor fix because of credentials update

* Revert "Minor fix because of credentials update"

This reverts commit 1f49949ee3da522a304d66b33a596daae78d112d.
2025-01-17 12:13:34 -06:00
bc6b7a4df6 Update playlists app schemas to work with app SDK v0.29.0 (#98974)
* Update playlists app schemas to work with app SDK v0.29.0

What

* Added the manifest for the playlists app
* Updated playlist kind definition to match the new format
* Re-generated the files
* Changed Makefile to not use post-processing flag

Why

To make sure the codegen works with the latest version of the app SDK.

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update app SDK to v0.30.0

* Skip generating custom resource definitions

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Fix SDK not generating the manifest Go file

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2025-01-17 16:17:31 +02:00
17a09c28dd Chore: Upgrade openfga to 1.8.4 (#99095) 2025-01-17 09:36:08 +01:00
a08f406781 Security: Update to Go 1.23.5 (#99121)
* feat: update to Go 1.23.5

* chore: make drone

* chore: make update-workspace

* CI: Force re-build

* CI: Force re-build
2025-01-17 09:29:52 +01:00
36d6fad421 Feat: Setup the App SDK logging module (#98927)
* Feat: Setup the App SDK logging module

* Build: Depend on logging pkg and update App SDK

* Chore: Assign owner to logging module
2025-01-14 10:34:57 +01:00
05ea05d64e Chore: Bump Go to 1.23.4 (#98853)
* Chore: Bump Go to 1.23.4

This is done in preparation of updating the App SDK library we import, as it has bumped its Go version to 1.23.4 as well.

* Chore: make update-workspace
2025-01-14 09:28:44 +01:00
1c67f4084c Bump google.golang.org/api from 0.213.0 to 0.216.0 (#98905)
* Bump google.golang.org/api from 0.213.0 to 0.216.0

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.213.0 to 0.216.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.213.0...v0.216.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update workspace

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-13 16:05:48 -05:00
f74396b51d Prometheus: Update prometheus to v0.301.0 for utf8 support (#98848)
* update github.com/prometheus/prometheus to v0.301.0

* have an adapter for infra logger

* go mod tidy and go work sync

* remvoe the cuelang.org/go replace

* remove slog_adapter
2025-01-13 17:14:20 +01:00
ad1417b732 Alerting: Return default builtin templates in k8s templategroup API and UI (#96330)
* Alerting: PoC - default template in k8s templategroup API

* Move code to grafana/alerting

* Move validation to admission validation abstraction

* Testing

* Linting

* Workspace update

* Update grafana/alerting hash to the merged commit

* More user-friendly name and remove need for CREATE/UPDATE validation

Use __default__ for k8s object name and UID so that we don't need to restrict
CREATE/UPDATE for similarly named user-owned templates.
2025-01-10 19:53:18 -05:00
0501ff9079 Codegen: Isolate schema generation code (#98742)
* Create go.mod files for plugins and core kinds

* Update go work and main go.mod dependencies

* Update pfs import

* Missing update of pfs dependency

* Remove fixed cuelang dependency

* Update codeowners

* Update workspace

* Update Dockerfile

* Missing go.mod codeowner

* Use intermediate kin-openapi dependency to make all workspaces to work
2025-01-10 13:33:51 +01:00
ee7ffb7a04 chore(deps): remove obsolete prometheus replace directive (#96925)
* chore(deps): remove obsolete prometheus replace directive

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* chore: Replace newly-deprecated call

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2025-01-09 12:56:42 -05:00
5a2315dabf Plugins: Capture error source from grpc status errors (#97471)
* capture errorsource from grpc error

* apply PR feedback

* update comment

* update comment

* use SDK logic

* update SDK commit

* update sdk

* update golden files
2025-01-08 17:05:28 +00:00
addc1c95a5 Bump golang.org/x/crypto from 0.31.0 to 0.32.0 (#98550)
* Bump golang.org/x/crypto from 0.31.0 to 0.32.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.31.0 to 0.32.0.
- [Commits](https://github.com/golang/crypto/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update workspace

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-07 08:00:45 +03:00
6683cdc082 K8s: Update from v0.31.3 to v0.32.0 (#98507) 2025-01-06 18:20:35 +03:00