You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "infamax (via GitHub)" <gi...@apache.org> on 2025/10/03 20:08:15 UTC
[I] Airflow `generate_run_id` with custom table doesn't work for backfill and manual trigger dag runs [airflow]
infamax opened a new issue, #56374:
URL: https://github.com/apache/airflow/issues/56374
### Apache Airflow version
3.1.0
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
Hello!
I create custom Timetable. In [doc](https://airflow.apache.org/docs/apache-airflow/stable/howto/timetable.html#changing-generated-run-id) timetable has method for generate custom run_id. This feature works for scheduled runs but not working for manual and backfill trigger dag runs.
### What you think should happen instead?
Method `generate_run_id` for custom timetable work correct in backfill and manual triggers modes.
### How to reproduce
Write airflow plugins with custom Timetable. File location in plugins folder and name `my_timetable.py`. Example like this
```python
from airflow.plugins_manager import AirflowPlugin
from airflow.timetables.base import DataInterval
from airflow.timetables.events import EventsTimetable
from airflow.utils.types import DagRunType
from pendulum import DateTime
class MyTimeTable(EventsTimetable):
def generate_run_id(self, *, run_type: DagRunType, run_after: DateTime, data_interval: DataInterval, **kwargs):
return data_interval.end.format("YYYY-MM-DD")
class MyTimeTablePlugin(AirflowPlugin):
name = "my_timetable_plugin"
timetables = [MyTimeTable]
```
Write a simple dag using this timetable. Example like this
```
import pendulum
from airflow.sdk import DAG
from airflow.providers.standard.operators.bash import BashOperator
from my_timetable import MyTimeTable
event_dates = [
pendulum.datetime(2025, 9, 5, 8, 27, 15),
pendulum.datetime(2025, 9, 10, 10, 27, 15),
pendulum.datetime(2025, 10, 5, 8, 27, 15),
]
start_date = pendulum.datetime(2022, 1, 1)
with DAG(dag_id="my_dag", start_date=start_date, schedule=EventsTimetable(event_dates=event_dates, restrict_to_events=True):
bash_operator = BashOperator(task_id="hello", bash_command="echo hello")
bash_operator
```
When run this code for schedule `run_id` for generate dag is correct. But when is using backfill added prefix `backfill__` but timetable method `generate_run_id` not add this prefix :(
### Operating System
Ubuntu 22.04
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else?
_No response_
### 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
Re: [I] Airflow `generate_run_id` with custom table doesn't work for backfill and manual trigger dag runs [airflow]
Posted by "NilsJPWerner (via GitHub)" <gi...@apache.org>.
NilsJPWerner commented on issue #56374:
URL: https://github.com/apache/airflow/issues/56374#issuecomment-3367777012
Duplicate: https://github.com/apache/airflow/issues/55908
--
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 `generate_run_id` with custom table doesn't work for backfill and manual trigger dag runs [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal closed issue #56374: Airflow `generate_run_id` with custom table doesn't work for backfill and manual trigger dag runs
URL: https://github.com/apache/airflow/issues/56374
--
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 `generate_run_id` with custom table doesn't work for backfill and manual trigger dag runs [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #56374:
URL: https://github.com/apache/airflow/issues/56374#issuecomment-3367062443
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