aaron-y-chen commented on code in PR #71949:
URL: https://github.com/apache/airflow/pull/71949#discussion_r3849336007


##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:
##########
@@ -457,6 +458,19 @@ def _resolve_connection(self) -> dict[str, Any]:
                     conn_data["keytab"] = 
self._create_keytab_path_from_base64_keytab(
                         base64_keytab, conn_data["principal"]
                     )
+            # Construct the Standalone Restendpoint
+            if (
+                conn.conn_type == "spark"
+                and conn_data["master"].startswith("spark://")
+                and conn_data["deploy_mode"] == "cluster"
+            ):
+                if conn_data["master"].endswith("7077"):

Review Comment:
   I understand the compatibility concern. However, branching on literal ports 
is not safer: custom master ports leave `rest_endpoint` unset, while the 
current `get_job_status()` already supports custom `rest_scheme` and 
`rest_port`. This change also leaves several existing `get_job_status()` tests 
failing.
   
   I would prefer deriving the REST endpoint(s) from the master host(s) plus 
those existing settings, without `6066`/`7077` conditionals, while preserving 
the current `get_job_status()` behavior.



-- 
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]

Reply via email to