-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SparkKubernetesOperator spark name. #42427
Fix SparkKubernetesOperator spark name. #42427
Conversation
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py
Outdated
Show resolved
Hide resolved
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that maybe we do need another test to check the third case, because currently none of the other tests check it.
updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing!
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py
Outdated
Show resolved
Hide resolved
airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py
Outdated
Show resolved
Hide resolved
* use name parameter from spark yaml config or from operator argument parameter * update tests and name usage condition check * adding test, to check spark name starts with task_id * use set_name function in create_job * remove lower
* use name parameter from spark yaml config or from operator argument parameter * update tests and name usage condition check * adding test, to check spark name starts with task_id * use set_name function in create_job * remove lower
Currently, it's ignoring the name from both the YAML file and operator arguments, and always using the task ID as the name by default, with random suffix.
The name precedence order follows like below:
Should we switch the first two steps, or does this order make sense?
closes: #41188
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.