René's URL Explorer Experiment


Title: Bigquery Python Library: `AppendRows` bidi-streaming RPC sends empty `x-goog-request-params` routing header, causing intermittent `InvalidArgument: Cannot route on empty project id ''`` · Issue #16650 · googleapis/google-cloud-python · GitHub

Open Graph Title: Bigquery Python Library: `AppendRows` bidi-streaming RPC sends empty `x-goog-request-params` routing header, causing intermittent `InvalidArgument: Cannot route on empty project id ''`` · Issue #16650 · googleapis/google-cloud-python

X Title: Bigquery Python Library: `AppendRows` bidi-streaming RPC sends empty `x-goog-request-params` routing header, causing intermittent `InvalidArgument: Cannot route on empty project id ''`` · Issue #16650 · googleapis/google-cloud-python

Description: Determine this is the right repository I determined this is the correct repository in which to report this bug. Summary of the issue Context Using BigQueryWriteClient.append_rows() to write data via the Storage Write API default stream (...

Open Graph Description: Determine this is the right repository I determined this is the correct repository in which to report this bug. Summary of the issue Context Using BigQueryWriteClient.append_rows() to write data vi...

X Description: Determine this is the right repository I determined this is the correct repository in which to report this bug. Summary of the issue Context Using BigQueryWriteClient.append_rows() to write data vi...

Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/16650

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bigquery Python Library: `AppendRows` bidi-streaming RPC sends empty `x-goog-request-params` routing header, causing intermittent `InvalidArgument: Cannot route on empty project id ''``","articleBody":"### Determine this is the right repository\n\n- [x] I determined this is the correct repository in which to report this bug.\n\n### Summary of the issue\n\n\n**Context**\n\nUsing `BigQueryWriteClient.append_rows()` to write data via the Storage Write API default stream (`_default`), with multiple sequential calls through the same client. This is in a multiprocessing setup where each worker creates its own `BigQueryWriteClient()` and makes many `append_rows` calls.\n\n**Expected Behavior:**\n\n`append_rows` should populate the `x-goog-request-params` gRPC routing header with the `write_stream` resource name (which contains the project ID), similar to how other methods in the same client do it:\n\n```python\n# create_write_stream — sets routing correctly\nmetadata = ... + (gapic_v1.routing_header.to_grpc_metadata(((\"parent\", request.parent),)),)\n```\n\n**Actual Behavior:**\n\n`append_rows` sends an empty routing header because it's a bidi-streaming RPC and the request iterator hasn't been consumed when metadata is set:\n\n```python\n# client.py, append_rows() — all versions 2.26.0 through 2.37.0\nmetadata = tuple(metadata) + (gapic_v1.routing_header.to_grpc_metadata(()),)\n```\n\nThis produces `x-goog-request-params: ''`. The first several calls may succeed via the gateway's fallback routing, but after a gRPC reconnection (idle timeout, load balancing), the gateway cannot determine the target project and returns:\n\n```\ngoogle.api_core.exceptions.InvalidArgument: 400 Cannot route on empty project id ''\n```\n\n**Reproduction:**\n\n```python\nfrom google.cloud.bigquery_storage_v1 import BigQueryWriteClient\nfrom google.api_core.gapic_v1 import routing_header\nimport inspect\n\n# Verify empty routing in source\nsource = inspect.getsource(BigQueryWriteClient.append_rows)\nassert \"to_grpc_metadata(())\" in source\n\n# Verify it produces an empty header\nassert routing_header.to_grpc_metadata(()) == (\"x-goog-request-params\", \"\")\n```\n\n**Workaround:**\n\nPass routing metadata explicitly:\n\n```python\nmetadata = (routing_header.to_grpc_metadata(((\"write_stream\", stream_name),)),)\nresponse = client.append_rows(requests=iter([request]), metadata=metadata)\n```\n\n**Environment:**\n- `google-cloud-bigquery-storage`: 2.26.0 through 2.37.0 (all affected)\n- Python 3.9\n\n### API client name and version\n\n_No response_\n\n### Reproduction steps: code\n\nfile: main.py\n```python\n   def reproduce():\n    # complete code here\n```\n\n\u003cany additional py files>\n\n\n### Reproduction steps: supporting files\n\nfile: mydata.csv\n```\nalpha,1,3\nbeta,2,5\n```\n\n\u003cany additional supporting files>\n\n\n### Reproduction steps: actual results\n\nfile: output.txtmydata.csv\n```\nCalculated: foo\n```\n\n\n### Reproduction steps: expected results\n\nfile: output.txtmydata.csv\n```\nCalculated: bar\n```\n\n\n### OS & version + platform\n\n_No response_\n\n### Python environment\n\n_No response_\n\n### Python dependencies\n\n_No response_\n\n### Additional context\n\n_No response_","author":{"url":"https://github.com/erezinman","@type":"Person","name":"erezinman"},"datePublished":"2026-04-14T19:44:22Z","url":"https://github.com/googleapis/google-cloud-python/issues/16650"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a5e4293b-a3b5-ed5e-aa5f-2d8596504ade
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA5D6:D8CB1:9FFCB7:D9C214:6AFE7A39
html-safe-nonce71bac2014a68119c24948129fc560b3eaa7b937bc3dcbeef8cf206f38d7c53c4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUQ2OkQ4Q0IxOjlGRkNCNzpEOUMyMTQ6NkFGRTdBMzkiLCJ2aXNpdG9yX2lkIjoiMTg2NzUwMzk4MzEyODM3NzkxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6af544c3f3bb03631b17feaea0a2093ae03989b78edceda41a9ff033becd8f97
hovercard-subject-tagissue:4264357156
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/16650/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b3debccd8699f4ee2db2d032a0b6eb90ab5f20720864f7d461654841f690bb36/googleapis/google-cloud-python/issues/16650
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b3debccd8699f4ee2db2d032a0b6eb90ab5f20720864f7d461654841f690bb36/googleapis/google-cloud-python/issues/16650
og:image:altDetermine this is the right repository I determined this is the correct repository in which to report this bug. Summary of the issue Context Using BigQueryWriteClient.append_rows() to write data vi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameerezinman
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id16316451
octolytics-dimension-repository_nwogoogleapis/google-cloud-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id16316451
octolytics-dimension-repository_network_root_nwogoogleapis/google-cloud-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/googleapis/google-cloud-python/issues/16650#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-python%2Fissues%2F16650
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-python%2Fissues%2F16650
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fgoogle-cloud-python
Reloadhttps://github.com/googleapis/google-cloud-python/issues/16650
Reloadhttps://github.com/googleapis/google-cloud-python/issues/16650
Reloadhttps://github.com/googleapis/google-cloud-python/issues/16650
googleapishttps://github.com/googleapis
google-cloud-pythonhttps://github.com/googleapis/google-cloud-python
Codehttps://github.com/googleapis/google-cloud-python
Issues450 (450)https://github.com/googleapis/google-cloud-python/issues
Pull requests200 (200)https://github.com/googleapis/google-cloud-python/pulls
Discussionshttps://github.com/googleapis/google-cloud-python/discussions
Actionshttps://github.com/googleapis/google-cloud-python/actions
Projectshttps://github.com/googleapis/google-cloud-python/projects
Security and qualityhttps://github.com/googleapis/google-cloud-python/security
Insightshttps://github.com/googleapis/google-cloud-python/insights
https://github.com/googleapis/google-cloud-python
New issuehttps://github.com/login?return_to=https://github.com/googleapis/google-cloud-python/issues/16650
New issuehttps://github.com/login?return_to=https://github.com/googleapis/google-cloud-python/issues/16650
Bigquery Python Library: AppendRows bidi-streaming RPC sends empty x-goog-request-params routing header, causing intermittent InvalidArgument: Cannot route on empty project id ''`https://github.com/googleapis/google-cloud-python/issues/16650#top
https://github.com/chalmerlowe
api: bigqueryIssues related to the BigQuery API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20bigquery%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/erezinman
erezinmanhttps://github.com/erezinman
on Apr 14, 2026https://github.com/googleapis/google-cloud-python/issues/16650#issue-4264357156
erezinmanhttps://github.com/erezinman
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
triage meI really want to be triaged.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22triage%20me%22
on Apr 14, 2026https://github.com/googleapis/google-cloud-python/issues/16650#event-24501693665
erezinmanhttps://github.com/erezinman
on Apr 14, 2026https://github.com/googleapis/google-cloud-python/issues/16650#event-24501709226
https://github.com/erezinman
erezinmanhttps://github.com/erezinman
on Apr 14, 2026https://github.com/googleapis/google-cloud-python/issues/16650#issuecomment-4246682458
daniel-sanchehttps://github.com/daniel-sanche
api: corehttps://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20core%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
api: bigqueryIssues related to the BigQuery API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20bigquery%22
triage meI really want to be triaged.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22triage%20me%22
api: corehttps://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20core%22
on Apr 20, 2026https://github.com/googleapis/google-cloud-python/issues/16650#event-24688231845
partheahttps://github.com/parthea
partheahttps://github.com/parthea
daniel-sanchehttps://github.com/daniel-sanche
partheahttps://github.com/parthea
on May 1, 2026https://github.com/googleapis/google-cloud-python/issues/16650#event-25075158781
daniel-sanchehttps://github.com/daniel-sanche
chalmerlowehttps://github.com/chalmerlowe
daniel-sanchehttps://github.com/daniel-sanche
on Jul 31, 2026https://github.com/googleapis/google-cloud-python/issues/16650#event-28790568334
https://github.com/daniel-sanche
daniel-sanchehttps://github.com/daniel-sanche
on Jul 31, 2026https://github.com/googleapis/google-cloud-python/issues/16650#issuecomment-5145991521
@chalmerlowehttps://github.com/chalmerlowe
https://github.com/daniel-sanche
daniel-sanchehttps://github.com/daniel-sanche
on Oct 7, 2026https://github.com/googleapis/google-cloud-python/issues/16650#issuecomment-6047449993
#18591https://github.com/googleapis/google-cloud-python/pull/18591
daniel-sanchehttps://github.com/daniel-sanche
on Oct 8, 2026https://github.com/googleapis/google-cloud-python/issues/16650#event-32823383844
fix(gapic-generator): do not emit empty routing metadata on client-st…https://github.com/googleapis/google-cloud-python/commit/bbdd643b91665b749da3fe3d5b39d2450caec2c2
bbdd643https://github.com/googleapis/google-cloud-python/commit/bbdd643b91665b749da3fe3d5b39d2450caec2c2
https://github.com/daniel-sanche
daniel-sanchehttps://github.com/daniel-sanche
on Oct 8, 2026https://github.com/googleapis/google-cloud-python/issues/16650#issuecomment-6068506339
daniel-sanchehttps://github.com/daniel-sanche
completedhttps://github.com/googleapis/google-cloud-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 8, 2026https://github.com/googleapis/google-cloud-python/issues/16650#event-32823444616
Sign up for freehttps://github.com/signup?return_to=https://github.com/googleapis/google-cloud-python/issues/16650
Sign in to commenthttps://github.com/login?return_to=https://github.com/googleapis/google-cloud-python/issues/16650
chalmerlowehttps://github.com/chalmerlowe
api: bigqueryIssues related to the BigQuery API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20bigquery%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.