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 2021/09/11 06:29:21 UTC

[GitHub] [airflow] Narendra-Neerukonda edited a comment on issue #18133: bulk_sync_to_db got UnicodeDecodeError when Chinese characters in dag code

Narendra-Neerukonda edited a comment on issue #18133:
URL: https://github.com/apache/airflow/issues/18133#issuecomment-917351733


   In Airflow 2.1.3, there is an option in core for store_dag_code, which if set to True, stores the dag code in DB and UI retrieves it from there (nelow snippet from 2.1.3):
   `    
   @classmethod
       def code(cls, fileloc) -> str:
           """Returns source code for this DagCode object.
   
           :return: source code as string
           """
           if STORE_DAG_CODE:
               return cls._get_code_from_db(fileloc)
           else:
               return cls._get_code_from_file(fileloc)
   `
   
   However, in the current main branch, the store_dag_code option seems to have been removed and the code is loaded directly from DB (below snippet from main). So, not sure if the issue will come any more in future releases.
   `    
   @classmethod
       def code(cls, fileloc) -> str:
           """Returns source code for this DagCode object.
   
           :return: source code as string
           """
           return cls._get_code_from_db(fileloc)
   `


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