You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Rafnel (via GitHub)" <gi...@apache.org> on 2023/05/23 20:22:50 UTC
[GitHub] [airflow] Rafnel opened a new issue, #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Rafnel opened a new issue, #31487:
URL: https://github.com/apache/airflow/issues/31487
### Apache Airflow version
Other Airflow 2 version (please specify below)
### What happened
I have an Airflow DAG (Airflow 2.6.0) where the code looks like this:
```
DAG(dag_id="my_dag",`
start_date=pendulum.datetime(2023, 5, 1, tz="America/Chicago"),
schedule_interval="0 4 * * *", # Every day at 4AM Central
catchup=False) as dag:
```
Note that this is a timezone-aware DAG for the America/Chicago timezone: https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/timezone.html#time-zone-aware-dags
We turned this DAG on yesterday evening and it immediately began running for its 2023-05-22 run, which we allowed to happen:

Then we expect at 4AM today, 2023-05-23 it would run, but it never did.

You can see the data interval ended at 4am this morning but the DAG never triggered. it even says the next run is 5 hours ago (screenshot taken around 8:30AM America/Chicago time).
Then, to add to my confusion, at exactly 9AM America/Chicago time (14:00 UTC), the DAG kicked off and began running:

This plainly seems like a bug to me, but I was hoping for a second opinion.. Is there something I'm doing wrong here? Why did it not run at 4am? and I'm really confused how the cron of `0 4 * * *` translates to run at 9AM CDT/2PM UTC.
Thank you!
### What you think should happen instead
I believe the DAG should have run after the data interval end, at 4AM CDT instead of 9AM CDT.
### How to reproduce
DAG code:
```
DAG(dag_id="my_dag",`
start_date=pendulum.datetime(2023, 5, 1, tz="America/Chicago"),
schedule_interval="0 4 * * *", # Every day at 4AM Central
catchup=False) as dag:
```
and my airflow.cfg has these two configs if it makes any difference:
`default_timezone = America/Chicago`
`default_ui_timezone = America/Chicago`
### Operating System
Ubuntu 20.04 LTS
### Versions of Apache Airflow Providers
_No response_
### Deployment
Virtualenv installation
### Deployment details
Deploying Airflow on "bare metal":
1. Set up Python virtualenv
2. point dags_folder in airflow.cfg to my dag code folder
3. Change sql_alchemy_conn in airflow.cfg to connection string to our production Airflow MSSQL DB (mssql+pyodbc). Driver is FreeTDS
4. Run airflow db init
### Anything else
Seems like there is a constant +5 hours being added to any cron schedule I make.
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Rafnel commented on issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Posted by "Rafnel (via GitHub)" <gi...@apache.org>.
Rafnel commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-1563093245
Thanks, we are switching to postgresql now. Luckily we are still in the proof-of-concept phase so this is relatively easy.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl closed issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
URL: https://github.com/apache/airflow/issues/31487
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Rafnel commented on issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Posted by "Rafnel (via GitHub)" <gi...@apache.org>.
Rafnel commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-1561972242
Update: I've been snooping around Airflow issues and I believe this is a common bug amongst those using MSSQL:
- https://github.com/apache/airflow/discussions/29082
- https://github.com/apache/airflow/issues/21171
I do understand MSSQL support is experimental, so it sounds like this might unfortunately be par for the course for using it. Our MSSQL DB uses a local TZ of America/Chicago and I think that is clashing with Airflow datetime logic and causing it to add an extra 5 hours to any cron schedule.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] zeotuan commented on issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Posted by "zeotuan (via GitHub)" <gi...@apache.org>.
zeotuan commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-1703826403
@eladkal Sorry for the earlier confusion. I indeed have a requirement to run Airflow with an MSSQL backend. I would be more than happy to help maintain MSSQL support if needed and might even be able to bring in additional support, as my team is actively looking for it. Let's see how things turn out.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal commented on issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-1702731936
Hi @zeotuan this issue is about MsSQL as backend of Airflow not MsSQL integration to Airflow.
You are still able to connect to MsSQL database and run workflows against it.
Note that we currently run a vote to drop MsSQL as official backend
https://lists.apache.org/thread/37q5kbqx7o03fkfoyq1x6oc85h5mghvh
If vote passes (very likely) this issue will be closed as won't fix.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-1560073790
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-2002060891
MSSQL support is dropped finally in Airflow 2.9.0, I'd not expect a fix for this issue. Therefore closing.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] zeotuan commented on issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Posted by "zeotuan (via GitHub)" <gi...@apache.org>.
zeotuan commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-1702710256
@potiuk, that's sad to know. I'm presently working on orchestration software and drew considerable inspiration from Airflow. However, I'm contemplating a full transition to Airflow, with the caveat of needing MSSQL integration. I'll Investigate this issue.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-1561974532
One more reason why we should consider droppying MSSQL support. I think we are close to the decision of doing so, so I recommmend to switch to Postgres.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #31487: [Airflow 2.6.0] Airflow DAG does not run on schedule, 'next run' is 4 hours ago
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #31487:
URL: https://github.com/apache/airflow/issues/31487#issuecomment-1704076299
> @eladkal Sorry for the earlier confusion. I indeed have a requirement to run Airflow with an MSSQL backend. I would be more than happy to help maintain MSSQL support if needed and might even be able to bring in additional support, as my team is actively looking for it. Let's see how things turn out.
I think this is not the matter of "supporting" MSSQL. This is the matter of additional effort is required for any maintainers when adding pretty much any feature that touches the db. This is also the matter of MSSQL having unstable tests and taking 2x memory than any other backend + this is the case that it does not support some of the newer features we us in Postgres and MySQL to optimise the DB operations + this is the case for ARM support which is missing for mssql etc. etc.
There are many reasons that mssql slows us down and currently the result of voting that @eladkal mentioned is that we are going to drop MSSQL. So far the result of voting is `20:0`. This has always been an experimental feature and it's more than likely we will drop it in Airflow 2.8.
The good news is that we will provide a way to migrate the MSSQL DB (likely just to Postgres) as part of this move. So I would rather recommend your team focuses on bringing in Postgres in-house rather than helping us to support MSSQL. This is probably most reasonable thing you can do @zeotuan
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org