AvniM opened a new issue #17054:
URL: https://github.com/apache/airflow/issues/17054
<!--
Welcome to Apache Airflow! For a smooth issue process, try to answer the
following questions.
Don't worry if they're not all applicable; just try to include what you can
:-)
If you need to include code snippets or logs, please put them in fenced code
blocks. If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>
Please delete these comment blocks before submitting the issue.
-->
<!--
IMPORTANT!!!
PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
Please complete the next sections or the issue will be closed.
These questions are the first thing we need to know to understand the
context.
-->
**Apache Airflow version**: 2.1.0
**Kubernetes version (if you are using kubernetes)** (use `kubectl
version`): Client = v1.21.1, Server = v1.19.11
**Environment**:
- **Cloud provider or hardware configuration**: Azure
- **OS** (e.g. from /etc/os-release): Ubuntu 20.04
- **Others**: Docker, Kubernetes, Terraform
**What happened**:
When I try to trigger a DAG run via rest api, I getting the following error
message:
**Command**: `curl -X POST -d '{"execution_date": "2021-01-01T15:00:00Z",
"conf": {}}'
'https://<env>.centralus.cloudapp.azure.com/api/v1/dags/<dag_id>/dagRuns' -H
'content-type: application/json' --user <user_name>`
Error:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h1> Ooops! </h1>
<div>
<pre>
Something bad has happened.
Please consider letting us know by creating a <b><a
href="https://github.com/apache/airflow/issues/new/choose">bug report using
GitHub</a></b>.
Python version: 3.7.10
Airflow version: 2.1.0
Node: airflow-webserver-6bfdb5f887-dgnbb
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line
2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line
1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line
1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py",
line 39, in reraise
raise value
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line
1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line
1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File
"/usr/local/lib/python3.7/dist-packages/airflow/_vendor/connexion/decorators/decorator.py",
line 48, in wrapper
response = function(request)
File
"/usr/local/lib/python3.7/dist-packages/airflow/_vendor/connexion/decorators/uri_parsing.py",
line 144, in wrapper
response = function(request)
File
"/usr/local/lib/python3.7/dist-packages/airflow/_vendor/connexion/decorators/validation.py",
line 184, in wrapper
response = function(request)
File
"/usr/local/lib/python3.7/dist-packages/airflow/_vendor/connexion/decorators/validation.py",
line 384, in wrapper
return function(request)
File
"/usr/local/lib/python3.7/dist-packages/airflow/_vendor/connexion/decorators/response.py",
line 103, in wrapper
response = function(request)
File
"/usr/local/lib/python3.7/dist-packages/airflow/_vendor/connexion/decorators/parameter.py",
line 121, in wrapper
return function(**kwargs)
File
"/usr/local/lib/python3.7/dist-packages/airflow/api_connexion/security.py",
line 47, in decorated
return func(*args, **kwargs)
File
"/usr/local/lib/python3.7/dist-packages/airflow/utils/session.py", line
70, in wrapper
return func(*args, session=session, **kwargs)
File
"/usr/local/lib/python3.7/dist-packages/airflow/api_connexion/endpoints/dag_run_endpoint.py",
line 249, in post_dag_run
or_(DagRun.run_id == post_body["run_id"], DagRun.execution_date
== post_body["execution_date"]),
TypeError: tuple indices must be integers or slices, not str
</pre>
</div>
</div>
</body>
</html>
<!-- (please include exact error messages if you can) -->
**What you expected to happen**:
As per
[documentation](https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/post_dag_run),
a new instance of the specified DAG should get triggered.
<!-- What do you think went wrong? -->
**How to reproduce it**:
Try triggering a DAG run for Airflow 2.1.0 using python 3.7.
<!---
As minimally and precisely as possible. Keep in mind we do not have access
to your cluster or dags.
If you are using kubernetes, please attempt to recreate the issue using
minikube or kind.
## Install minikube/kind
- Minikube https://minikube.sigs.k8s.io/docs/start/
- Kind https://kind.sigs.k8s.io/docs/user/quick-start/
If this is a UI bug, please provide a screenshot of the bug or a link to a
youtube video of the bug in action
You can include images using the .md style of

To record a screencast, mac users can use QuickTime and then create an
unlisted youtube video with the resulting .mov file.
--->
**Anything else we need to know**:
<!--
How often does this problem occur? Once? Every time etc?
Any relevant logs to include? Put them here in side a detail tag:
<details><summary>x.log</summary> lots of stuff </details>
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]