Skip to content

Commit 7070ba7

Browse files
zzylolclaude
andcommitted
Fix three CI failures: eval path resolution, Python deps, Rust pattern tests
- accuracy_performance.yml: remove --project-directory . from eval job so bind mounts in asap-quickstart/docker-compose.yml resolve from asap-quickstart/ (fixes asap-planner-rs exit 1 due to missing controller-config.yaml) - correctness.yml: fix pip install path to asap-common/dependencies/py/promql_utilities/ (setup.py is there, not at the parent dir; fixes silent failure + missing promql_parser) - pattern_tests.rs: add avg_over_time and *_over_time variants to ONLY_TEMPORAL; remove duplicate ONLY_VECTOR key so disambiguation works deterministically; add build_combined_quantile_pattern for 2-arg quantile_over_time in combined queries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e828cca commit 7070ba7

3 files changed

Lines changed: 47 additions & 10 deletions

File tree

.github/workflows/accuracy_performance.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,13 @@ jobs:
104104
- name: Pull and start full stack
105105
run: |
106106
docker compose \
107-
--project-directory . \
108107
-f asap-quickstart/docker-compose.yml \
109108
-f benchmarks/docker-compose.yml \
110109
up -d
111110
112111
- name: Show running containers
113112
run: |
114113
docker compose \
115-
--project-directory . \
116114
-f asap-quickstart/docker-compose.yml \
117115
-f benchmarks/docker-compose.yml \
118116
ps
@@ -151,7 +149,6 @@ jobs:
151149
if: failure()
152150
run: |
153151
docker compose \
154-
--project-directory . \
155152
-f asap-quickstart/docker-compose.yml \
156153
-f benchmarks/docker-compose.yml \
157154
logs --no-color
@@ -160,7 +157,6 @@ jobs:
160157
if: always()
161158
run: |
162159
docker compose \
163-
--project-directory . \
164160
-f asap-quickstart/docker-compose.yml \
165161
-f benchmarks/docker-compose.yml \
166162
down -v

.github/workflows/correctness.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
if [ -f asap-common/dependencies/py/requirements.txt ]; then
4141
pip install -r asap-common/dependencies/py/requirements.txt
4242
fi
43-
pip install -e asap-common/dependencies/py/ 2>/dev/null || true
43+
pip install -e asap-common/dependencies/py/promql_utilities/
4444
4545
- name: Install Rust
4646
uses: dtolnay/rust-toolchain@stable
@@ -98,7 +98,7 @@ jobs:
9898
if [ -f asap-common/dependencies/py/requirements.txt ]; then
9999
pip install -r asap-common/dependencies/py/requirements.txt
100100
fi
101-
pip install -e asap-common/dependencies/py/ 2>/dev/null || true
101+
pip install -e asap-common/dependencies/py/promql_utilities/
102102
103103
- name: Install Rust
104104
uses: dtolnay/rust-toolchain@stable

asap-common/tests/compare_matched_tokens/rust_tests/src/pattern_tests.rs

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,20 @@ impl PatternTester {
4444

4545
// ONE_TEMPORAL_ONE_SPATIAL patterns
4646
let combined_patterns = vec![
47-
// Sum of rate pattern
47+
// Aggregation of single-arg temporal functions
4848
PromQLPattern::new(
4949
Self::build_one_temporal_one_spatial_pattern(),
5050
// Some("ONE_TEMPORAL_ONE_SPATIAL".to_string()),
5151
),
52+
// Aggregation of quantile_over_time (2-arg)
53+
PromQLPattern::new(
54+
Self::build_combined_quantile_pattern(),
55+
// Some("ONE_TEMPORAL_ONE_SPATIAL".to_string()),
56+
),
5257
];
5358

5459
// Insert in order from simple to complex to avoid panics
55-
patterns.insert("ONLY_VECTOR".to_string(), spatial_patterns.clone());
60+
// ONLY_VECTOR is derived via disambiguation in test_query, not a separate entry
5661
patterns.insert("ONLY_SPATIAL".to_string(), spatial_patterns);
5762
patterns.insert("ONLY_TEMPORAL".to_string(), temporal_patterns);
5863
patterns.insert("ONE_TEMPORAL_ONE_SPATIAL".to_string(), combined_patterns);
@@ -261,7 +266,20 @@ impl PatternTester {
261266

262267
let args: Vec<Option<HashMap<String, Value>>> = vec![ms];
263268

264-
PromQLPatternBuilder::function(vec!["rate", "increase"], args, Some("function"), None)
269+
PromQLPatternBuilder::function(
270+
vec![
271+
"rate",
272+
"increase",
273+
"avg_over_time",
274+
"sum_over_time",
275+
"count_over_time",
276+
"min_over_time",
277+
"max_over_time",
278+
],
279+
args,
280+
Some("function"),
281+
None,
282+
)
265283
}
266284

267285
fn build_quantile_over_time_pattern() -> Option<HashMap<String, Value>> {
@@ -308,7 +326,6 @@ impl PatternTester {
308326

309327
let func = PromQLPatternBuilder::function(
310328
vec![
311-
"quantile_over_time",
312329
"sum_over_time",
313330
"count_over_time",
314331
"avg_over_time",
@@ -332,6 +349,30 @@ impl PatternTester {
332349
)
333350
}
334351

352+
fn build_combined_quantile_pattern() -> Option<HashMap<String, Value>> {
353+
let num = PromQLPatternBuilder::number(None, None);
354+
let ms = PromQLPatternBuilder::matrix_selector(
355+
PromQLPatternBuilder::metric(None, None, None, Some("metric")),
356+
None,
357+
Some("range_vector"),
358+
);
359+
let func_args: Vec<Option<HashMap<String, Value>>> = vec![num, ms];
360+
let func = PromQLPatternBuilder::function(
361+
vec!["quantile_over_time"],
362+
func_args,
363+
Some("function"),
364+
None,
365+
);
366+
PromQLPatternBuilder::aggregation(
367+
vec!["sum", "count", "avg", "quantile", "min", "max"],
368+
func,
369+
None,
370+
None,
371+
None,
372+
Some("aggregation"),
373+
)
374+
}
375+
335376
fn build_sum_rate_pattern() -> Option<HashMap<String, Value>> {
336377
let ms = PromQLPatternBuilder::matrix_selector(
337378
PromQLPatternBuilder::metric(None, None, None, Some("metric")),

0 commit comments

Comments
 (0)