Skip to content

Commit d76b7b7

Browse files
committed
Revert
1 parent a0f7f60 commit d76b7b7

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/router/src/pipeline/progressive_override.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl StableOverrideContext {
119119
/// It's intended to be used as a shared state in the router.
120120
pub struct OverrideLabelsEvaluator {
121121
static_enabled_labels: HashSet<String>,
122-
expressions: HashMap<String, Expression>,
122+
expressions: HashMap<String, VrlProgram>,
123123
}
124124

125125
impl OverrideLabelsEvaluator {
@@ -174,7 +174,7 @@ impl OverrideLabelsEvaluator {
174174
let mut ctx = VrlContext::new(&mut target, &mut state, &timezone);
175175

176176
for (label, expression) in &self.expressions {
177-
match expression.execute_with_context(&mut ctx) {
177+
match expression.resolve(&mut ctx) {
178178
Ok(evaluated_value) => match evaluated_value {
179179
VrlValue::Boolean(true) => {
180180
active_flags.insert(label.clone());

lib/router-config/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jsonwebtoken = { workspace = true }
2424
retry-policies = { workspace = true}
2525
tracing = { workspace = true }
2626

27-
once_cell = "1.21.3"
2827
schemars = "1.0.4"
2928
humantime-serde = "1.1.1"
3029
config = { version = "0.15.14", features = ["yaml", "json", "json5"] }

lib/router-config/src/override_labels.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ use schemars::JsonSchema;
22
use serde::{Deserialize, Serialize};
33
use std::collections::HashMap;
44

5-
use crate::primitives::expression::Expression;
6-
75
/// A map of label names to their override configuration.
86
pub type OverrideLabelsConfig = HashMap<String, LabelOverrideValue>;
97

@@ -17,7 +15,7 @@ pub enum LabelOverrideValue {
1715
/// A static boolean value to enable or disable the label.
1816
Boolean(bool),
1917
/// A dynamic value computed by an expression.
20-
Expression(Expression),
18+
Expression { expression: String },
2119
}
2220

2321
impl LabelOverrideValue {

0 commit comments

Comments
 (0)