Skip to content

This function is deprecated. Please use create_unique_id. #39356

Closed

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

Activity

  1. Taragolis commented on May 2, 2024

    @Taragolis
    Contributor

    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

  2. Taragolis commented on May 2, 2024

    @Taragolis
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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