Update conf column in dag_run table type from bytes to JSON#44533
Update conf column in dag_run table type from bytes to JSON#44533ephraimbuddy merged 56 commits intoapache:mainfrom
Conversation
|
While Testing this I noticed an issue in the downgrade case. We are not removing the data from downgrade and just perform below conversion. I am getting Should we also move data to the archive table in case of a downgrade as well? |
Yeah, it is different than XCom, because XCom code had handling of both JSON & pickle type -- for dagrun conf it would be different. For downgrade you might just want to insert all records from the archive table back here. |
…rate_conf_column_as_json
…onomer/airflow into dag_run_migrate_conf_column_as_json
airflow/migrations/versions/0050_3_0_0_remove_pickled_data_from_dagrun_table.py
Outdated
Show resolved
Hide resolved
In [PR](#44166) we added migration for removing pickled data from `xcom` table. During my testing I noticed with `SQLite` [insert](https://github.com/apache/airflow/blob/main/airflow/migrations/versions/0049_3_0_0_remove_pickled_data_from_xcom_table.py#L88) statement is not working in case of upgrade. Changing condition to `hex(substr(value, 1, 1)) = '80'` works. Tested [here](#44533 (comment)). related: #44166
airflow/migrations/versions/0050_3_0_0_remove_pickled_data_from_dagrun_table.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0050_3_0_0_remove_pickled_data_from_dagrun_table.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0050_3_0_0_remove_pickled_data_from_dagrun_table.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0055_3_0_0_remove_pickled_data_from_dagrun_table.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0055_3_0_0_remove_pickled_data_from_dagrun_table.py
Outdated
Show resolved
Hide resolved
…onomer/airflow into dag_run_migrate_conf_column_as_json
airflow/migrations/versions/0055_3_0_0_remove_pickled_data_from_dagrun_table.py
Show resolved
Hide resolved
…rate_conf_column_as_json
…rate_conf_column_as_json
…onomer/airflow into dag_run_migrate_conf_column_as_json
…rate_conf_column_as_json
…4533) * remove pickled data from dag run table * fix downgrade + add news fragement * remove archive table if exits after downgrade * removing archiving data * fixing static check * fixing static checks * simplying upgrade and downgrade as per review * fixing failures * removing setting conf to null * refactor approach to migrate values in conf * update offline warning * resolving conflicts * resolving conflicts * resolving conflicts * updating batch size * updaing conf type --------- Co-authored-by: Jed Cunningham <[email protected]>
…4533) * remove pickled data from dag run table * fix downgrade + add news fragement * remove archive table if exits after downgrade * removing archiving data * fixing static check * fixing static checks * simplying upgrade and downgrade as per review * fixing failures * removing setting conf to null * refactor approach to migrate values in conf * update offline warning * resolving conflicts * resolving conflicts * resolving conflicts * updating batch size * updaing conf type --------- Co-authored-by: Jed Cunningham <[email protected]>
…4533) * remove pickled data from dag run table * fix downgrade + add news fragement * remove archive table if exits after downgrade * removing archiving data * fixing static check * fixing static checks * simplying upgrade and downgrade as per review * fixing failures * removing setting conf to null * refactor approach to migrate values in conf * update offline warning * resolving conflicts * resolving conflicts * resolving conflicts * updating batch size * updaing conf type --------- Co-authored-by: Jed Cunningham <[email protected]>
In [PR](apache#44166) we added migration for removing pickled data from `xcom` table. During my testing I noticed with `SQLite` [insert](https://github.com/apache/airflow/blob/main/airflow/migrations/versions/0049_3_0_0_remove_pickled_data_from_xcom_table.py#L88) statement is not working in case of upgrade. Changing condition to `hex(substr(value, 1, 1)) = '80'` works. Tested [here](apache#44533 (comment)). related: apache#44166
…4533) * remove pickled data from dag run table * fix downgrade + add news fragement * remove archive table if exits after downgrade * removing archiving data * fixing static check * fixing static checks * simplying upgrade and downgrade as per review * fixing failures * removing setting conf to null * refactor approach to migrate values in conf * update offline warning * resolving conflicts * resolving conflicts * resolving conflicts * updating batch size * updaing conf type --------- Co-authored-by: Jed Cunningham <[email protected]>
In [PR](apache/airflow#44166) we added migration for removing pickled data from `xcom` table. During my testing I noticed with `SQLite` [insert](https://github.com/apache/airflow/blob/main/airflow/migrations/versions/0049_3_0_0_remove_pickled_data_from_xcom_table.py#L88) statement is not working in case of upgrade. Changing condition to `hex(substr(value, 1, 1)) = '80'` works. Tested [here](apache/airflow#44533 (comment)). related: apache/airflow#44166 GitOrigin-RevId: 40821bfd5c54f3a39b3ff6e8352a4e3a20323e24
In [PR](apache/airflow#44166) we added migration for removing pickled data from `xcom` table. During my testing I noticed with `SQLite` [insert](https://github.com/apache/airflow/blob/main/airflow/migrations/versions/0049_3_0_0_remove_pickled_data_from_xcom_table.py#L88) statement is not working in case of upgrade. Changing condition to `hex(substr(value, 1, 1)) = '80'` works. Tested [here](apache/airflow#44533 (comment)). related: apache/airflow#44166 GitOrigin-RevId: 40821bfd5c54f3a39b3ff6e8352a4e3a20323e24
In [PR](apache/airflow#44166) we added migration for removing pickled data from `xcom` table. During my testing I noticed with `SQLite` [insert](https://github.com/apache/airflow/blob/main/airflow/migrations/versions/0049_3_0_0_remove_pickled_data_from_xcom_table.py#L88) statement is not working in case of upgrade. Changing condition to `hex(substr(value, 1, 1)) = '80'` works. Tested [here](apache/airflow#44533 (comment)). related: apache/airflow#44166 GitOrigin-RevId: 40821bfd5c54f3a39b3ff6e8352a4e3a20323e24
In [PR](apache/airflow#44166) we added migration for removing pickled data from `xcom` table. During my testing I noticed with `SQLite` [insert](https://github.com/apache/airflow/blob/main/airflow/migrations/versions/0049_3_0_0_remove_pickled_data_from_xcom_table.py#L88) statement is not working in case of upgrade. Changing condition to `hex(substr(value, 1, 1)) = '80'` works. Tested [here](apache/airflow#44533 (comment)). related: apache/airflow#44166 GitOrigin-RevId: 40821bfd5c54f3a39b3ff6e8352a4e3a20323e24


closes: #43933
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.