feat(BA-6225): expand and rename Prometheus query presets#11845
Open
seedspirit wants to merge 4 commits into
Open
feat(BA-6225): expand and rename Prometheus query presets#11845seedspirit wants to merge 4 commits into
seedspirit wants to merge 4 commits into
Conversation
seedspirit
added a commit
that referenced
this pull request
May 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands and renames the default/example Prometheus query presets to use verbose, aggregation-explicit names and adds additional aggregation variants for container and vLLM metrics, with a new Alembic data migration to update/seed the presets in existing databases.
Changes:
- Add Alembic migration
7af18070fdefto rename/delete legacy seeded container presets (by name) and seed new container + vLLM presets and categories. - Expand the example fixture presets set (8 → 22) with renamed presets and avg/max/min variants.
- Add a changelog entry describing the expanded/renamed preset set.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/ai/backend/manager/models/alembic/versions/7af18070fdef_expand_prometheus_query_presets.py |
Data migration to seed categories and insert/rename/delete Prometheus query presets. |
fixtures/manager/example-prometheus-query-presets.json |
Updates example presets to the new verbose names and adds new aggregation variants. |
changes/11845.feature.md |
Changelog entry for the preset expansion/rename. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jopemachine
previously approved these changes
May 29, 2026
seedspirit
added a commit
that referenced
this pull request
May 29, 2026
5c6bb7e to
9ea8624
Compare
Rename the 8 example presets to verbose, aggregation-explicit names and add avg/max/min variants for container and vLLM metrics (8 -> 22). Add a migration that renames/deletes the seeded container presets by name and seeds all new container and vLLM presets idempotently, including their categories. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The example fixture seeds 5 vLLM preset ids under legacy names, so the name-guarded insert hit the primary key on fixture-seeded DBs (every dev/CI environment). Upsert by id (the table's only unique key) so both production and fixture-seeded DBs converge to the new definitions. Also inline single-use constants for readability and repoint down_revision to the current alembic head (0113c63f3261) after rebasing onto main. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The preset migration still revised 0113c63f3261, which main has since advanced past (c0ffee5a91d3 -> 1a2b3c4d5e6f), leaving two diverged heads. Re-point down_revision to 1a2b3c4d5e6f to linearize the chain. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
container_gauge→Per-Kernel Resource Metric — Instant Value (sum)) and add avg/max/min variants for container and vLLM metrics, growing the set from 8 to 22.7af18070fdefthat renames/deletes the seeded container presets by name (the prior seed useduuid_generate_v4(), so ids differ per environment) and idempotently seeds all new container + vLLM presets and their categories.container_rate(sum(rate)/5.0) preset whose normalization doesn't compose with avg/min/max.Test plan
updated_atunchanged)container_ratedeleted, new rows inserted338bc3284f20,bee1c0de01a1) — single linear alembic headpants lint/check(ruff/mypy/visibility) passprometheus-query-definition executeagainst a live session — all 8 container presets return correct, aggregation-consistent values; verified dynamic CPU load trackingResolves BA-6225