chore(function-autoscaler): remove account ID from invocation query - #769
chore(function-autoscaler): remove account ID from invocation query#769borao wants to merge 1 commit into
Conversation
Signed-off-by: Bora Oztekin <boztekin@nvidia.com>
📝 WalkthroughWalkthroughThe control-plane utilization query now aggregates latency, instance, and concurrency metrics by ChangesUtilization aggregation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🛡️ CodeQL Analysis🚨 Found 2 issue(s) Severity Breakdown:
📋 Top Issues🔗 View full details in Security tab 🕐 Last updated: 2026-08-11 17:05:40 UTC | Commit: 03df4fd |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/control-plane-services/function-autoscaler/crates/server/src/work/mod.rs (1)
864-902: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd coverage for both metric label shapes.
The test returns one NCA-free series. It does not verify the current response shape with
nca_id, althoughMetric.nca_idis optional insrc/control-plane-services/function-autoscaler/crates/server/src/timeseries_db/timeseries_db_client.rs:196-224.Add a second case with
nca_idpresent. Keep the existing NCA-free case. The Mockito response is precomputed, so this test verifies query generation but not numeric aggregation across multiple NCA series. Use a PromQL-capable integration fixture if numeric aggregation must be validated.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/control-plane-services/function-autoscaler/crates/server/src/work/mod.rs` around lines 864 - 902, Extend test_control_plane_utilization_query_aggregates_shared_function_pool with a second mocked response series containing function_id, function_version_id, and nca_id, while preserving the existing NCA-free case and query assertion. Ensure both metric label shapes are covered without changing the current expected utilization behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@src/control-plane-services/function-autoscaler/crates/server/src/work/mod.rs`:
- Around line 864-902: Extend
test_control_plane_utilization_query_aggregates_shared_function_pool with a
second mocked response series containing function_id, function_version_id, and
nca_id, while preserving the existing NCA-free case and query assertion. Ensure
both metric label shapes are covered without changing the current expected
utilization behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 4dd09aaa-a7d6-47c0-bfdf-cd42ea27b0d5
📒 Files selected for processing (1)
src/control-plane-services/function-autoscaler/crates/server/src/work/mod.rs
TL;DR
Update the function autoscaler's control-plane utilization query to aggregate by
function_idandfunction_version_id, without depending onnca_id.This prepares the autoscaler for the subsequent removal of the
nca_idlabel fromfunction_request_latency.Additional Details
This change:
nca_idThe invocation-service metric change will be submitted separately.
For the Reviewer
Please focus on the control-plane utilization PromQL and its aggregation semantics for a shared function-version resource pool.
For QA
Automated validation completed:
Checklist
Summary by CodeRabbit
Bug Fixes
Tests