Skip to content

Commit 372c76b

Browse files
haiyuan-eng-googlecopybara-github
authored andcommitted
feat: Handle Conflict Errors in BigQuery Agent Analytics Plugin
The BigQuery agent analytics plugin now catches cloud_exceptions.Conflict when creating or updating views, logging a debug message for concurrent updates. Co-authored-by: Haiyuan Cao <haiyuan@google.com> PiperOrigin-RevId: 880961611
1 parent b18d7a1 commit 372c76b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/google/adk/plugins/bigquery_agent_analytics_plugin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,6 +2307,11 @@ def _create_analytics_views(self) -> None:
23072307
)
23082308
try:
23092309
self.client.query(sql).result()
2310+
except cloud_exceptions.Conflict:
2311+
logger.debug(
2312+
"View %s was updated concurrently by another process.",
2313+
view_name,
2314+
)
23102315
except Exception as e:
23112316
logger.error(
23122317
"Failed to create view %s: %s",

0 commit comments

Comments
 (0)