YangMuye opened a new pull request #8154: Delete cast(DR.execution_date, 
DateTime)
URL: https://github.com/apache/airflow/pull/8154
 
 
   The cast was added by #1871, but it prevents sqlalchemy from automatically 
converting execution_date to UTC and fails 
test_core.CoreTest.test_schedule_dag_fake_scheduled_previous when your 
default_timezone is not set to UTC.
   
   ```
   [2020-04-05 16:31:51,779] {base.py:1205} INFO - SELECT dag_run.state AS 
dag_run_state, dag_run.id AS dag_run_id, dag_run.dag_id AS dag_run_dag_id, 
dag_run.execution_date AS dag_run_execution_date, dag_run.start_date AS 
dag_run_start_date, dag_run.end_date AS dag_run_end_
   date, dag_run.run_id AS dag_run_run_id, dag_run.external_trigger AS 
dag_run_external_trigger, dag_run.conf AS dag_run_conf
   FROM dag_run
   WHERE dag_run.dag_id = ? AND CAST(dag_run.execution_date AS DATETIME) = 
CAST(? AS DATETIME) AND dag_run.run_id = ?
   [2020-04-05 16:31:51,779] {base.py:1210} INFO - 
"\x1b[1m('unit_teststest_schedule_dag_fake_scheduled_previous', '2015-01-01 
00:00:00.000000', 'scheduled__2015-01-01T00:00:00+08:00')\x1b[0m"
   ```
   ---
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [ ] Unit tests coverage for changes (not needed for documentation changes)
   - [ ] Commits follow "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)"
   - [ ] Relevant documentation is updated including usage instructions.
   - [ ] I will engage committers as explained in [Contribution Workflow 
Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request 
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)
 for more information.
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to