<p dir="auto"><strong>Apache Airflow version</strong>:<br>
2.0.1</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):<br>
1.19<br>
<strong>Environment</strong>:<br>
Openshift 4.5</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
Started sample KubernetesExecutor</p>

<p dir="auto"><strong>What you expected to happen</strong>:<br>
Runs well</p>

<p dir="auto">Internal Airflow bug<br>
<strong>How to reproduce it</strong>:</p>

<p dir="auto"><strong>Anything else we need to know</strong>:</p>

<p dir="auto">Ooops!<br>
Something bad has happened.<br>
Please consider letting us know by creating a bug report using GitHub.</p>
<h2 dir="auto">Python version: 3.8.7<br>
Airflow version: 2.0.1<br>
Node: airflow-k8s-web-58d46fb9cd-rtqxq</h2>
<p dir="auto">Traceback (most recent call last):<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app<br>
response = self.full_dispatch_request()<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request<br>
rv = self.handle_user_exception(e)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception<br>
reraise(exc_type, exc_value, tb)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise<br>
raise value<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request<br>
rv = self.dispatch_request()<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request<br>
return self.view_functions<a href="**req.view_args">rule.endpoint</a><br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/auth.py", line 34, in decorated<br>
return func(*args, **kwargs)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/decorators.py", line 97, in view_func<br>
return f(*args, **kwargs)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/decorators.py", line 60, in wrapper<br>
return f(*args, **kwargs)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py", line 65, in wrapper<br>
return func(*args, session=session, **kwargs)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/views.py", line 2080, in graph<br>
return self.render_template(<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/views.py", line 396, in render_template<br>
return super().render_template(<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", line 280, in render_template<br>
return render_template(<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/templating.py", line 137, in render_template<br>
return _render(<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/templating.py", line 120, in _render<br>
rv = template.render(context)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render<br>
self.environment.handle_exception()<br>
File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception<br>
reraise(*rewrite_traceback_stack(source=source))<br>
File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise<br>
raise value.with_traceback(tb)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/graph.html", line 21, in top-level template code<br>
{% from 'appbuilder/loading_dots.html' import loading_dots %}<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/dag.html", line 21, in top-level template code<br>
{% from 'appbuilder/dag_docs.html' import dag_docs %}<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/main.html", line 20, in top-level template code<br>
{% extends 'appbuilder/baselayout.html' %}<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html", line 2, in top-level template code<br>
{% import 'appbuilder/baselib.html' as baselib %}<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/init.html", line 60, in top-level template code<br>
{% block tail %}<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/graph.html", line 145, in block "tail"<br>
var task_instances = {{ task_instances|tojson }};<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/json/<strong>init</strong>.py", line 376, in tojson_filter<br>
return Markup(htmlsafe_dumps(obj, **kwargs))<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/json/<strong>init</strong>.py", line 290, in htmlsafe_dumps<br>
dumps(obj, **kwargs)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/flask/json/<strong>init</strong>.py", line 211, in dumps<br>
rv = _json.dumps(obj, **kwargs)<br>
File "/usr/local/lib/python3.8/json/<strong>init</strong>.py", line 234, in dumps<br>
return cls(<br>
File "/usr/local/lib/python3.8/json/encoder.py", line 199, in encode<br>
chunks = self.iterencode(o, _one_shot=True)<br>
File "/usr/local/lib/python3.8/json/encoder.py", line 257, in iterencode<br>
return _iterencode(o, 0)<br>
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/json.py", line 74, in _default<br>
raise TypeError(f"Object of type '{obj.<strong>class</strong>.<strong>name</strong>}' is not JSON serializable")<br>
TypeError: Object of type 'V1ResourceRequirements' is not JSON serializable</p>
<p dir="auto"><strong>Apache Airflow version</strong>: 2.0.1</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>): v1.17.12</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: AWS EKS</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
When you click on Graph view for some DAGs in 2.0.1 the UI errors out (logs below).</p>

<p dir="auto"><strong>What you expected to happen</strong>:<br>
The Graph view to display</p>

<p dir="auto"><strong>How to reproduce it</strong>:<br>
It is not clear to me. This only happening on a handle of our DAGs. Also the tree view displays fine.</p>

<p dir="auto"><strong>Anything else we need to know</strong>:</p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.8/site-packages/flask/app.py&quot;, line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File &quot;/usr/local/lib/python3.8/site-packages/flask/app.py&quot;, line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File &quot;/usr/local/lib/python3.8/site-packages/flask/app.py&quot;, line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File &quot;/usr/local/lib/python3.8/site-packages/flask/_compat.py&quot;, line 39, in reraise
    raise value
  File &quot;/usr/local/lib/python3.8/site-packages/flask/app.py&quot;, line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File &quot;/usr/local/lib/python3.8/site-packages/flask/app.py&quot;, line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/auth.py&quot;, line 34, in decorated
    return func(*args, **kwargs)
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/decorators.py&quot;, line 97, in view_func
    return f(*args, **kwargs)
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/decorators.py&quot;, line 60, in wrapper
    return f(*args, **kwargs)
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/utils/session.py&quot;, line 65, in wrapper
    return func(*args, session=session, **kwargs)
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/views.py&quot;, line 2080, in graph
    return self.render_template(
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/views.py&quot;, line 396, in render_template
    return super().render_template(
  File &quot;/usr/local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py&quot;, line 280, in render_template
    return render_template(
  File &quot;/usr/local/lib/python3.8/site-packages/flask/templating.py&quot;, line 137, in render_template
    return _render(
  File &quot;/usr/local/lib/python3.8/site-packages/flask/templating.py&quot;, line 120, in _render
    rv = template.render(context)
  File &quot;/usr/local/lib/python3.8/site-packages/jinja2/environment.py&quot;, line 1090, in render
    self.environment.handle_exception()
  File &quot;/usr/local/lib/python3.8/site-packages/jinja2/environment.py&quot;, line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File &quot;/usr/local/lib/python3.8/site-packages/jinja2/_compat.py&quot;, line 28, in reraise
    raise value.with_traceback(tb)
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/templates/airflow/graph.html&quot;, line 21, in top-level template code
    {% from 'appbuilder/loading_dots.html' import loading_dots %}
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/templates/airflow/dag.html&quot;, line 21, in top-level template code
    {% from 'appbuilder/dag_docs.html' import dag_docs %}
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/templates/airflow/main.html&quot;, line 20, in top-level template code
    {% extends 'appbuilder/baselayout.html' %}
  File &quot;/usr/local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html&quot;, line 2, in top-level template code
    {% import 'appbuilder/baselib.html' as baselib %}
  File &quot;/usr/local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/init.html&quot;, line 60, in top-level template code
    {% block tail %}
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/www/templates/airflow/graph.html&quot;, line 145, in block &quot;tail&quot;
    var task_instances = {{ task_instances|tojson }};
  File &quot;/usr/local/lib/python3.8/site-packages/flask/json/__init__.py&quot;, line 376, in tojson_filter
    return Markup(htmlsafe_dumps(obj, **kwargs))
  File &quot;/usr/local/lib/python3.8/site-packages/flask/json/__init__.py&quot;, line 290, in htmlsafe_dumps
    dumps(obj, **kwargs)
  File &quot;/usr/local/lib/python3.8/site-packages/flask/json/__init__.py&quot;, line 211, in dumps
    rv = _json.dumps(obj, **kwargs)
  File &quot;/usr/local/lib/python3.8/json/__init__.py&quot;, line 234, in dumps
    return cls(
  File &quot;/usr/local/lib/python3.8/json/encoder.py&quot;, line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File &quot;/usr/local/lib/python3.8/json/encoder.py&quot;, line 257, in iterencode
    return _iterencode(o, 0)
  File &quot;/usr/local/lib/python3.8/site-packages/airflow/utils/json.py&quot;, line 74, in _default
    raise TypeError(f&quot;Object of type '{obj.__class__.__name__}' is not JSON serializable&quot;)
TypeError: Object of type 'V1ResourceRequirements' is not JSON serializable"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.8/site-packages/airflow/www/auth.py", line 34, in decorated
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/airflow/www/decorators.py", line 97, in view_func
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/airflow/www/decorators.py", line 60, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/airflow/utils/session.py", line 65, in wrapper
    return func(*args, session=session, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/airflow/www/views.py", line 2080, in graph
    return self.render_template(
  File "/usr/local/lib/python3.8/site-packages/airflow/www/views.py", line 396, in render_template
    return super().render_template(
  File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", line 280, in render_template
    return render_template(
  File "/usr/local/lib/python3.8/site-packages/flask/templating.py", line 137, in render_template
    return _render(
  File "/usr/local/lib/python3.8/site-packages/flask/templating.py", line 120, in _render
    rv = template.render(context)
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.8/site-packages/airflow/www/templates/airflow/graph.html", line 21, in top-level template code
    {% from 'appbuilder/loading_dots.html' import loading_dots %}
  File "/usr/local/lib/python3.8/site-packages/airflow/www/templates/airflow/dag.html", line 21, in top-level template code
    {% from 'appbuilder/dag_docs.html' import dag_docs %}
  File "/usr/local/lib/python3.8/site-packages/airflow/www/templates/airflow/main.html", line 20, in top-level template code
    {% extends 'appbuilder/baselayout.html' %}
  File "/usr/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 "/usr/local/lib/python3.8/site-packages/flask_appbuilder/templates/appbuilder/init.html", line 60, in top-level template code
    {% block tail %}
  File "/usr/local/lib/python3.8/site-packages/airflow/www/templates/airflow/graph.html", line 145, in block "tail"
    var task_instances = {{ task_instances|tojson }};
  File "/usr/local/lib/python3.8/site-packages/flask/json/__init__.py", line 376, in tojson_filter
    return Markup(htmlsafe_dumps(obj, **kwargs))
  File "/usr/local/lib/python3.8/site-packages/flask/json/__init__.py", line 290, in htmlsafe_dumps
    dumps(obj, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask/json/__init__.py", line 211, in dumps
    rv = _json.dumps(obj, **kwargs)
  File "/usr/local/lib/python3.8/json/__init__.py", line 234, in dumps
    return cls(
  File "/usr/local/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.8/site-packages/airflow/utils/json.py", line 74, in _default
    raise TypeError(f"Object of type '{obj.__class__.__name__}' is not JSON serializable")
TypeError: Object of type 'V1ResourceRequirements' is not JSON serializable
</code></pre></div>