Copilot commented on code in PR #64505:
URL: https://github.com/apache/airflow/pull/64505#discussion_r3066477987
##########
providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:
##########
@@ -289,6 +303,17 @@ def __init__(
self.schema_update_options = schema_update_options
self.src_fmt_configs = src_fmt_configs
+ if src_fmt_configs:
+ warnings.warn(
+ "The 'src_fmt_configs' parameter is deprecated. Use
'extra_config' instead. "
+ "Note: 'extra_config' uses the fully-nested API structure, so
format-specific "
+ "options must be nested under their parent key "
+ "(e.g., {'parquetOptions': {'enableListInference': True}}
rather than "
+ "{'enableListInference': True}).",
+ AirflowProviderDeprecationWarning,
+ stacklevel=2,
+ )
Review Comment:
The deprecation warning only fires when `src_fmt_configs` is truthy. If a
DAG explicitly passes an empty dict (`src_fmt_configs={}`), this won’t warn
even though the deprecated parameter is used. Consider tracking whether the
argument was provided (e.g., `src_fmt_configs_provided = src_fmt_configs is not
None` before normalizing `None` to `{}`) and warning whenever it was provided,
regardless of emptiness.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]