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/01/05 19:38:34 UTC

[GitHub] [airflow] potiuk opened a new pull request #13496: Check for minimum version of Sqlite

potiuk opened a new pull request #13496:
URL: https://github.com/apache/airflow/pull/13496


   Some users testing Airlfow 2.0 with sqlite noticed that for
   old versions of sqlite, Airflow does not run tasks and fails with
   'sqlite3.OperationalError: near ",": syntax error' when running
   tasks. More details about it in #13397.
   
   Bisecting had shown that minimum supported version of sqlite is
   3.15.0, therefore this PR adds checking if sqlite version is
   higher than that and fails hard if it is not.
   
   Documentation has been updated with minimum requirements, some
   inconsisttencies have been removed, also the minimum requirements
   for stable 2.0 version were moved to installation.rst because
   the requirements were never explicitely stated in the user-facing
   documentation.
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   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).
   


----------------------------------------------------------------
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 merged pull request #13496: Check for minimum version of Sqlite

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


   


----------------------------------------------------------------
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 commented on a change in pull request #13496: Check for minimum version of Sqlite

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



##########
File path: airflow/configuration.py
##########
@@ -230,10 +231,15 @@ def _validate_config_dependencies(self):
             'SequentialExecutor',
         )
         is_sqlite = "sqlite" in self.get('core', 'sql_alchemy_conn')
-        if is_executor_without_sqlite_support and is_sqlite:
-            raise AirflowConfigException(
-                "error: cannot use sqlite with the {}".format(self.get('core', 'executor'))
-            )
+        if is_sqlite and is_executor_without_sqlite_support:
+            raise AirflowConfigException(f"error: cannot use sqlite with the {self.get('core', 'executor')}")
+        if is_sqlite:
+            import sqlite3
+
+            # Some of the features in storing rendered fields require sqlite version >= 3.15.0
+            min_sqlite_version = '3.15.0'

Review comment:
       nvm -- saw it in the PR description and https://github.com/apache/airflow/issues/13397




----------------------------------------------------------------
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 commented on a change in pull request #13496: Check for minimum version of Sqlite

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



##########
File path: airflow/configuration.py
##########
@@ -230,10 +231,15 @@ def _validate_config_dependencies(self):
             'SequentialExecutor',
         )
         is_sqlite = "sqlite" in self.get('core', 'sql_alchemy_conn')
-        if is_executor_without_sqlite_support and is_sqlite:
-            raise AirflowConfigException(
-                "error: cannot use sqlite with the {}".format(self.get('core', 'executor'))
-            )
+        if is_sqlite and is_executor_without_sqlite_support:
+            raise AirflowConfigException(f"error: cannot use sqlite with the {self.get('core', 'executor')}")
+        if is_sqlite:
+            import sqlite3
+
+            # Some of the features in storing rendered fields require sqlite version >= 3.15.0
+            min_sqlite_version = '3.15.0'

Review comment:
       hmmm Curious, what's the error with <3.15?




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