Coder Social home page Coder Social logo

Comments (4)

elephantum avatar elephantum commented on August 17, 2024

@pindge can you describe your setup?

Do you have a way to reproduce this behavior?

from airflow-exporter.

pindge avatar pindge commented on August 17, 2024

@pindge can you describe your setup?

Do you have a way to reproduce this behavior?

git clone https://github.com/GeoscienceAustralia/dea-airflow.git
cd dea-airflow
git checkout develop

mkdir ./logs
echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" >> .env
docker-compose up airflow-init
docker-compose up

via web browser

  1. username: airflow and password:airflow
  2. enable dag dea_public_data_sns_streamline_indexing
  3. navigate to /admin/metrics/ end point
  4. then there is the error

Likely due to this line

    params={"labels": {"env": "dev"}},

here is the snippets, I am going to fix this, but will leave this issue open

# THE DAG
dag = DAG(
    "dea_public_data_sns_streamline_indexing",
    doc_md=__doc__,
    default_args=DEFAULT_ARGS,
    schedule_interval="0 */1 * * *",  # hourly
    # schedule_interval=None,  # for testing
    catchup=False,
    max_active_runs=1,
    tags=["k8s", "sentinel-2", "streamline-indexing"],
    params={"labels": {"env": "dev"}},
)

from airflow-exporter.

tanvn avatar tanvn commented on August 17, 2024

I got the same error the day before on Airflow 2.2.2 too.
I guessed from 2.2.2, the Param class has been changed
https://github.com/apache/airflow/blob/main/airflow/models/param.py#L36
so we need to change the way to get the labels on

  File "/home/airflow/.local/lib/python3.8/site-packages/airflow_exporter/prometheus_exporter.py", line 201, in get_dag_labels
    labels = labels.get('__var', {})

This function (get_dag_labels) runs well on Airflow 2.1.1

from airflow-exporter.

elephantum avatar elephantum commented on August 17, 2024

I'm looking into it

from airflow-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.