alexbegg commented on issue #10434:
URL: https://github.com/apache/airflow/issues/10434#issuecomment-681534486
I tracked it down. The problem is an invalid value of
`request.args.get('execution_date')` when passed in the URL unencoded resulting
in not returning the correct pendulum datetime when used in `pendulum.parse()`
which is used in many places in`www_rbac` python methods. The problem is not
with the `:` either, only with the unescaped `+`.
I edited the code to log out the `request.args.get('execution_date')` value
on each request, and I found:
- Using `execution_date=2020-08-11T07:00:00+00:00` in the URL, and
`request.args.get('execution_date')` resulting in `2020-08-11T07:00:00 00:00`
(notice the space)
```
>>> pendulum.parse('2020-08-11T07:00:00 00:00')
<Pendulum [2020-08-11T00:00:00+00:00]>
```
❌ Wrong time! It ends up being `00:00:00`.
- Using `execution_date=2020-08-11T07:00:00%2B00:00` in the URL, and
`request.args.get('execution_date')` resulting in `2020-08-11T07:00:00+00:00`
(notice the`+`)
```
>>> pendulum.parse('2020-08-11T07:00:00+00:00')
<Pendulum [2020-08-11T07:00:00+00:00]>
```
✅ Correct time! It ends up being `07:00:00`.
Encoding the `execution_date` in every URL should fix the issue. Making the
PR now.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]