Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

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

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

Already on GitHub? Sign in to your account

Flower do not honor FLOWER_TASK_RUNTIME_METRIC_BUCKETS env parameter #23513

Closed
1 of 2 tasks
KulykDmytro opened this issue May 5, 2022 · 1 comment
Closed
1 of 2 tasks
Labels
area:core kind:bug This is a clearly a bug

Comments

@KulykDmytro
Copy link
Contributor

KulykDmytro commented May 5, 2022

Apache Airflow version

2.2.5

What happened

Setting FLOWER_TASK_RUNTIME_METRIC_BUCKETS in flowers container's env variable via extraEnv in chart not causing to change metric's bucketing

extraEnv: |
  - name: FLOWER_PURGE_OFFLINE_WORKERS
    value: "300"
  - name: FLOWER_TASK_RUNTIME_METRIC_BUCKETS
    value: 1,2.5,5,10,30,60,120,300,inf

outputs over flower's /metrics

flower_task_runtime_seconds_bucket{le="0.005",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="0.01",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="0.025",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="0.05",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="0.075",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="0.1",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="0.25",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="0.5",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="0.75",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="1.0",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="2.5",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 0.0
flower_task_runtime_seconds_bucket{le="5.0",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 5.0
flower_task_runtime_seconds_bucket{le="7.5",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 5.0
flower_task_runtime_seconds_bucket{le="10.0",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 11.0
flower_task_runtime_seconds_bucket{le="+Inf",task="airflow.executors.celery_executor.execute_command",worker="celery@airflow-official-worker-64dbd9bb4-tgrzk"} 11.0

What you think should happen instead

Based on flower documentation flower metric's histogram buckets can be set over env variable FLOWER_TASK_RUNTIME_METRIC_BUCKETS

How to reproduce

use official chart
set FLOWER_TASK_RUNTIME_METRIC_BUCKETS value over extraEnv
get data from /metrics endpoint of flower container

Operating System

5.4.181-99.354.amzn2.x86_64 #1 SMP Wed Mar 2 18:50:46 UTC 2022 x86_64 GNU/Linux

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

Amazon EKS

Anything else

FLOWER_PURGE_OFFLINE_WORKERS setting takes it's effect instead

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@KulykDmytro KulykDmytro added area:core kind:bug This is a clearly a bug labels May 5, 2022
@KulykDmytro KulykDmytro changed the title Flower not honor FLOWER_TASK_RUNTIME_METRIC_BUCKETS env parameter Flower do not honor FLOWER_TASK_RUNTIME_METRIC_BUCKETS env parameter May 5, 2022
@potiuk
Copy link
Member

potiuk commented May 9, 2022

If you can see the environment properly set in the flower container, there is no reason why it should not work - please double-check (exec into your container and check if it is set). If it is set, check if this is supported in the flower version that is installed (it's possible this configuration does not work for particular version of flower used).

If it still does not work - I suggest to open an issue with flower. Flower is really executed "as is" by us and we do not look at it nor solve any problems that come with the flower itself - Flower for us is just an external component that we added for convenience, but any problems with it should be handled with flower directlyl

As a workaround - in case this is indeed flower error - you can also modify the args in your values.yaml with -c FLOWER_CONF option added to flower component executed: https://airflow.apache.org/docs/apache-airflow/stable/cli-and-env-variables-ref.html#celery

@apache apache locked and limited conversation to collaborators May 9, 2022
@potiuk potiuk converted this issue into discussion #23589 May 9, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area:core kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

2 participants