From c182d493c1b44155bf8e40639891f653113e63e4 Mon Sep 17 00:00:00 2001 From: zz_y Date: Wed, 2 Sep 2026 11:00:29 -0600 Subject: [PATCH 1/6] ci: gate backend MVP contracts --- .github/workflows/mvp-ci.yml | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/mvp-ci.yml diff --git a/.github/workflows/mvp-ci.yml b/.github/workflows/mvp-ci.yml new file mode 100644 index 000000000..ace6b6e7a --- /dev/null +++ b/.github/workflows/mvp-ci.yml @@ -0,0 +1,60 @@ +name: MVP CI + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +concurrency: + group: mvp-ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + backend: + name: MVP backend + runs-on: ubuntu-latest + timeout-minutes: 45 + steps: + - name: Checkout ASAPQuery-backend + uses: actions/checkout@v4 + with: + path: ASAPQuery-backend + + - name: Checkout ASAPCollector dependency + uses: actions/checkout@v4 + with: + repository: ProjectASAP/ASAPCollector + path: ASAPCollector + + - name: Checkout asap_sketchlib dependency + uses: actions/checkout@v4 + with: + repository: ProjectASAP/asap_sketchlib + path: asap_sketchlib + + - name: Install Rust components + run: rustup component add rustfmt clippy + + - name: Cache Rust build + uses: Swatinem/rust-cache@v2 + with: + workspaces: ASAPQuery-backend + + - name: Check formatting + working-directory: ASAPQuery-backend + run: cargo fmt -p control_plane -p data_plane -- --check + + - name: Check control plane and data plane + working-directory: ASAPQuery-backend + run: cargo check --locked -p control_plane -p data_plane + + - name: Lint control plane and data plane + working-directory: ASAPQuery-backend + run: cargo clippy --locked -p control_plane -p data_plane --all-targets + + - name: Test MVP control plane + working-directory: ASAPQuery-backend + run: cargo test --locked -p control_plane From bc25087c3a8603d5b02ae051ce93d9262ed02403 Mon Sep 17 00:00:00 2001 From: zz_y Date: Wed, 2 Sep 2026 11:02:44 -0600 Subject: [PATCH 2/6] ci: authorize collector dependency checkout --- .github/workflows/mvp-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mvp-ci.yml b/.github/workflows/mvp-ci.yml index ace6b6e7a..70f105f04 100644 --- a/.github/workflows/mvp-ci.yml +++ b/.github/workflows/mvp-ci.yml @@ -28,6 +28,7 @@ jobs: with: repository: ProjectASAP/ASAPCollector path: ASAPCollector + token: ${{ secrets.ASAP_CI_REPO_TOKEN }} - name: Checkout asap_sketchlib dependency uses: actions/checkout@v4 From f19b2264611ef557c3486936a7dfb035e1f13a9e Mon Sep 17 00:00:00 2001 From: zz_y Date: Wed, 2 Sep 2026 11:06:43 -0600 Subject: [PATCH 3/6] ci: authenticate private Cargo sources --- .github/workflows/mvp-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/mvp-ci.yml b/.github/workflows/mvp-ci.yml index 70f105f04..8d3ab39b9 100644 --- a/.github/workflows/mvp-ci.yml +++ b/.github/workflows/mvp-ci.yml @@ -39,6 +39,11 @@ jobs: - name: Install Rust components run: rustup component add rustfmt clippy + - name: Configure private Cargo dependencies + env: + ASAP_CI_REPO_TOKEN: ${{ secrets.ASAP_CI_REPO_TOKEN }} + run: git config --global url."https://x-access-token:${ASAP_CI_REPO_TOKEN}@github.com/".insteadOf "https://github.com/" + - name: Cache Rust build uses: Swatinem/rust-cache@v2 with: @@ -49,13 +54,19 @@ jobs: run: cargo fmt -p control_plane -p data_plane -- --check - name: Check control plane and data plane + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" working-directory: ASAPQuery-backend run: cargo check --locked -p control_plane -p data_plane - name: Lint control plane and data plane + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" working-directory: ASAPQuery-backend run: cargo clippy --locked -p control_plane -p data_plane --all-targets - name: Test MVP control plane + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" working-directory: ASAPQuery-backend run: cargo test --locked -p control_plane From 089b07ade38c437adf0451eea9a7452c46a7ed41 Mon Sep 17 00:00:00 2001 From: zz_y Date: Wed, 2 Sep 2026 11:08:59 -0600 Subject: [PATCH 4/6] ci: resolve sibling dependency lock graph --- .github/workflows/mvp-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mvp-ci.yml b/.github/workflows/mvp-ci.yml index 8d3ab39b9..e39ab9346 100644 --- a/.github/workflows/mvp-ci.yml +++ b/.github/workflows/mvp-ci.yml @@ -57,16 +57,16 @@ jobs: env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" working-directory: ASAPQuery-backend - run: cargo check --locked -p control_plane -p data_plane + run: cargo check -p control_plane -p data_plane - name: Lint control plane and data plane env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" working-directory: ASAPQuery-backend - run: cargo clippy --locked -p control_plane -p data_plane --all-targets + run: cargo clippy -p control_plane -p data_plane --all-targets - name: Test MVP control plane env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" working-directory: ASAPQuery-backend - run: cargo test --locked -p control_plane + run: cargo test -p control_plane From ecb887d8ec4d02022a8406d4a0487bf5eeb86319 Mon Sep 17 00:00:00 2001 From: zz_y Date: Wed, 2 Sep 2026 11:13:03 -0600 Subject: [PATCH 5/6] ci: install protobuf compiler --- .github/workflows/mvp-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/mvp-ci.yml b/.github/workflows/mvp-ci.yml index e39ab9346..e3950f5b0 100644 --- a/.github/workflows/mvp-ci.yml +++ b/.github/workflows/mvp-ci.yml @@ -39,6 +39,9 @@ jobs: - name: Install Rust components run: rustup component add rustfmt clippy + - name: Install protobuf compiler + run: sudo apt-get update && sudo apt-get install --yes protobuf-compiler + - name: Configure private Cargo dependencies env: ASAP_CI_REPO_TOKEN: ${{ secrets.ASAP_CI_REPO_TOKEN }} From 4d885ca983eeabf384709ff2cde9022cbc1b591d Mon Sep 17 00:00:00 2001 From: zz_y Date: Wed, 2 Sep 2026 11:24:56 -0600 Subject: [PATCH 6/6] test: use unambiguous parsed scalar fixture --- data_plane/src/query_engines/thanos_query_engine/forward.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_plane/src/query_engines/thanos_query_engine/forward.rs b/data_plane/src/query_engines/thanos_query_engine/forward.rs index e33da377e..d84661714 100644 --- a/data_plane/src/query_engines/thanos_query_engine/forward.rs +++ b/data_plane/src/query_engines/thanos_query_engine/forward.rs @@ -1050,7 +1050,7 @@ mod tests { #[test] fn parse_vector_extracts_value_and_timestamp() { let raw: Value = serde_json::from_str( - r#"[{"metric":{"__name__":"x","job":"a"},"value":[1700000000.5,"3.14"]}]"#, + r#"[{"metric":{"__name__":"x","job":"a"},"value":[1700000000.5,"3.125"]}]"#, ) .unwrap(); let arr = raw.as_array().unwrap().clone(); @@ -1058,7 +1058,7 @@ mod tests { match result { QueryResult::Vector(iv) => { assert_eq!(iv.values.len(), 1); - assert!((iv.values[0].value - 3.14).abs() < 1e-9); + assert!((iv.values[0].value - 3.125).abs() < 1e-9); assert_eq!(iv.timestamp, 1_700_000_000_500); } other => panic!("expected Vector, got {other:?}"),