Fix BigQuery private-cloud trigger result payloads#1
Draft
cursor[bot] wants to merge 2 commits intomainfrom
Draft
Fix BigQuery private-cloud trigger result payloads#1cursor[bot] wants to merge 2 commits intomainfrom
cursor[bot] wants to merge 2 commits intomainfrom
Conversation
Co-authored-by: csrinivas2130 <csrinivas2130@users.noreply.github.com>
Co-authored-by: csrinivas2130 <csrinivas2130@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix private-cloud BigQuery deferrable trigger result payloads.
Bug and impact:
BigQueryGetDataTriggerandBigQueryIntervalCheckTriggeruse the synchronous BigQuery hook to fetch query results.dictrows containing native Python values such asDecimalanddate.BigQueryGetDataTriggerreturned those dictionaries directly even whenas_dict=False, breaking the documented list-of-lists contract, and both triggers could emit values that fail triggerer IPC serialization after the external BigQuery job had already completed.Root cause:
Fix:
TriggerEventpayloads.as_dict=Truevsas_dict=Falseoutput shape forBigQueryGetDataTrigger.Decimalanddaterow values.Validation:
uvx ruff format providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py providers/google/tests/unit/google/cloud/triggers/test_bigquery.pyuvx ruff check --fix providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py providers/google/tests/unit/google/cloud/triggers/test_bigquery.pyuv run --project providers/google --no-dev --with pytest --with pytest-asyncio --with-editable ./devel-common pytest providers/google/tests/unit/google/cloud/triggers/test_bigquery.py::TestBigQueryGetDataTrigger::test_bigquery_get_data_trigger_success_with_data_custom_universe providers/google/tests/unit/google/cloud/triggers/test_bigquery.py::TestBigQueryIntervalCheckTrigger::test_interval_check_trigger_success_non_default_universe -xvs(3 passed)Notes:
uv run --project providers/google pytest ...setup failed in this image before tests because provider dev extras attempted to buildmysqlclientwithout MySQL/MariaDB pkg-config libraries.Was generative AI tooling used to co-author this PR?
Generated-by: GPT-5.5 following the guidelines