fix(benchmarks): scope target name uniqueness to cluster and add name filter - #219
Open
JLCode-tech wants to merge 2 commits into
Open
JLCode-tech wants to merge 2 commits into
JLCode-tech wants to merge 2 commits into
Conversation
… filter - Scope benchmark target name uniqueness to (cluster_id, name) via migration v2_156 - Update BenchmarkTarget model with composite UniqueConstraint and cluster_name property - Update BenchmarkTargetService and routes to filter by exact name and handle cluster-scoped conflicts - Expose cluster_name in BenchmarkTargetResponse - Add list_benchmark_targets and create_benchmark_target MCP tools to bnk_forge_mcp - Update frontend-v2 BenchmarkTargetsTab, RunBenchmarkWizard, and BenchmarkTrendsView to display cluster badges and labels - Add comprehensive migration, component, integration, MCP, and frontend unit test suites
Regenerate openapi spec and frontend typescript types following benchmark target schema updates.
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.
Description
Fixes benchmark target name collision when multiple clusters register endpoints with identical route names (e.g. via awsbnkctl discovering
mcp-<namespace>-<route>on separate clusters).Changes
v2_156):benchmark_targets.namewith composite unique constraintuq_benchmark_targets_cluster_nameon(cluster_id, name).ix_benchmark_targets_nameonnamefor fast filtering.BenchmarkTargetwith composite UniqueConstraint andcluster_nameproperty.BenchmarkTargetServiceduplicate validation to check(cluster_id, name).nameexact-match query filter tolist_targets.joinedloadinlist_targetsandget_targetto populatecluster_namewithout N+1 queries.cluster_name: str | NoneonBenchmarkTargetResponse.GET /api/benchmarks/targetsroute to acceptname: str | None = Query(None).list_benchmark_targetsandcreate_benchmark_targetMCP tools inbnk_forge_mcp.tools.benchmarks.frontend-v2):BenchmarkTargetTypeScript type andlistTargetsAPI client.BenchmarkTargetsTab, adds a Cluster column in the targets table and displays the cluster badge in the detail header and Target details card.RunBenchmarkWizardandBenchmarkTrendsView, renders cluster name in target selection dropdowns so identically named targets across clusters are easily distinguishable.test_v2_156_benchmark_target_name_unique_per_cluster.py.test_benchmark_target_uniqueness.py.test_routes_benchmarks.py.test_benchmarks.py,test_tool_catalog.py,test_url_audit.py,test_server.py.useBenchmarks.test.tsandBenchmarkTargetsTab.test.tsx.