You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ellisms (via GitHub)" <gi...@apache.org> on 2023/02/17 11:32:51 UTC

[GitHub] [airflow] ellisms opened a new issue, #29588: Support execution_date parameter in dags list-runs CLI

ellisms opened a new issue, #29588:
URL: https://github.com/apache/airflow/issues/29588

   ### Description
   
   Enable parameter in dags list-runs command to support supplying an execution_date, or range of execution_dates.
   
   ### Use case/motivation
   
   Listing runs based on execution date (logical) date rather than start/end dates.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a 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] boring-cyborg[bot] commented on issue #29588: Support execution_date parameter in dags list-runs CLI

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #29588:
URL: https://github.com/apache/airflow/issues/29588#issuecomment-1434513546

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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] shahar1 commented on issue #29588: Support execution_date parameter in dags list-runs CLI

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 commented on issue #29588:
URL: https://github.com/apache/airflow/issues/29588#issuecomment-1435037862

   > @shahar1 would you like to take this one?
   
   Yes, I would!


-- 
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 #29588: Support execution_date parameter in dags list-runs CLI

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #29588:
URL: https://github.com/apache/airflow/issues/29588#issuecomment-1434739762

   @shahar1 would you like to take this one?


-- 
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] shahar1 commented on issue #29588: Support execution_date parameter in dags list-runs CLI

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 commented on issue #29588:
URL: https://github.com/apache/airflow/issues/29588#issuecomment-1443872295

   I started working on this issue, and it seems that `start_date`/`end_date` terms already refer to `execution_date` (logical date), as of the latest Airflow version. See the following snippet from `airflow.cli.commands.dag_command.py`:
   
   ```python
       dag_runs = DagRun.find(
           dag_id=args.dag_id,
           state=state,
           no_backfills=args.no_backfill,
           execution_start_date=args.start_date, # <-
           execution_end_date=args.end_date, # <-
           session=session,
       )
   ```
   
   In the `find()` method of `airflow.models.dagrun.py`: - you could see the following logic:
   ```python
           if execution_start_date and execution_end_date:
               qry = qry.filter(cls.execution_date.between(execution_start_date, execution_end_date))
           elif execution_start_date:
               qry = qry.filter(cls.execution_date >= execution_start_date)
           elif execution_end_date:
               qry = qry.filter(cls.execution_date <= execution_end_date)
   ```
   
   Thus - the existing functionality resolves the issue.
   
   @ellisms Which Airflow version do you use? Does the above provide what you need, or do you need something else?


-- 
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 #29588: Support execution_date parameter in dags list-runs CLI

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #29588:
URL: https://github.com/apache/airflow/issues/29588#issuecomment-1445155489

   Closing it provisionally as fixed then. In case @ellisms has some more to add we can always reopen it.


-- 
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 closed issue #29588: Support execution_date parameter in dags list-runs CLI

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #29588: Support execution_date parameter in dags list-runs CLI
URL: https://github.com/apache/airflow/issues/29588


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