Skip to content

fix: add fork-safety and auto-create analytics views to BQ plugin#4640

Draft
caohy1988 wants to merge 4 commits intogoogle:mainfrom
caohy1988:fix/bq-lazy-init-and-auto-views
Draft

fix: add fork-safety and auto-create analytics views to BQ plugin#4640
caohy1988 wants to merge 4 commits intogoogle:mainfrom
caohy1988:fix/bq-lazy-init-and-auto-views

Conversation

@caohy1988
Copy link

Summary

Test plan

  • TestForkSafety (4 tests): PID mismatch triggers re-init, same PID skips reset, _reset_runtime_state clears fields, __getstate__ zeroes PID
  • TestAnalyticsViews (6 tests): views created on new/existing tables, disabled when create_views=False, errors logged not raised, SQL correctness, config default
  • All 149 existing tests still pass

🤖 Generated with Claude Code

Add PID tracking to detect post-fork broken gRPC channels (google#4636) and
automatically create per-event-type BigQuery views that unnest JSON
columns into typed, queryable columns (google#4639).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@google-cla
Copy link

google-cla bot commented Feb 27, 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 adk-bot added the services [Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc label Feb 27, 2026
@adk-bot
Copy link
Collaborator

adk-bot commented Feb 27, 2026

Response from ADK Triaging Agent

Hello @caohy1988, thank you for creating this PR!

It looks like you have not yet signed the Contributor License Agreement (CLA). Please visit https://cla.developers.google.com/ to sign it.

Once you've signed the CLA, the status of this check will be updated. Thanks!

caohy1988 and others added 3 commits February 26, 2026 23:12
- Backfill _init_pid in __setstate__ for legacy pickle compatibility
- Gate view creation on successful table creation (skip after failure)
- Ensure plugin is started in public create_analytics_views()
- Add tests for all three edge cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
create_analytics_views() now raises RuntimeError if _ensure_started()
could not initialize the plugin, instead of silently proceeding with
a None client and logging per-view errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Persist the init exception as _startup_error and use `raise ... from
self._startup_error` so callers get actionable context instead of a
generic RuntimeError.

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.

2 participants