kaxil commented on issue #5743: [AIRFLOW-5088][AIP-24] Persisting serialized 
DAG in DB for webserver scalability
URL: https://github.com/apache/airflow/pull/5743#issuecomment-532172943
 
 
   > > * Do we want to let users use old versions of MySQL (and Mariadb that 
doesn't support JSON with sqlalchemy) or add a note and tell them that if you 
want to use serialisation you would need to use
   > >   newer version of DB or a DB (Postgres) that supports JSON columns. Or 
else just keep store_serialised_dags=False. If we want to support old versions 
or DB that don't support JSON columns, that we will have to handle those 
exceptions and store the serialised DAG (python dicts) as string and use 
json.loads and json.dump.
   > 
   > The one problem with this idea is that the migration is independent of the 
config setting, so we need a migration that works with either config setting.
   > 
   > The tests currently run against Mysql 5.7 too :)
   
   Actually, that's how I figured too. I didn't knew that we were using that 
old version of Mysql in test. One of the tests errored and then I used your 
suggestion:
   
   
   
https://github.com/apache/airflow/blob/614a8d0b4fe66f42f97ee397015834d70ce8068b/airflow/migrations/versions/d38e04c12aa2_add_serialized_dag_table.py#L37-L49
   
   And it worked. Although I was expecting that I will have to do some changes 
in SerializedDagModel too:
   
   
https://github.com/apache/airflow/blob/614a8d0b4fe66f42f97ee397015834d70ce8068b/airflow/models/serialized_dag.py#L62-L71
   
   but it worked without having it change anything.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to