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/01/15 23:29:30 UTC

[GitHub] [airflow] tooptoop4 opened a new pull request #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command

tooptoop4 opened a new pull request #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command
URL: https://github.com/apache/airflow/pull/7186
 
 
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   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] feluelle commented on a change in pull request #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command

Posted by GitBox <gi...@apache.org>.
feluelle commented on a change in pull request #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command
URL: https://github.com/apache/airflow/pull/7186#discussion_r367888985
 
 

 ##########
 File path: airflow/cli/commands/dag_command.py
 ##########
 @@ -200,16 +200,22 @@ def dag_show(args):
 @cli_utils.action_logging
 def dag_state(args):
     """
-    Returns the state of a DagRun at the command line.
+    Returns the state (and conf if exists) of a DagRun at the command line.
     >>> airflow dags state tutorial 2015-01-01T00:00:00.000000
     running
+    >>> airflow dags state a_dag_with_conf_passed 2015-01-01T00:00:00.000000
+    failed, {"name": "bob", "age": "42"}
     """
     if args.subdir:
         dag = get_dag(args.subdir, args.dag_id)
     else:
         dag = get_dag_by_file_location(args.dag_id)
     dr = DagRun.find(dag.dag_id, execution_date=args.execution_date)
-    print(dr[0].state if len(dr) > 0 else None)  # pylint: disable=len-as-condition
+    out = dr[0].state if len(dr) > 0 else None  # pylint: disable=len-as-condition
 
 Review comment:
   ```suggestion
       out = dr[0].state if dr else None
   ```

----------------------------------------------------------------
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 a change in pull request #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command

Posted by GitBox <gi...@apache.org>.
tooptoop4 commented on a change in pull request #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command
URL: https://github.com/apache/airflow/pull/7186#discussion_r368140839
 
 

 ##########
 File path: airflow/cli/commands/dag_command.py
 ##########
 @@ -200,16 +200,22 @@ def dag_show(args):
 @cli_utils.action_logging
 def dag_state(args):
     """
-    Returns the state of a DagRun at the command line.
+    Returns the state (and conf if exists) of a DagRun at the command line.
     >>> airflow dags state tutorial 2015-01-01T00:00:00.000000
     running
+    >>> airflow dags state a_dag_with_conf_passed 2015-01-01T00:00:00.000000
+    failed, {"name": "bob", "age": "42"}
     """
     if args.subdir:
         dag = get_dag(args.subdir, args.dag_id)
     else:
         dag = get_dag_by_file_location(args.dag_id)
     dr = DagRun.find(dag.dag_id, execution_date=args.execution_date)
-    print(dr[0].state if len(dr) > 0 else None)  # pylint: disable=len-as-condition
+    out = dr[0].state if len(dr) > 0 else None  # pylint: disable=len-as-condition
 
 Review comment:
   fixed

----------------------------------------------------------------
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 #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command

Posted by GitBox <gi...@apache.org>.
tooptoop4 commented on issue #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command
URL: https://github.com/apache/airflow/pull/7186#issuecomment-575812436
 
 
   @feluelle pls merge

----------------------------------------------------------------
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 #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command
URL: https://github.com/apache/airflow/pull/7186#issuecomment-575812154
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7186?src=pr&el=h1) Report
   > :exclamation: No coverage uploaded for pull request base (`master@92521aa`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `86.5%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7186/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7186?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff            @@
   ##             master   #7186   +/-   ##
   ========================================
     Coverage          ?     85%           
   ========================================
     Files             ?     753           
     Lines             ?   39689           
     Branches          ?       0           
   ========================================
     Hits              ?   33739           
     Misses            ?    5950           
     Partials          ?       0
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7186?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/models/pool.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMvcG9vbC5weQ==) | `97.36% <ø> (ø)` | |
   | [airflow/contrib/operators/databricks\_operator.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy9kYXRhYnJpY2tzX29wZXJhdG9yLnB5) | `92.24% <ø> (ø)` | |
   | [.../providers/apache/spark/hooks/spark\_jdbc\_script.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL3NwYXJrL2hvb2tzL3NwYXJrX2pkYmNfc2NyaXB0LnB5) | `0% <ø> (ø)` | |
   | [airflow/bin/cli.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9iaW4vY2xpLnB5) | `94.73% <ø> (ø)` | |
   | [...ders/google/cloud/example\_dags/example\_dataproc.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2V4YW1wbGVfZGFncy9leGFtcGxlX2RhdGFwcm9jLnB5) | `0% <0%> (ø)` | |
   | [airflow/macros/hive.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9tYWNyb3MvaGl2ZS5weQ==) | `38.7% <0%> (ø)` | |
   | [airflow/utils/log/gcs\_task\_handler.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9sb2cvZ2NzX3Rhc2tfaGFuZGxlci5weQ==) | `0% <0%> (ø)` | |
   | [airflow/models/connection.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9tb2RlbHMvY29ubmVjdGlvbi5weQ==) | `68.78% <0%> (ø)` | |
   | [airflow/contrib/operators/vertica\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy92ZXJ0aWNhX3RvX2hpdmUucHk=) | `0% <0%> (ø)` | |
   | [airflow/gcp/operators/bigquery.py](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree#diff-YWlyZmxvdy9nY3Avb3BlcmF0b3JzL2JpZ3F1ZXJ5LnB5) | `91.59% <100%> (ø)` | |
   | ... and [98 more](https://codecov.io/gh/apache/airflow/pull/7186/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7186?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/7186?src=pr&el=footer). Last update [92521aa...159735a](https://codecov.io/gh/apache/airflow/pull/7186?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] potiuk merged pull request #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #7186: [AIRFLOW-6473] Show conf in response of dag_state cli command
URL: https://github.com/apache/airflow/pull/7186
 
 
   

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