You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/02/17 18:31:24 UTC
[GitHub] [airflow] AlexandrKhabarov opened a new pull request #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
AlexandrKhabarov opened a new pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446
---
Issue link: [AIRFLOW-6474](https://issues.apache.org/jira/projects/AIRFLOW/issues/AIRFLOW-6474?filter=myopenissues)
Make sure to mark the boxes below before creating PR: [x]
- [x] Description above provides context of the change
- [x] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
- [x] Unit tests coverage for changes (not needed for documentation changes)
- [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
- [x] Relevant documentation is updated including usage instructions.
- [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
<sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
---
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] ashb commented on a change in pull request #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380961251
##########
File path: airflow/bin/cli.py
##########
@@ -597,8 +608,12 @@ class CLIFactory:
'help': "List dag runs given a DAG id. If state option is given, it will only "
"search for all the dagruns with the given state. "
"If no_backfill option is given, it will filter out "
- "all backfill dagruns for given dag id",
- 'args': ('dag_id', 'no_backfill', 'state', 'output',),
+ "all backfill dagruns for given dag id"
+ "If exec_date_from is given, it will filter out "
+ "all the dagruns that were executed before this date. "
+ "If exec_date_to is given, it will filter out "
+ "all the dagruns that were executed after this date. ",
+ 'args': ('dag_id_opt', 'no_backfill', 'state', 'output', "exec_date_from", "exec_date_to"),
Review comment:
`airflow backfill` has `--start_date` and `--end_date` args that serve a similar purpose. I think you should re-used those names instead of creating new ones.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] AlexandrKhabarov commented on a change in pull request
#7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date
between start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
AlexandrKhabarov commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380600533
##########
File path: airflow/cli/commands/dag_command.py
##########
@@ -300,15 +300,17 @@ def dag_list_dag_runs(args, dag=None):
dagbag = DagBag()
- if args.dag_id not in dagbag.dags:
+ if args.dag_id is not None and args.dag_id not in dagbag.dags:
Review comment:
No, dag_id is optional parameter in this request. It is requirement of this task. See third point of the task.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] ashb commented on a change in pull request #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380961616
##########
File path: airflow/models/dagrun.py
##########
@@ -135,7 +135,7 @@ def find(dag_id=None, run_id=None, execution_date=None,
:param run_id: defines the run id for this dag run
:type run_id: str
:param execution_date: the execution date
- :type execution_date: datetime.datetime
+ :type execution_date: datetime.datetime, list
Review comment:
```suggestion
:type execution_date: datetime.datetime or list[datetime.datetime]
```
Then
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] codecov-io edited a comment on issue #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#issuecomment-587128695
# [Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=h1) Report
> Merging [#7446](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/d1ab3705d3d03f68abc2b900ebb35e8497dee2e7?src=pr&el=desc) will **decrease** coverage by `0.44%`.
> The diff coverage is `71.42%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7446/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #7446 +/- ##
==========================================
- Coverage 86.64% 86.19% -0.45%
==========================================
Files 878 877 -1
Lines 41219 41258 +39
==========================================
- Hits 35715 35564 -151
- Misses 5504 5694 +190
```
| [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [airflow/bin/cli.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9iaW4vY2xpLnB5) | `94.73% <ø> (ø)` | :arrow_up: |
| [airflow/cli/commands/dag\_command.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9jbGkvY29tbWFuZHMvZGFnX2NvbW1hbmQucHk=) | `84.41% <100%> (ø)` | :arrow_up: |
| [airflow/models/dagrun.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMvZGFncnVuLnB5) | `95.79% <66.66%> (-0.76%)` | :arrow_down: |
| [...w/providers/apache/hive/operators/mysql\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2hpdmUvb3BlcmF0b3JzL215c3FsX3RvX2hpdmUucHk=) | `35.84% <0%> (-64.16%)` | :arrow_down: |
| [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
| [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
| [airflow/security/kerberos.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9zZWN1cml0eS9rZXJiZXJvcy5weQ==) | `30.43% <0%> (-45.66%)` | :arrow_down: |
| [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `47.18% <0%> (-45.08%)` | :arrow_down: |
| [airflow/providers/mysql/operators/mysql.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvbXlzcWwvb3BlcmF0b3JzL215c3FsLnB5) | `55% <0%> (-45%)` | :arrow_down: |
| [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `69.38% <0%> (-25.52%)` | :arrow_down: |
| ... and [33 more](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=footer). Last update [d1ab370...886fca4](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] feluelle commented on a change in pull request #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
feluelle commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380580046
##########
File path: airflow/cli/commands/dag_command.py
##########
@@ -300,15 +300,17 @@ def dag_list_dag_runs(args, dag=None):
dagbag = DagBag()
- if args.dag_id not in dagbag.dags:
+ if args.dag_id is not None and args.dag_id not in dagbag.dags:
Review comment:
Does that fix a bug? When would a `dag_id` be `None`? The `dag_id` is required, isn't 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] feluelle commented on a change in pull request #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
feluelle commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380583840
##########
File path: airflow/models/dagrun.py
##########
@@ -135,7 +135,7 @@ def find(dag_id=None, run_id=None, execution_date=None,
:param run_id: defines the run id for this dag run
:type run_id: str
:param execution_date: the execution date
- :type execution_date: datetime.datetime
+ :type execution_date: datetime.datetime, list
Review comment:
Please explain this.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] tooptoop4 commented on issue #7446: [AIRFLOW-6474]
list_dag_runs cli command should allow exec_date between start/end range
and print start/end times
Posted by GitBox <gi...@apache.org>.
tooptoop4 commented on issue #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#issuecomment-587140855
can u do point 2? Print start/end times of the dagruns?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] AlexandrKhabarov commented on a change in pull request
#7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date
between start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
AlexandrKhabarov commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r381447621
##########
File path: airflow/models/dagrun.py
##########
@@ -135,7 +135,7 @@ def find(dag_id=None, run_id=None, execution_date=None,
:param run_id: defines the run id for this dag run
:type run_id: str
:param execution_date: the execution date
- :type execution_date: datetime.datetime
+ :type execution_date: datetime.datetime, list
Review comment:
Done
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] boring-cyborg[bot] commented on issue #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#issuecomment-590317751
Awesome work, congrats on your first merged pull request!
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] AlexandrKhabarov commented on issue #7446: [AIRFLOW-6474]
list_dag_runs cli command should allow exec_date between start/end range
and print start/end times
Posted by GitBox <gi...@apache.org>.
AlexandrKhabarov commented on issue #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#issuecomment-587311872
Sorry, my fault. Of course, I will do 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] codecov-io edited a comment on issue #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#issuecomment-587128695
# [Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=h1) Report
> Merging [#7446](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/d1ab3705d3d03f68abc2b900ebb35e8497dee2e7?src=pr&el=desc) will **decrease** coverage by `0.98%`.
> The diff coverage is `71.42%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7446/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #7446 +/- ##
==========================================
- Coverage 86.55% 85.56% -0.99%
==========================================
Files 878 878
Lines 41219 41225 +6
==========================================
- Hits 35676 35274 -402
- Misses 5543 5951 +408
```
| [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [airflow/bin/cli.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9iaW4vY2xpLnB5) | `94.73% <ø> (ø)` | :arrow_up: |
| [airflow/cli/commands/dag\_command.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9jbGkvY29tbWFuZHMvZGFnX2NvbW1hbmQucHk=) | `84.41% <100%> (ø)` | :arrow_up: |
| [airflow/models/dagrun.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMvZGFncnVuLnB5) | `95.79% <66.66%> (-0.76%)` | :arrow_down: |
| [...flow/providers/apache/cassandra/hooks/cassandra.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2Nhc3NhbmRyYS9ob29rcy9jYXNzYW5kcmEucHk=) | `21.51% <0%> (-72.16%)` | :arrow_down: |
| [...w/providers/apache/hive/operators/mysql\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2hpdmUvb3BlcmF0b3JzL215c3FsX3RvX2hpdmUucHk=) | `35.84% <0%> (-64.16%)` | :arrow_down: |
| [airflow/operators/generic\_transfer.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvZ2VuZXJpY190cmFuc2Zlci5weQ==) | `39.28% <0%> (-60.72%)` | :arrow_down: |
| [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
| [airflow/api/auth/backend/kerberos\_auth.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9hcGkvYXV0aC9iYWNrZW5kL2tlcmJlcm9zX2F1dGgucHk=) | `28.16% <0%> (-54.93%)` | :arrow_down: |
| [airflow/providers/redis/operators/redis\_publish.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvcmVkaXMvb3BlcmF0b3JzL3JlZGlzX3B1Ymxpc2gucHk=) | `50% <0%> (-50%)` | :arrow_down: |
| [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
| ... and [15 more](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=footer). Last update [d1ab370...174016d](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] AlexandrKhabarov commented on a change in pull request
#7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date
between start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
AlexandrKhabarov commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r381467408
##########
File path: airflow/bin/cli.py
##########
@@ -597,8 +608,12 @@ class CLIFactory:
'help': "List dag runs given a DAG id. If state option is given, it will only "
"search for all the dagruns with the given state. "
"If no_backfill option is given, it will filter out "
- "all backfill dagruns for given dag id",
- 'args': ('dag_id', 'no_backfill', 'state', 'output',),
+ "all backfill dagruns for given dag id"
+ "If exec_date_from is given, it will filter out "
+ "all the dagruns that were executed before this date. "
+ "If exec_date_to is given, it will filter out "
+ "all the dagruns that were executed after this date. ",
+ 'args': ('dag_id_opt', 'no_backfill', 'state', 'output', "exec_date_from", "exec_date_to"),
Review comment:
Done
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] ashb commented on a change in pull request #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380960239
##########
File path: airflow/bin/cli.py
##########
@@ -131,11 +131,22 @@ class CLIFactory:
# list_dag_runs
'no_backfill': Arg(
("--no_backfill",),
- "filter all the backfill dagruns given the dag id", "store_true"),
Review comment:
It's good practice to avoid whitespace/formatting only changes to code you don't touch.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] codecov-io commented on issue #7446: [AIRFLOW-6474]
list_dag_runs cli command should allow exec_date between start/end range
and print start/end times
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#issuecomment-587128695
# [Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=h1) Report
> Merging [#7446](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/d1ab3705d3d03f68abc2b900ebb35e8497dee2e7?src=pr&el=desc) will **decrease** coverage by `0.98%`.
> The diff coverage is `71.42%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7446/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #7446 +/- ##
==========================================
- Coverage 86.55% 85.56% -0.99%
==========================================
Files 878 878
Lines 41219 41225 +6
==========================================
- Hits 35676 35274 -402
- Misses 5543 5951 +408
```
| [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [airflow/bin/cli.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9iaW4vY2xpLnB5) | `94.73% <ø> (ø)` | :arrow_up: |
| [airflow/cli/commands/dag\_command.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9jbGkvY29tbWFuZHMvZGFnX2NvbW1hbmQucHk=) | `84.41% <100%> (ø)` | :arrow_up: |
| [airflow/models/dagrun.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMvZGFncnVuLnB5) | `95.79% <66.66%> (-0.76%)` | :arrow_down: |
| [...flow/providers/apache/cassandra/hooks/cassandra.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2Nhc3NhbmRyYS9ob29rcy9jYXNzYW5kcmEucHk=) | `21.51% <0%> (-72.16%)` | :arrow_down: |
| [...w/providers/apache/hive/operators/mysql\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL2hpdmUvb3BlcmF0b3JzL215c3FsX3RvX2hpdmUucHk=) | `35.84% <0%> (-64.16%)` | :arrow_down: |
| [airflow/operators/generic\_transfer.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvZ2VuZXJpY190cmFuc2Zlci5weQ==) | `39.28% <0%> (-60.72%)` | :arrow_down: |
| [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
| [airflow/api/auth/backend/kerberos\_auth.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9hcGkvYXV0aC9iYWNrZW5kL2tlcmJlcm9zX2F1dGgucHk=) | `28.16% <0%> (-54.93%)` | :arrow_down: |
| [airflow/providers/redis/operators/redis\_publish.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvcmVkaXMvb3BlcmF0b3JzL3JlZGlzX3B1Ymxpc2gucHk=) | `50% <0%> (-50%)` | :arrow_down: |
| [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
| ... and [15 more](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=footer). Last update [d1ab370...174016d](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] ashb merged pull request #7446: [AIRFLOW-6474]
list_dag_runs cli command should allow exec_date between start/end range
and print start/end times
Posted by GitBox <gi...@apache.org>.
ashb merged pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] feluelle commented on a change in pull request #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
feluelle commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380602514
##########
File path: airflow/cli/commands/dag_command.py
##########
@@ -300,15 +300,17 @@ def dag_list_dag_runs(args, dag=None):
dagbag = DagBag()
- if args.dag_id not in dagbag.dags:
+ if args.dag_id is not None and args.dag_id not in dagbag.dags:
Review comment:
You are right. 👍
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] boring-cyborg[bot] commented on issue #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#issuecomment-587113938
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:
- Pay attention to the quality of your code (flake8, pylint and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/master/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/master/docs/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/master/BREEZE.rst) for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://apache-airflow-slack.herokuapp.com/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] codecov-io edited a comment on issue #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#issuecomment-587128695
# [Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=h1) Report
> Merging [#7446](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/0bb687990b94da7445f4ba081592de8cea73119e?src=pr&el=desc) will **decrease** coverage by `0.28%`.
> The diff coverage is `71.42%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7446/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #7446 +/- ##
==========================================
- Coverage 86.81% 86.52% -0.29%
==========================================
Files 893 893
Lines 42186 42192 +6
==========================================
- Hits 36622 36508 -114
- Misses 5564 5684 +120
```
| [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [airflow/bin/cli.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9iaW4vY2xpLnB5) | `94.73% <ø> (ø)` | :arrow_up: |
| [airflow/cli/commands/dag\_command.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9jbGkvY29tbWFuZHMvZGFnX2NvbW1hbmQucHk=) | `84.71% <100%> (ø)` | :arrow_up: |
| [airflow/models/dagrun.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMvZGFncnVuLnB5) | `95.81% <66.66%> (-0.76%)` | :arrow_down: |
| [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
| [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
| [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `47.18% <0%> (-45.08%)` | :arrow_down: |
| [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `69.38% <0%> (-25.52%)` | :arrow_down: |
| [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
| [airflow/utils/dag\_processing.py](https://codecov.io/gh/apache/airflow/pull/7446/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9kYWdfcHJvY2Vzc2luZy5weQ==) | `88.12% <0%> (+0.19%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=footer). Last update [0bb6879...6c7d0f2](https://codecov.io/gh/apache/airflow/pull/7446?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] AlexandrKhabarov commented on a change in pull request
#7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date
between start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
AlexandrKhabarov commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r381447874
##########
File path: airflow/bin/cli.py
##########
@@ -597,8 +608,12 @@ class CLIFactory:
'help': "List dag runs given a DAG id. If state option is given, it will only "
"search for all the dagruns with the given state. "
"If no_backfill option is given, it will filter out "
- "all backfill dagruns for given dag id",
- 'args': ('dag_id', 'no_backfill', 'state', 'output',),
+ "all backfill dagruns for given dag id"
+ "If exec_date_from is given, it will filter out "
+ "all the dagruns that were executed before this date. "
+ "If exec_date_to is given, it will filter out "
+ "all the dagruns that were executed after this date. ",
Review comment:
Did you mean airflow dags list_runs ?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] AlexandrKhabarov commented on a change in pull request
#7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date
between start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
AlexandrKhabarov commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r381447681
##########
File path: airflow/bin/cli.py
##########
@@ -131,11 +131,22 @@ class CLIFactory:
# list_dag_runs
'no_backfill': Arg(
("--no_backfill",),
- "filter all the backfill dagruns given the dag id", "store_true"),
Review comment:
Done
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] ashb commented on a change in pull request #7446:
[AIRFLOW-6474] list_dag_runs cli command should allow exec_date between
start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380960677
##########
File path: airflow/bin/cli.py
##########
@@ -597,8 +608,12 @@ class CLIFactory:
'help': "List dag runs given a DAG id. If state option is given, it will only "
"search for all the dagruns with the given state. "
"If no_backfill option is given, it will filter out "
- "all backfill dagruns for given dag id",
- 'args': ('dag_id', 'no_backfill', 'state', 'output',),
+ "all backfill dagruns for given dag id"
+ "If exec_date_from is given, it will filter out "
+ "all the dagruns that were executed before this date. "
+ "If exec_date_to is given, it will filter out "
+ "all the dagruns that were executed after this date. ",
Review comment:
What does this look like when you run `airflow dag_runs --list`? I think you have formatting "bugs" in here.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] AlexandrKhabarov commented on a change in pull request
#7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date
between start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
AlexandrKhabarov commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r381468072
##########
File path: airflow/bin/cli.py
##########
@@ -597,8 +608,12 @@ class CLIFactory:
'help': "List dag runs given a DAG id. If state option is given, it will only "
"search for all the dagruns with the given state. "
"If no_backfill option is given, it will filter out "
- "all backfill dagruns for given dag id",
- 'args': ('dag_id', 'no_backfill', 'state', 'output',),
+ "all backfill dagruns for given dag id"
+ "If exec_date_from is given, it will filter out "
+ "all the dagruns that were executed before this date. "
+ "If exec_date_to is given, it will filter out "
+ "all the dagruns that were executed after this date. ",
Review comment:
I've found formatting bugs in help description.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] AlexandrKhabarov commented on a change in pull request
#7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date
between start/end range and print start/end times
Posted by GitBox <gi...@apache.org>.
AlexandrKhabarov commented on a change in pull request #7446: [AIRFLOW-6474] list_dag_runs cli command should allow exec_date between start/end range and print start/end times
URL: https://github.com/apache/airflow/pull/7446#discussion_r380605900
##########
File path: airflow/models/dagrun.py
##########
@@ -135,7 +135,7 @@ def find(dag_id=None, run_id=None, execution_date=None,
:param run_id: defines the run id for this dag run
:type run_id: str
:param execution_date: the execution date
- :type execution_date: datetime.datetime
+ :type execution_date: datetime.datetime, list
Review comment:
We can pass execution_date as a list of dates. I added list to allowed types. Did i miss something ?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services