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/03/27 00:01:21 UTC

[GitHub] [airflow] mik-laj opened a new pull request #7899: Move out get_python_source from www, Move get_dag to www.utils

mik-laj opened a new pull request #7899: Move out get_python_source from www, Move get_dag to www.utils
URL: https://github.com/apache/airflow/pull/7899
 
 
   Part of https://github.com/apache/airflow/pull/7806
   I am trying to solve cyclical imports. In the next steps, I delete the next import from DAG to DagBag.
   To avoid circular import - airflow.models.dagbag -> airflow.models.dag -> airflow.models.dagbag
   
   ---
   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] 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).
   
   ---
   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] kaxil commented on a change in pull request #7899: Move out get_python_source from www, Move get_dag to www.utils

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #7899: Move out get_python_source from www, Move get_dag to www.utils
URL: https://github.com/apache/airflow/pull/7899#discussion_r403595864
 
 

 ##########
 File path: airflow/models/dag.py
 ##########
 @@ -1797,20 +1797,6 @@ def get_paused_dag_ids(dag_ids: List[str], session: Session = None) -> Set[str]:
     def safe_dag_id(self):
         return self.dag_id.replace('.', '__dot__')
 
-    def get_dag(self, store_serialized_dags=False):
-        """Creates a dagbag to load and return a DAG.
-
-        Calling it from UI should set store_serialized_dags = STORE_SERIALIZED_DAGS.
-        There may be a delay for scheduler to write serialized DAG into database,
-        loads from file in this case.
-        FIXME: remove it when webserver does not access to DAG folder in future.
-        """
-        dag = DagBag(
 
 Review comment:
   Removing this method broke `DagModel.create_dagrun` which broke Trigger Dag View.
   
   PR to solve this: https://github.com/apache/airflow/pull/8148

----------------------------------------------------------------
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] mik-laj commented on a change in pull request #7899: Move out get_python_source from www, Move get_dag to www.utils

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7899: Move out get_python_source from www, Move get_dag to www.utils
URL: https://github.com/apache/airflow/pull/7899#discussion_r398962191
 
 

 ##########
 File path: airflow/models/dag.py
 ##########
 @@ -1797,20 +1797,6 @@ def get_paused_dag_ids(dag_ids: List[str], session: Session = None) -> Set[str]:
     def safe_dag_id(self):
         return self.dag_id.replace('.', '__dot__')
 
-    def get_dag(self, store_serialized_dags=False):
-        """Creates a dagbag to load and return a DAG.
-
-        Calling it from UI should set store_serialized_dags = STORE_SERIALIZED_DAGS.
-        There may be a delay for scheduler to write serialized DAG into database,
-        loads from file in this case.
-        FIXME: remove it when webserver does not access to DAG folder in future.
-        """
-        dag = DagBag(
 
 Review comment:
   We can't use the DagBag class in the airflow.models.dag module.

----------------------------------------------------------------
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 #7899: Move out get_python_source from www, Move get_dag to www.utils

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #7899: Move out get_python_source from www, Move get_dag to www.utils
URL: https://github.com/apache/airflow/pull/7899
 
 
   

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