mmporong opened a new pull request, #77181: URL: https://github.com/apache/airflow/pull/77181
`SparkSubmitHook` takes the Spark connection as `conn_id` (default `"spark_default"`), but its class docstring documents the argument as `spark_conn_id`. The rendered API reference therefore points users at a keyword that the constructor does not accept: ```python SparkSubmitHook(spark_conn_id="spark_default") # TypeError: SparkSubmitHook.__init__() got an unexpected keyword argument 'spark_conn_id' ``` This renames the `:param:` entry to `conn_id`, matching the signature and the `SparkSubmitOperator` docstring, which received the same correction in #31952. The rest of the entry is unchanged: it is identical to the operator's `conn_id` description, and `_resolve_connection()` still falls back to `master="yarn"` when the connection lookup fails. `spark_conn_id` is still the correct name for `SparkJDBCHook` and `SparkJDBCOperator`, so those docstrings are left as they are. Checks run locally: - With this change, every `:param:` name in the `SparkSubmitHook` docstring exists in `SparkSubmitHook.__init__`. On `main`, `spark_conn_id` is the only one that does not. - In a container with apache-airflow 3.4.0, loading this module from `main` and from this branch, `SparkSubmitHook(spark_conn_id="spark_default")` raises the `TypeError` above and `SparkSubmitHook(conn_id="missing_conn_xyz")` resolves `master` to `yarn`. - `ruff check` and `ruff format --check` (ruff 0.17.3, as pinned in `.pre-commit-config.yaml`) on the changed file: pass. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Claude Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --- * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged. * For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed. * When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). * For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number. -- 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]
