Repository navigation
Provider operator parameters that are documented but have no effect #72982
Description
Body
While looking for bugs in provider code I wrote a small AST-based script that, for every operator/hook/trigger class, takes each self.<attr> = <constructor parameter> assignment in __init__ and checks whether .<attr> is ever read anywhere in that provider's source. Attributes in template_fields and private attributes are skipped. The hits were checked by hand, because a parameter can legitimately be read by a base class (HttpHook.auth_type), by another provider (DataflowConfiguration.check_if_running is read by apache.beam) or by the Task SDK (KubernetesPodOperator.durable).
What remains is a set of documented parameters that have no effect at all. Users set them and nothing happens, which is worse than not having the option.
Fixed so far (each with a regression test) (status as of 2026-10-05)
-
HttpToS3Operator.log_response(amazon) — Log the HTTP response in HttpToS3Operator when log_response is set #72951, merged -
HttpToGCSOperator.log_response(google) — Log the HTTP response in HttpToGCSOperator when log_response is set #72952, merged -
GCSTimeSpanFileTransformOperator.download_num_attempts/upload_num_attempts(google) — Honor download_num_attempts and upload_num_attempts in GCSTimeSpanFileTransformOperator #72953, a regression from Add optional parallel downloads and uploads to GCSTimeSpanFileTransformOperator #62196, merged -
idp_extra_params_dictin the Google IdP flow (google) — Pass IdP extra request parameters through to the Google token supplier #72954 (stored but never passed to the token supplier; the connection form also saved the field under a different key than the hook read), in review -
FABAuthManagerRoles.get_permissionssession handling (fab) — Close the session after the FAB permissions collection read #72950, merged (found by the same read-through, different bug class)
Still open, and the decision I would like a maintainer's view on
-
AzureBatchOperator.batch_max_retries(microsoft.azure) — documented as "the number of times to retry this batch operation", never used.azure-batch15 isazure-corebased, so it can be wired through asretry_totalon theBatchClient(or per call). Taken by @AbarnaaSree: Support max retries in Azure Batch operator #73071. -
SparkKubernetesOperator.success_run_history_limit(cncf.kubernetes) — documented as "number of past successful runs of the application to keep", never used, and the corresponding CRD field (successfulRunHistoryLimit) only exists onScheduledSparkApplication, not on theSparkApplicationthe operator submits. Deprecate? -
BigtableDeleteTableOperator.app_profile_id(google) — documented, stored, butBigtableHook.delete_tablehas no such argument and the admin API does not take one. Deprecate? -
DataflowConfiguration.max_num_workers(google) — documented as "maximum amount of workers", but neither the google nor the apache.beam provider reads it (the otherDataflowConfigurationfields are read by the Beam operators). Wire it into the pipeline options, or deprecate? Taken by @garvit-arora: Wire DataflowConfiguration.max_num_workers into pipeline options #73922.
Two neighbouring findings from a second script that cross-checks the status values triggers emit against the values execute_complete tests for:
-
EksDeleteClusterOperator.execute_completechecks for"success"butEksDeleteClusterTriggeryields"deleted", so the success log line is unreachable (cosmetic). Fixed by Log the success message after a deferred EKS cluster deletion #73455 (@namanjain24-sudo). -
DbtCloudJobRunSensor.execute_completeraises on"error"/"cancelled"but returns normally on"timeout", whichDbtCloudRunJobTriggercan emit when constructed withexecution_deadline(the sensor itself does not pass one today, so this is latent). Already fixed by Add validate trigger events in dbt cloud deferrable tasks #69739.
Happy to open PRs for whichever direction maintainers prefer, and to share the scripts if a permanent check (with an allowlist, like the one in test_project_structure.py) seems worth it.
Committer
- I acknowledge that I am a maintainer/committer of the Apache Airflow project.
Activity
AbarnaaSree commentedon Sep 12, 2026
Hi @bingqin2, I’d like to work on the
AzureBatchOperator.batch_max_retriesissue.The parameter is documented and stored but currently has no effect, and wiring it through to the Azure Batch client retry configuration seems like a well-scoped fix.
I’ll first verify the current implementation and existing retry-related tests, then add regression coverage to ensure
batch_max_retriesis actually honored without changing the default behavior.If that direction is okay with the maintainers, I’d be happy to submit a PR.
bingqin2 commentedon Sep 13, 2026
Hi @AbarnaaSree, please go ahead, it is yours. A few pointers from what I checked while writing this up:
AzureBatchHook.__init__only takesazure_batch_conn_id, andget_conn()buildsBatchClient(endpoint=..., credential=...).azure-batch15 sits onazure-core, whose retry policy readsretry_total(andretry_backoff_factor,retry_backoff_max,retry_status) from the client kwargs, soBatchClient(..., retry_total=n)is enough; I verified the pipeline's retry policy picks it up. The operator builds the hook in its cachedhookproperty, so the natural path is a new optional hook argument that the operator fills frombatch_max_retries.retry_totalis 10. Passing the value through unconditionally would change behaviour for every existing user (10 retries become 3). Defaulting both the operator parameter and the new hook argument toNone(meaning "SDK default") keeps behaviour unchanged unless someone sets the parameter. I would lean to that, but a maintainer may prefer honouring the documented 3, so it is worth stating the choice in the PR description.BatchClientin the hook module and asserting the constructor kwargs is enough; no live client needed.Airflow does not assign issues: just open the PR, mention this issue in it, and I am happy to review.
namanjain24-sudo commentedon Sep 21, 2026
Opened #73455 for the
EksDeleteClusterOperator.execute_completeitem:EksDeleteClusterTriggeryields"deleted", so the check now uses that status, with a regression test. It does not touch any of the other items in this list.Drafted-by: a Gen-AI coding assistant (no human review before posting)
garvit-arora commentedon Sep 29, 2026
Hi, I'd like to pick up the
DataflowConfiguration.max_num_workersitem from this umbrella issue. Plan: passmax_num_workersinto Beam/Dataflow pipeline options where otherDataflowConfigurationfields are applied, and add a focused provider unit test. I'll open a PR referencing this issue.bingqin2 commentedon Sep 30, 2026
Hi @garvit-arora, go ahead, it's yours. A few pointers from when I wrote this up:
DataflowConfigurationfields become pipeline options inBeamDataflowMixin.__get_dataflow_pipeline_optionsinproviders/apache/beam/src/airflow/providers/apache/beam/operators/beam.py. Keys there are camelCase (serviceAccount,impersonateServiceAccount); the Python and Go operators convert them to snake_case (_init_pipeline_options(format_pipeline_options=True)), the Java operator passes them as they are. SomaxNumWorkers, set only whenmax_num_workersis notNone, should reach all three SDKs._init_pipeline_optionsapplies the operator's ownpipeline_optionsafter the Dataflow ones, so an explicitmax_num_workers/maxNumWorkerspipeline option would win. Worth stating in the docstring and covering in a test.providers/apache/beam/tests/unit/apache/beam/operators/test_beam.py. The native Python system tests (providers/google/tests/system/google/cloud/dataflow/example_dataflow_native_python.py) already passmax_num_workers: 1throughdataflow_config, so today they silently ignore it; after the fix they exercise it.garvit-arora commentedon Sep 30, 2026
Thanks for confirming the
max_num_workersitem is mine to work on — I'm finishing #73922 (latest push addresses the JavamaxNumWorkersreview feedback and adds doc + override test coverage).If maintainers would like another item from this umbrella issue picked up after that lands, I'm happy to take one of the still-open ones once direction is clear:
SparkKubernetesOperator.success_run_history_limit— wire or deprecate?BigtableDeleteTableOperator.app_profile_id— wire or deprecate?DbtCloudJobRunSensor.execute_completehandling for the latent"timeout"statusHappy to follow whichever you or the maintainers would prefer reviewed next.
namanjain24-sudo commentedon Sep 30, 2026
The
DbtCloudJobRunSensor.execute_completetimeout item looks already resolved — #69739 (merged 2026-09-24) rewrote the status check toif event["status"] != "success": raise ..., which covers"timeout"along with any other non-success status. Might be worth ticking off above.Drafted-by: Claude Code (Sonnet 5)
bingqin2 commentedon Oct 5, 2026
Thanks both. I ticked the dbt item, since #69739 covers it, and linked #73922 for the Dataflow item.
For the two remaining items, my read is to deprecate both, because neither can work as documented:
successfulRunHistoryLimitexists only onScheduledSparkApplication, not on theSparkApplicationthe operator submits, and the Bigtable admin API takes no app profile when deleting a table. @potiuk @shahar1, does deprecating them sound right? If so, @garvit-arora is welcome to take both once #73922 lands.garvit-arora commentedon Oct 8, 2026
Hi @shahar1 and maintainers, a gentle follow-up on #73922. I addressed the Java maxNumWorkers naming feedback and added the documented override-precedence test. The PR is ready for review when convenient. Thanks!
nayansharma8123-gif commentedon Oct 24, 2026
Hi @bingqin2,
I'd like to contribute the
BigtableDeleteTableOperator.app_profile_iditem from this issue.I checked the current implementation: the parameter is accepted and stored by the operator, but it is not used when calling
BigtableHook.delete_table(). I also saw your suggestion to deprecate this parameter because the Bigtable admin API does not accept an app profile for table deletion.I'm interested in implementing the deprecation with appropriate tests and documentation. I noticed @garvit-arora had also expressed interest in this item after #73922 lands. Would it be okay for me to work on this now, or would you prefer that I wait?
Thanks!
bingqin2 commentedon Oct 25, 2026
Hi @nayansharma8123-gif, sure, go ahead with
BigtableDeleteTableOperator.app_profile_id. @garvit-arora, that leaves the Spark item for you once #73922 lands, if you still want it.No maintainer has confirmed the deprecation yet, so please explain in the PR why the parameter can't be wired (the admin API's table delete takes no app profile), and let the reviewer decide. The usual pattern is to keep the argument, warn with
AirflowProviderDeprecationWarningwhen it is passed, and note the deprecation in the docstring.