Skip to content

This function is deprecated. Please use create_unique_id. #39356

@bmoon4

Description

@bmoon4

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions