Replace principle by principal in kerberos-related code - #43679
Conversation
potiuk
left a comment
There was a problem hiding this comment.
Even if it's a typo fix, it crosses airflow/providers boundaries - which means that you would have to implement compatibilty layer in both airflow and providers:
- so that new airflow supports old providers
- so that old airflow (2.8+ currently) supports new providers
I think the hassle is not worth the typo fix
Ah sorry this involves also Airflow core Still I think we can do it with Airflow 3 and backport to 2.10.. this is pretty minor and easy to do. |
If @brouberol wishes to do the back-compatiblity code for both issues, we can do it, yes. |
|
OK lets take it by steps:
I can handle (1) if you prefer |
|
I can give it a go, but I'll be a bit tied up in the coming days. Feel free to proceed with 1) if you want. If not, I'll try to address your comment when I have the time. Thanks again! |
|
Cool but actually we need (2) ready before (1) All you need to do here is to remove the changes to Keep the changes you have in providers but change the imports to: Once you do that provider is compatible with both name and I can do the change to airflow core. |
3bbd32e to
f1ccb1f
Compare
This is related to apache#43679, in which the `airflow.security.kerberos.get_kerberos_principle` function was renamed `get_kerberos_principle`. In this patch, we introduce a `try/except` block around this import, getting ready to deprecate the typo-ed function in Airflow 3.0. We also fix a innocuous typo in a unit test. Signed-off-by: Balthazar Rouberol <brouberol@wikimedia.org>
|
I've reworked this patch to only rename the affected function, and have opened #44150 that attempts to import the fixed function and falls back to the typoed one, as suggested in #43679 (comment) |
|
Lets add |
8d3c663 to
d30cc35
Compare
Kerberos has the notion of a [principal](https://web.mit.edu/kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-user/What-is-a-Kerberos-Principal_003f.html). "principle" was a typo. Signed-off-by: Balthazar Rouberol <brouberol@wikimedia.org>
d30cc35 to
b1b6ae8
Compare
* spark-submit: replace `principle` by `principal` This is related to #43679, in which the `airflow.security.kerberos.get_kerberos_principle` function was renamed `get_kerberos_principle`. In this patch, we introduce a `try/except` block around this import, getting ready to deprecate the typo-ed function in Airflow 3.0. We also fix a innocuous typo in a unit test. Signed-off-by: Balthazar Rouberol <brouberol@wikimedia.org> * Update providers/src/airflow/providers/apache/spark/hooks/spark_submit.py * Update providers/src/airflow/providers/apache/spark/hooks/spark_submit.py * Update providers/src/airflow/providers/apache/spark/hooks/spark_submit.py * Update providers/src/airflow/providers/apache/spark/hooks/spark_submit.py * Update providers/src/airflow/providers/apache/spark/hooks/spark_submit.py --------- Signed-off-by: Balthazar Rouberol <brouberol@wikimedia.org> Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com> Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>
Kerberos has the notion of a principal. "principle" seemed to be a typo.
^ 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.rstor{issue_number}.significant.rst, in newsfragments.