airflow-helm / charts

The User-Community Airflow Helm Chart is the standard way to deploy Apache Airflow on Kubernetes with Helm. Originally created in 2017, it has since helped thousands of companies create production-ready deployments of Airflow on Kubernetes.
https://github.com/airflow-helm/charts/tree/main/charts/airflow
Apache License 2.0
630 stars 474 forks source link

Airflow page crashing when i trigger a dag #784

Closed naani10 closed 9 months ago

naani10 commented 9 months ago

Checks

Chart Version

8.7.1

Kubernetes Version

Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:36:36Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.5", GitCommit:"4009cfb7c076b982a1e38b079ae363ece1eb1a19", GitTreeState:"clean", BuildDate:"2023-06-12T18:46:22Z", GoVersion:"go1.19.4", Compiler:"gc", Platform:"linux/amd64"}

Helm Version

version.BuildInfo{Version:"v3.7.2", GitCommit:"663a896f4a815053445eec4153677ddc24a0a361", GitTreeState:"clean", GoVersion:"go1.16.10"}

Description

How to reproduce Hi I am deploying airflow version of 2.6.1 on AKS 1.26.6

when i click on "trigger dag" from dag home page it is able to trigger job and page is not crashing image

but when i open the dag and click on "trigger dag" page is crashing image

crashing image below image

below is the log from airflow-web pod

AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" [�[34m2023-09-12T10:10:32.957+0000�[0m] {�[34mapp.py:�[0m1744} ERROR�[0m - Exception on /dags/Bug_recreate/grid [GET]�[0m Traceback (most recent call last): File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 2529, in wsgi_app response = self.full_dispatch_request() File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/auth.py", line 47, in decorated return func(*args, *kwargs) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/decorators.py", line 166, in view_func return f(args, kwargs) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/decorators.py", line 125, in wrapper return f(*args, *kwargs) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py", line 76, in wrapper return func(args, session=session, **kwargs) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/views.py", line 2703, in grid return self.render_template( File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/views.py", line 638, in render_template return super().render_template( File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", line 339, in render_template return render_template( File "/home/airflow/.local/lib/python3.8/site-packages/flask/templating.py", line 147, in render_template return _render(app, template, context) File "/home/airflow/.local/lib/python3.8/site-packages/flask/templating.py", line 130, in _render rv = template.render(context) File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/grid.html", line 22, in top-level template code {% from 'appbuilder/loading_dots.html' import loading_dots %} File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/dag.html", line 37, in top-level template code {% set execution_date_arg = request.args.get('execution_date') %} File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/main.html", line 20, in top-level template code {% extends 'appbuilder/baselayout.html' %} File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html", line 2, in top-level template code {% import 'appbuilder/baselib.html' as baselib %} File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/init.html", line 42, in top-level template code {% block body %} File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html", line 16, in block 'body' {% block messages %} File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/main.html", line 213, in block 'messages' {% include 'appbuilder/flash.html' %} File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/appbuilder/flash.html", line 38, in top-level template code {{ show_message(m, category) }} File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/utils.py", line 83, in from_obj if hasattr(obj, "jinja_pass_arg"): jinja2.exceptions.UndefinedError: 'show_message' is undefined

Can you please help me resolve this issue? @thesuperzapper Thanks in advance

Relevant Logs

AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
[�[34m2023-09-12T10:10:32.957+0000�[0m] {�[34mapp.py:�[0m1744} ERROR�[0m - Exception on /dags/Bug_recreate/grid [GET]�[0m
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/auth.py", line 47, in decorated
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/decorators.py", line 166, in view_func
return f(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/decorators.py", line 125, in wrapper
return f(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py", line 76, in wrapper
return func(*args, session=session, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/views.py", line 2703, in grid
return self.render_template(
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/views.py", line 638, in render_template
return super().render_template(
File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", line 339, in render_template
return render_template(
File "/home/airflow/.local/lib/python3.8/site-packages/flask/templating.py", line 147, in render_template
return _render(app, template, context)
File "/home/airflow/.local/lib/python3.8/site-packages/flask/templating.py", line 130, in _render
rv = template.render(context)
File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/grid.html", line 22, in top-level template code
{% from 'appbuilder/loading_dots.html' import loading_dots %}
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/dag.html", line 37, in top-level template code
{% set execution_date_arg = request.args.get('execution_date') %}
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/main.html", line 20, in top-level template code
{% extends 'appbuilder/baselayout.html' %}
File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html", line 2, in top-level template code
{% import 'appbuilder/baselib.html' as baselib %}
File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/init.html", line 42, in top-level template code
{% block body %}
File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html", line 16, in block 'body'
{% block messages %}
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/main.html", line 213, in block 'messages'
{% include 'appbuilder/flash.html' %}
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/appbuilder/flash.html", line 38, in top-level template code
{{ show_message(m, category) }}
File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/utils.py", line 83, in from_obj
if hasattr(obj, "jinja_pass_arg"):
jinja2.exceptions.UndefinedError: 'show_message' is undefined

Custom Helm Values

No response

thesuperzapper commented 9 months ago

As was said in the issue you raised on https://github.com/apache/airflow/issues/34312, it probably has something to do with your custom changes to the airflow theme, and is definitely not related to the helm chart.