1
0
mirror of https://github.com/prometheus/prometheus synced 2025-03-24 20:27:01 +00:00
prometheus/rules
Julien Duchesne 1a27ab29b8
Rules: Store dependencies instead of boolean ()
* Rules: Store dependencies instead of boolean
To improve https://github.com/prometheus/prometheus/pull/15681 further, we'll need to store the dependencies and dependents of each

Right now, if a rule has both (at least 1) dependents and dependencies, it is not possible to determine the order to run the rules and they must all run sequentially

This PR only changes the dependents and dependencies attributes of rules, it does not implement a new topological sort algorithm

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>

* Store a slice of Rule instead

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>

* Add `BenchmarkRuleDependencyController_AnalyseRules` for future reference

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>

---------

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>
2025-01-06 20:48:38 +00:00
..
fixtures RuleConcurrencyController: Add SplitGroupIntoBatches method () 2025-01-06 18:51:19 +00:00
alerting_test.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00
alerting.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00
group_test.go rules.NewGroup: Fix when no logger is passed () 2024-11-21 16:53:06 +01:00
group.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00
manager_test.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00
manager.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00
origin_test.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00
origin.go Decouple ruler dependency controller from concurrency controller 2024-02-02 10:06:37 +01:00
recording_test.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00
recording.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00
rule.go Rules: Store dependencies instead of boolean () 2025-01-06 20:48:38 +00:00