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/07/14 22:52:55 UTC

[GitHub] [airflow] mik-laj opened a new pull request #17011: Drop support for Airflow 1.10 in entrypoint_prod.sh and improve MSSQL compatibility

mik-laj opened a new pull request #17011:
URL: https://github.com/apache/airflow/pull/17011


   The 1.10 series reached end of life, so the Dockerfile on main can drop support it.
   
   Additionally, this solves one problem that the user reported. We used CLI check for Airflow 1.10 to check the database connection, and for Airflow 2.0 legacy check, which only supports some database engines.  However, we should do it the other way around. For Airflow 2.0, we should use a CLI check. 
   
   If we use CLI Check, we have MSSQL and any other backend support automatically.
   
   For details, see: https://github.com/apache/airflow/pull/16857
   <!--
   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/main/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/main/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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #17011: Drop support for Airflow 1.10 in entrypoint_prod.sh and improve MSSQL compatibility

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #17011:
URL: https://github.com/apache/airflow/pull/17011#issuecomment-880261527


   CC: @aneesh-joseph  


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



[GitHub] [airflow] potiuk commented on pull request #17011: Drop support for Airflow 1.10 in entrypoint_prod.sh and improve MSSQL compatibility

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #17011:
URL: https://github.com/apache/airflow/pull/17011#issuecomment-880410452


   Ah yeah! Let's rip 1.10 out completely :)


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



[GitHub] [airflow] kaxil commented on a change in pull request #17011: Drop support for Airflow 1.10 in entrypoint_prod.sh and improve MSSQL compatibility

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



##########
File path: scripts/in_container/prod/entrypoint_prod.sh
##########
@@ -193,30 +186,13 @@ function set_pythonpath_for_root_user() {
 }
 
 function wait_for_airflow_db() {
-    # Check if Airflow has a command to check the connection to the database.
-    if ! airflow db check --help >/dev/null 2>&1; then
-        run_check_with_retries "airflow db check"
-    else
-        # Verify connections to the Airflow DB by guessing the database address based on environment variables,
-        # then uses netcat to check that the host is reachable.
-        # This is only used by Airflow 1.10+ as there are no built-in commands to check the db connection.
-        local connection_url
-        if [[ -n "${AIRFLOW__CORE__SQL_ALCHEMY_CONN_CMD=}" ]]; then
-            connection_url="$(eval "${AIRFLOW__CORE__SQL_ALCHEMY_CONN_CMD}")"
-        else
-            # if no DB configured - use sqlite db by default
-            connection_url="${AIRFLOW__CORE__SQL_ALCHEMY_CONN:="sqlite:///${AIRFLOW_HOME}/airflow.db"}"
-        fi
-        # SQLite doesn't require a remote connection, so we don't have to wait.
-        if [[ ${connection_url} != sqlite* ]]; then
-            wait_for_connection "${connection_url}"
-        fi
-    fi
+    # Wait for the command to run successfully to validate the database connection.
+    run_check_with_retries "airflow db check"
 }
 
 function upgrade_db() {
     # Runs airflow db upgrade
-    airflow db upgrade || airflow upgradedb || true
+    airflow upgradedb || true

Review comment:
       ```suggestion
       airflow db upgrade || true
   ```




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



[GitHub] [airflow] github-actions[bot] commented on pull request #17011: Drop support for Airflow 1.10 in entrypoint_prod.sh and improve MSSQL compatibility

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #17011:
URL: https://github.com/apache/airflow/pull/17011#issuecomment-880409897


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


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



[GitHub] [airflow] potiuk merged pull request #17011: Drop support for Airflow 1.10 in entrypoint_prod.sh and improve MSSQL compatibility

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


   


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