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/12/07 15:59:56 UTC

[GitHub] [airflow] GuillaumeDesforges opened a new pull request #12889: Add airflow __main__

GuillaumeDesforges opened a new pull request #12889:
URL: https://github.com/apache/airflow/pull/12889


   closes: #12888
   
   This PR proposes to simply add a `__main__.py` file to airflow which is an exact copy of airflow/bin/airflow.
   
   There is probably a better way to do it (see https://github.com/apache/airflow/pull/7808 for versions 2.*+)
   


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



[GitHub] [airflow] github-actions[bot] commented on pull request #12889: Add airflow __main__

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12889:
URL: https://github.com/apache/airflow/pull/12889#issuecomment-740230675


   [The Workflow run](https://github.com/apache/airflow/actions/runs/406940525) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


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



[GitHub] [airflow] ashb commented on pull request #12889: Add airflow __main__

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #12889:
URL: https://github.com/apache/airflow/pull/12889#issuecomment-756083117


   > /opt/airflow/docs/_api/airflow/__main__/index.rst: WARNING: document isn't included in any toctree
   
   We should exclude that file from the autoapi code generation.


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



[GitHub] [airflow] ashb edited a comment on pull request #12889: Add airflow __main__

Posted by GitBox <gi...@apache.org>.
ashb edited a comment on pull request #12889:
URL: https://github.com/apache/airflow/pull/12889#issuecomment-740018246


   We should change the `airflow/bin/airflow` to use this file instead of having code duplication.


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



[GitHub] [airflow] github-actions[bot] commented on pull request #12889: Add airflow __main__

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12889:
URL: https://github.com/apache/airflow/pull/12889#issuecomment-740162580


   [The Workflow run](https://github.com/apache/airflow/actions/runs/406662625) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


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



[GitHub] [airflow] kaxil closed pull request #12889: Add airflow __main__

Posted by GitBox <gi...@apache.org>.
kaxil closed pull request #12889:
URL: https://github.com/apache/airflow/pull/12889


   


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



[GitHub] [airflow] ashb commented on a change in pull request #12889: Add airflow __main__

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #12889:
URL: https://github.com/apache/airflow/pull/12889#discussion_r537862744



##########
File path: airflow/bin/airflow
##########
@@ -20,18 +20,7 @@
 # under the License.
 import os
 
-import argcomplete
+from airflow.bin.cli import cli_main
 
-from airflow.configuration import conf
-from airflow.bin.cli import CLIFactory
-
-if __name__ == '__main__':
-
-    if conf.get("core", "security") == 'kerberos':
-        os.environ['KRB5CCNAME'] = conf.get('kerberos', 'ccache')
-        os.environ['KRB5_KTNAME'] = conf.get('kerberos', 'keytab')
-
-    parser = CLIFactory.get_parser()
-    argcomplete.autocomplete(parser)
-    args = parser.parse_args()
-    args.func(args)
+if __name__ == "__main__":
+    cli_main()

Review comment:
       Please ensure files have trailing new lines for consistency.




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



[GitHub] [airflow] ashb commented on pull request #12889: Add airflow __main__

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #12889:
URL: https://github.com/apache/airflow/pull/12889#issuecomment-740018246


   We should change the `airflow/bin/airflow` to use this file instead -- having code duplication.


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



[GitHub] [airflow] github-actions[bot] commented on pull request #12889: Add airflow __main__

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12889:
URL: https://github.com/apache/airflow/pull/12889#issuecomment-740075524


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


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