Commit Graph

13512 Commits

Author SHA1 Message Date
Yuri Tseretyan
c3b5cabb14
Alerting: Refactor scheduler's rule evaluator to store rule key (#89925) 2024-07-01 16:43:23 -04:00
Yuri Tseretyan
655e477c20
Alerting: Fix flaky test in scheduler's tests (#89923) 2024-07-01 13:31:03 -04:00
Santiago
fce03cd724
Alerting: Send static headers to the remote Alertmanager (#89846) 2024-07-01 17:48:40 +02:00
Todd Treece
9c6d3590a2
Chore: Fix apiserver circular dependencies (#89918) 2024-07-01 11:42:34 -04:00
Michael Mandrus
6761ed863f
CloudMigrations: Add ordering to snapshot list query (#89916)
add ordering to snapshot list
2024-07-01 11:35:04 -04:00
Yuri Tseretyan
559738ce6a
Alerting: Fix flaky test in historian (#89913) 2024-07-01 16:59:06 +03:00
Gabriel MABILLE
71d31397e5
Fix flaky tests (#89910) 2024-07-01 14:39:51 +02:00
Ashley Harrison
c0058f9c7e
Page: Add bodyScrolling feature toggle (#89895)
add bodyScrolling feature toggle
2024-07-01 11:28:39 +01:00
Andres Martinez Gotor
a22c1ae424
Chore: Remove provisional APIVersion from plugin info (#89831) 2024-07-01 10:53:16 +02:00
Andres Martinez Gotor
55ba32bda7
Bugfix: Fix Testdata CSV empty scenario (#89890) 2024-07-01 10:39:43 +02:00
Ida Štambuk
ba5b33227c
Cloudwatch: Round up endTime in GetMetricData to next minute (#89341)
* Add cloudWatchRoundUpEndTime feature toggle
2024-06-27 17:10:28 +02:00
Alexander Zobnin
190892bc88
Zanzana: Initial schema loading (#89492)
* Zanzana: Dummy schema loading

* Load authorzation model for client

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-06-27 13:57:06 +02:00
Alexander Akhmetov
68691c9386
Alerting: Add setting for maximum allowed rule evaluation results (#89468)
* Alerting: Add setting for maximum allowed rule evaluation results

Added a new configuration setting `quota.alerting_rule_evaluation_results` to set the maximum number of alert rule evaluation results per rule. If the limit is exceeded, the evaluation will result in an error.
2024-06-27 09:45:15 +02:00
Dominik Prokop
be1414b36b
Dashboards: Remove scenes feature toggle (#89771) 2024-06-27 09:03:46 +02:00
Jeff Levin
ed13959e33
Optimize memory allocations in permissions cache (#89645)
This PR reduces the number of allocations made while caching permissions from the database, fixes the hierarchy of spans and adds new spans for tracing.

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-26 23:03:13 +03:00
Matthew Jacobson
e121e2609f
Alerting: Receiver API (#89707) 2024-06-26 20:03:25 +03:00
Isabella Siu
3ac109e759
AWS: Update deprecated aws-sdk functions from env variable versions (#89643) 2024-06-26 11:56:39 -04:00
Karl Persson
7f4faaa45b
ExtJWT: Remove test (#89665)
Remove test
2024-06-26 17:25:26 +02:00
Yuri Tseretyan
06d5850396
Alerting: Update alerting state history API to authorize access using RBAC (#89579)
* add method CanReadAllRules to rule authorization service

* add alias type Namespace for Folder in ngalert's models package. It implements the Namespacer interface that is used by authz logic

* update state history's backends to authorize access to rules.
* update Loki to add folders UIDs to query. 
    * Update BuildLogQuery to drop filter by folders if it's too long and fall back to in-memory filtering.
2024-06-26 10:25:37 -04:00
Santiago
fe1309dd96
Alerting: Send external URL to the remote Alertmanager (#89701)
* Alerting: Send external URL to the remote Alertmanager

* test that the URL is sent to the remote Alertmanager

* AppURL -> ExternalURL
2024-06-26 14:02:02 +02:00
Ryan McKinley
3db4e5a0c6
K8s: remove dashboard summary abstraction (#89761) 2024-06-26 15:00:24 +03:00
Nihal
b1ce7e8a83
Alerting: Reduce cyclomatic complexity of PrepareRuleGroupStatuses (#89649)
* reduce cyclomatic complexity of PrepareRuleGroupStatuses. see https://github.com/grafana/grafana/issues/88670

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

* reduce cyclomatic complexity for PrepareRuleGroupStatuses in pkg/services/ngalert/api/api_prometheus.go

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

* reduce cyclomatic complexity for PrepareRuleGroupStatuses in pkg/services/ngalert/api/api_prometheus.go

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>

---------

Signed-off-by: Syed Nihal <syed.nihal@nokia.com>
2024-06-26 10:21:37 +02:00
Leonor Oliveira
2645958c8c
Use global function to compare any entity to both stores (#89282)
* WIP implement generic compare interface

* Use global compare fn for all entities

* Lint

* Update pkg/apiserver/rest/dualwriter.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Don't need to hash, just compare bytes

* Fix tests

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-06-26 10:19:40 +02:00
Ryan McKinley
4651506319
K8s/Dashboards: Replace multiple calls with a single endpoint (#89639) 2024-06-26 07:27:52 +03:00
Juan Cabanas
0d276fe7b1
Share Externally: Texts modification (#89640) 2024-06-25 17:52:41 -03:00
Kevin Minehart
8f9d2eba69
CI: Don't use slim image for bump-version (#89689)
don't use slim image
2024-06-25 14:03:30 -05:00
Matthew Jacobson
83d05ea777
Alerting: Fix broken state tests (#89712) 2024-06-25 14:19:46 -04:00
Matthew Jacobson
47c9259d75
Alerting: Ensure we update State.LastSentAt before persisting (#89427) 2024-06-25 13:01:26 -04:00
Laura Fernández
a3879e02bb
RestoreDashboards: Create FE feature toggle (#89655) 2024-06-25 16:43:13 +02:00
William Wernert
fcfa89f864
Alerting: Implement Prometheus remote write for recording rules (#89189)
* Fix timestamp recorded by rule

* Implement prometheus remote write

* Create http client instead of transport

* Address PR comments

* Remove status code label
2024-06-25 17:23:42 +03:00
Todd Treece
71270f3203
Storage: Avoid relying on RequestInfo (#89635) 2024-06-25 10:06:03 -04:00
Yuri Tseretyan
4a5aab54a5
Alerting: Add max limit for Loki query size in state history API (#89646)
* add setting for query limit

* update BuildLogQuery to return error if limit is exceeded

* move tests for BuildLogQuery to separate suite
2024-06-25 09:20:38 -04:00
Kristin Laemmert
9a3477dd11
Chore: removing (more) redundant transactions (#89373)
* remove redundant transactions from single-statement sql methods
2024-06-25 09:19:49 -04:00
linoman
ccb22e5b24
SAML: graph api follow up (#89389)
* add new graph api variables to saml strategy

* add  config variable
2024-06-25 12:19:47 +02:00
Karl Persson
eea7319a67
Zanzana: sqlite data store (#89486)
* Zanzana: Add sqlite3 store

* Zanzana: Initilize sqlite store with migrations
2024-06-25 09:52:33 +02:00
Alexander Akhmetov
2035814059
Alerting: fix updating error in the alert rule state during error to error transitions and restarts (#89557)
Alerting: fix preserving errors in the alert rule state during error to error transitions

Alert state transition from one error to another did not update state.Error correctly.
The error in state.Error remained as the initial error encountered.
This led to another issue, where after a Grafana restart, the error was lost because
the state of the alert rule did not change, but the Error is not preserved in the database
between restarts.

This could happen if the expression service returned an error or the alert routine panicked
during querying.
2024-06-25 09:42:00 +02:00
Michael Mandrus
4d69213829
CloudMigrations: Break snapshot resources out into their own table (#89575)
* create a new table for migration resources

* remove raw result bytes from db

* more snapshot resource management stuff

* integrate new table with snapshots

* pass in result limit and offset as params

* combine create and update

* set up xorm store test

* add unit tests

* save some cpu

* remove unneeded arg

* regen swagger

* fix bug with result processing

* fix update create logic so that uid isn't required for lookup

* change offset to page

* regen swagger

* revert accidental changes to file

* curl command page should be 1 indexed
2024-06-24 23:50:07 -04:00
Haris Rozajac
e9ee65924b
Chore: Remove explore content outline feature toggle (#89277)
Remove explore content outline feature toggle
2024-06-24 09:45:42 -06:00
Christopher Lord
d701c181e1
chore: rename 'Incidents' sidebar to 'Incident' (the product name) (#87396)
* chore: rename 'Incidents' sidebar to 'Incident' (the product name)

* run make i18n-extract
2024-06-24 17:55:53 +03:00
Rajguru
1b2f110664
Users: Add config option to control how often last_seen is updated (#88721)
Users: Add config option to control how often last_seen is updated

Co-authored-by: Karl Persson <kalle.persson92@gmail.com>
2024-06-24 16:54:56 +02:00
Marcus Andersson
04f39457cf
Chore: Remove sensitive information from presigned URLs prior to logging (#87035)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2024-06-24 14:53:42 +02:00
Jean-Philippe Quéméner
bc43078320
fix(grafana-apps): copy namespace from connect ctx (#89569) 2024-06-21 20:05:55 +03:00
Leonor Oliveira
e216de56e6
Unified Storage: Always populate RV and UID on create (#89554) 2024-06-21 17:37:53 +01:00
Michael Mandrus
89337ea01f
CloudMigrations: Add unit tests for snapshot management (#89521)
* add regex support for api tests

* revert dumb thing

* add api tests

* add unit test for core async workflow

* add xorm store unit tests

* fix typo

* remove unnecessary assignment
2024-06-21 16:35:15 +03:00
Ryan McKinley
70cd002826
Storage: Make entity to runtime.Object conversion public (#89549)
* make conversion public

* make conversion public
2024-06-21 16:28:09 +03:00
Mihai Doarna
02b0b7af16
SSO: Add basic validation rules for LDAP settings (#89548)
add basic validation rules for LDAP settings
2024-06-21 15:48:19 +03:00
Kristin Laemmert
ab5a079bcc
Fix: add mapping for the new mysqlRepl driver (#89551) 2024-06-21 08:35:46 -04:00
Gabriel MABILLE
f0ff7d57b4
RBAC: Allow folders actions in plugins roles (#89523)
* Allow some additional core actions for plugins

* typo

* Test nit.
2024-06-21 12:08:30 +03:00
Ryan McKinley
93ef90a1e4
K8s: remove (not great) example api (#89524) 2024-06-21 10:23:08 +03:00
Yuri Tseretyan
b075926202
Alerting: Time Intervals API (#88201)
* expose ngalert API to public
* add delete action to time-intervals
* introduce time-interval model generated by app-platform-sdk from CUE model the fields of the model are chosen to be compatible with the current model
* implement api server
* add feature flag alertingApiServer
---- Test Infra
* update helper to support creating custom users with enterprise permissions
* add generator for Interval model
2024-06-20 16:52:03 -04:00