Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/mvp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
uses: actions/checkout@v4
with:
repository: ProjectASAP/asap_sketchlib
# PR #139: standard-update compatibility check used by UnivMon restore.
ref: c0de315754f9a6c77dd7a25aca0b2b62f0aec276
path: asap_sketchlib

- name: Install Rust components
Expand Down
92 changes: 76 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ clap = { version = "4.0", features = ["derive", "env"] }
chrono = { version = "0.4", features = ["serde"] }
# One parser source for backend parsing. Member crates inherit this immutable
# ProjectASAP revision through `workspace = true`.
promql-parser = { git = "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/ProjectASAP/promql-parser", rev = "d7606436bde05efe19c5398fe2122faa49062f7d" }
promql-parser = { git = "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/ProjectASAP/promql-parser", rev = "9fede7eecca923c9882fe256484d00d37f8706cb" }
tokio = { version = "1.0", features = ["full"] }
arc-swap = "1.7"

Expand Down
9 changes: 5 additions & 4 deletions control_plane/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ asap_types.workspace = true
# scaffolding, unaware that `data_plane`'s `summary_executor.rs` in *this*
# repo is a real one. Vendored locally instead of chased upstream -- see
# `data_plane/src/query_engines/asap_query_engine/summary_exec.rs`.
planner-types = { package = "asap-types", git = "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/ProjectASAP/ASAPPlanner", rev = "890504025e4f780880cc6c89d24edd6591af868a" }
asap-aware-mapping = { git = "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/ProjectASAP/ASAPPlanner", rev = "890504025e4f780880cc6c89d24edd6591af868a" }
planner-types = { package = "asap-types", git = "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/ProjectASAP/ASAPPlanner", rev = "7e7931b581f4941ad02e4c6d90d41f2e95b2d7fc" }
asap-aware-mapping = { git = "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/ProjectASAP/ASAPPlanner", rev = "7e7931b581f4941ad02e4c6d90d41f2e95b2d7fc" }

# L1 adoption (design-target-architecture.md Part B): the PromQL front
# end itself, replacing control_plane's own query_parser/promql.rs.
# Pinned via `rev`, not a floating branch reference. Same rev as
# `planner-types`/`asap-aware-mapping` above -- these three MUST move
# together (two revs of the same upstream repo's types in one workspace
# resolve to distinct Rust types that won't unify).
asap-frontend-promql = { git = "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/ProjectASAP/ASAPPlanner", rev = "890504025e4f780880cc6c89d24edd6591af868a" }
asap-frontend-sql = { git = "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/ProjectASAP/ASAPPlanner", rev = "890504025e4f780880cc6c89d24edd6591af868a" }
asap-frontend-promql = { git = "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/ProjectASAP/ASAPPlanner", rev = "7e7931b581f4941ad02e4c6d90d41f2e95b2d7fc" }
asap-frontend-sql = { git = "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/ProjectASAP/ASAPPlanner", rev = "7e7931b581f4941ad02e4c6d90d41f2e95b2d7fc" }

[dev-dependencies]
tokio = { version = "1", features = ["full", "test-util"] }
Expand All @@ -96,5 +96,6 @@ http-body-util = "0.1"
tokio-tungstenite = "0.21"

[build-dependencies]
toml = "0.8"
prost-build = "0.13"
tonic-build = "0.12"
20 changes: 20 additions & 0 deletions control_plane/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ fn git_path(repo: &Path, name: &str) -> Option<PathBuf> {
fn main() -> Result<(), Box<dyn std::error::Error>> {
let manifest_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR")?);
let repo = manifest_dir.parent().unwrap_or(&manifest_dir);
let lock_path = repo.join("Cargo.lock");
println!("cargo:rerun-if-changed={}", lock_path.display());
let lock: toml::Value = std::fs::read_to_string(&lock_path)?.parse()?;
let planner_source = lock
.get("package")
.and_then(toml::Value::as_array)
.into_iter()
.flatten()
.find(|package| package.get("name").and_then(toml::Value::as_str) == Some("asap-types"))
.and_then(|package| package.get("source"))
.and_then(toml::Value::as_str)
.ok_or("Cargo.lock has no resolved ASAPPlanner types source")?;
let planner_revision = planner_source
.rsplit_once('#')
.filter(|(_, revision)| {
revision.len() == 40 && revision.bytes().all(|b| b.is_ascii_hexdigit())
})
.map(|(_, revision)| revision)
.ok_or("ASAPPlanner source must resolve to a Git commit")?;
println!("cargo:rustc-env=ASAPPLANNER_REVISION={planner_revision}");
let revision = std::env::var("ASAPQUERY_BACKEND_REVISION")
.ok()
.or_else(|| git_output(repo, &["rev-parse", "HEAD"]))
Expand Down
4 changes: 2 additions & 2 deletions control_plane/src/emit/otap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ fn build_asap_sketches_config(sp: &EdgeSketchProcessor, window_secs: Option<u64>
m.insert("delta".into(), Value::Number(delta.into()));
m.insert("delta_transmission".into(), Value::Bool(true));
}
SketchParams::Kmv { .. } | SketchParams::Theta { .. } => {
SketchParams::UnivMon { .. } | SketchParams::Kmv { .. } | SketchParams::Theta { .. } => {
unreachable!(
"edge sketch processor config requested for a non-sketch or unsupported \
SketchAlgorithm; no Bind* rule in this repo produces one"
Expand All @@ -342,7 +342,7 @@ fn sketch_algorithm_tag(kind: &SketchAlgorithm) -> &'static str {
SketchAlgorithm::Hll => "hll",
SketchAlgorithm::Cms | SketchAlgorithm::CmsWithHeap => "cms",
SketchAlgorithm::CountSketch | SketchAlgorithm::CountSketchWithHeap => "count_sketch",
SketchAlgorithm::Kmv | SketchAlgorithm::Theta => {
SketchAlgorithm::UnivMon | SketchAlgorithm::Kmv | SketchAlgorithm::Theta => {
unreachable!(
"edge sketch processor config requested for a non-sketch or unsupported \
SketchAlgorithm; no Bind* rule in this repo produces one"
Expand Down
Loading
Loading