Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

This function is deprecated. Please use create_unique_id. #39356

Closed
1 of 2 tasks
bmoon4 opened this issue May 2, 2024 · 2 comments · Fixed by #39381
Closed
1 of 2 tasks

This function is deprecated. Please use create_unique_id. #39356

bmoon4 opened this issue May 2, 2024 · 2 comments · Fixed by #39381
Labels
area:providers kind:bug This is a clearly a bug provider:cncf-kubernetes Kubernetes provider related issues

Comments

@bmoon4
Copy link

bmoon4 commented May 2, 2024

Apache Airflow version

Other Airflow 2 version (please specify below)

If "Other Airflow 2 version" selected, which one?

2.8.4

What happened?

I am using Airflow 2.8.4 (apache-airflow-providers-cncf-kubernetes==8.0.1) in k8s environment and constantly seeing following warning messages in scheduler log:

...
/usr/local/lib/python3.11/site-packages/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:416 AirflowProviderDeprecationWarning: This function is deprecated. Please use `create_unique_id`.
/usr/local/lib/python3.11/site-packages/airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py:145 AirflowProviderDeprecationWarning: This function is deprecated. Please use `add_unique_suffix`.
...

I believe it is from this change:
#36847

and that was included `apache-airflow-providers-cncf-kubernetes==8.0.0)
https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/stable/changelog.html#id7

image

Is there a way to fix that warning messages?

Something is definitely calling create_pod_id(deprecated) not create_unique_id
and add_pod_suffix(deprecated) not add_unique_suffix .

image

image

What you think should happen instead?

No response

How to reproduce

  1. Setup Airflow 2.8.4 in k8s env with the constraint (https://raw.githubusercontent.com/apache/airflow/constraints-2.8.4/constraints-3.11.txt)
  2. Use k8s executor
  3. Have dags using KPOs and run them
  4. Check scheduler logs

Operating System

Debian GNU/Linux 12 (bookworm)

Versions of Apache Airflow Providers

$ pip freeze | grep apache-airflow-providers
apache-airflow-providers-amazon==8.19.0
apache-airflow-providers-cncf-kubernetes==8.0.1
apache-airflow-providers-common-io==1.3.0
apache-airflow-providers-common-sql==1.11.1
apache-airflow-providers-ftp==3.7.0
apache-airflow-providers-http==4.10.0
apache-airflow-providers-imap==3.5.0
apache-airflow-providers-postgres==5.10.2
apache-airflow-providers-slack==8.6.1
apache-airflow-providers-smtp==1.6.1
apache-airflow-providers-sqlite==3.7.1

Deployment

Other Docker-based deployment

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@bmoon4 bmoon4 added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels May 2, 2024
@Taragolis
Copy link
Contributor

Taragolis commented May 2, 2024

Most of this warnings should be already fixed in k8s provider 8.1.0 (by #38638), there is one place where it still could raise this warning and it covered by #39199 issue

@Taragolis
Copy link
Contributor

I've double check, and found that even after #38638 cncf.kubernetes still use deprecated stuff from the provider side

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area:providers kind:bug This is a clearly a bug provider:cncf-kubernetes Kubernetes provider related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants