Skip to content

fix(plugins): add view_prefix to avoid BQ analytics view name collisions#5107

Draft
caohy1988 wants to merge 2 commits intogoogle:mainfrom
caohy1988:fix/bq-view-name-collision
Draft

fix(plugins): add view_prefix to avoid BQ analytics view name collisions#5107
caohy1988 wants to merge 2 commits intogoogle:mainfrom
caohy1988:fix/bq-view-name-collision

Conversation

@caohy1988
Copy link
Copy Markdown

Summary

  • Adds a configurable view_prefix field to BigQueryLoggerConfig (default "v") so that multiple plugin instances sharing a dataset can use distinct prefixes to avoid overwriting each other's auto-created analytics views
  • Validates that view_prefix is non-empty at init time
  • Wires view_prefix into _create_analytics_views in place of the hardcoded "v_" prefix

Fixes #5099

Test plan

  • test_custom_view_prefix — custom prefix changes all view names
  • test_default_view_prefix_preserves_names — default "v" keeps backward-compatible names
  • test_distinct_tables_and_prefixes_no_collision — two plugins with different tables/prefixes produce disjoint views pointing at correct tables
  • test_empty_view_prefix_raises — empty prefix rejected with ValueError
  • test_config_create_views_default_true — updated to assert default view_prefix == "v"
  • All 191 existing plugin tests still pass

🤖 Generated with Claude Code

…ame collisions (google#5099)

When multiple BigQueryAgentAnalyticsPlugin instances write to different
tables in the same dataset, their auto-created analytics views overwrite
each other because view names are derived only from event type. This adds
a configurable view_prefix field (default "v") so multi-table users can
set distinct prefixes to avoid collisions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 2, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 2, 2026

Response from ADK Triaging Agent

Hello @caohy1988, thank you for your contribution!

It looks like the Contributor License Agreement (CLA) check has failed. Before we can merge this pull request, you'll need to sign the CLA. Please check the details from the cla/google status check for instructions.

Thank you!

@adk-bot adk-bot added the services [Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc label Apr 2, 2026
@caohy1988 caohy1988 marked this pull request as draft April 2, 2026 07:19
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

services [Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BQ AA Plugin Overrite

2 participants