Commit e5c0d8b
authored
fix(bigquery-analytics): route Storage Write API appends to the dataset's region (#2)
The Storage Write API `AppendRows` streaming RPC does not auto-populate
the request-routing header, so the plugin's writes were always routed to
the US multiregion. Writes to a dataset in any other region (e.g.
northamerica-northeast1) failed with a "session not found" /
stream-not-found error and no rows were ever written — which surfaced to
users as session_id (and every other column) failing to propagate.
Set the `x-goog-request-params: write_stream=<stream>` routing header on
the append_rows call, matching what google.cloud.bigquery_storage_v1.writer
does internally, so requests reach the region that owns the write stream.
US-multiregion behavior is unchanged.
Adds a regression test asserting the routing header is passed.
Fixes GoogleCloudPlatform/BigQuery-Agent-Analytics-SDK#2621 parent d0ab39f commit e5c0d8b
2 files changed
Lines changed: 64 additions & 1 deletion
File tree
- src/google/adk/plugins
- tests/unittests/plugins
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1171 | 1171 | | |
1172 | 1172 | | |
1173 | 1173 | | |
1174 | | - | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
1175 | 1189 | | |
1176 | 1190 | | |
1177 | 1191 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
638 | 687 | | |
639 | 688 | | |
640 | 689 | | |
| |||
0 commit comments