You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Taragolis (via GitHub)" <gi...@apache.org> on 2023/10/20 00:39:55 UTC

[PR] Allow install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Taragolis opened a new pull request, #35070:
URL: https://github.com/apache/airflow/pull/35070

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   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 an 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 option to install MariaDB client libraries on x86_64 on customising Airflow image instead of MySQL
   
   closes: #32708
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ 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 changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+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 a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on PR #35070:
URL: https://github.com/apache/airflow/pull/35070#issuecomment-1773038731

   Since it experimental feature, I guess it could be included into the 2.7.3, am I right?


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on PR #35070:
URL: https://github.com/apache/airflow/pull/35070#issuecomment-1772728508

   Should I also add information into the https://airflow.apache.org/docs/docker-stack/changelog.html ?


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #35070:
URL: https://github.com/apache/airflow/pull/35070#issuecomment-1774869553

   > In `docs/docker-stack/build-arg-ref.rst`, `docs/docker-stack/changelog.rst` or in both?
   
   both I think


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #35070:
URL: https://github.com/apache/airflow/pull/35070#issuecomment-1772825532

   > Should I also add information into the https://airflow.apache.org/docs/docker-stack/changelog.html ?
   
   yes. This is also where we explain it's experimental.


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on code in PR #35070:
URL: https://github.com/apache/airflow/pull/35070#discussion_r1366804813


##########
Dockerfile:
##########
@@ -195,6 +195,7 @@ COLOR_RESET=$'\e[0m'
 readonly COLOR_RESET
 
 : "${INSTALL_MYSQL_CLIENT:?Should be true or false}"
+: "${MYSQL_CLIENT_TYPE:-mysql}"

Review Comment:
   I'm not sure about name of env/arg maybe it is better to rename it to `INSTALL_MYSQL_CLIENT_TYPE`



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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on PR #35070:
URL: https://github.com/apache/airflow/pull/35070#issuecomment-1772500768

   Test it locally by simple build on x86_64
   
   ```shell
   ❯ export DOCKER_BUILDKIT=1
   
   ❯ docker build . \
       --build-arg DOCKER_CONTEXT_FILES=./docker-context-files \
       --build-arg INSTALL_MYSQL_CLIENT="true" \
       --build-arg MYSQL_CLIENT_TYPE=mariadb \
       --build-arg INSTALL_MSSQL_CLIENT="false" \
       --build-arg INSTALL_POSTGRES_CLIENT="true" \
       --tag "airflow-image:main-custom-oct-20"
   ```
   
   
   ```console
   default@3ebfb18b6879:/opt/airflow$ airflow info 
   
   ...
   
   Tools info
   git             | NOT AVAILABLE                                                                                         
   ssh             | OpenSSH_8.4p1 Debian-5+deb11u2, OpenSSL 1.1.1w  11 Sep 2023                                           
   kubectl         | NOT AVAILABLE                                                                                         
   gcloud          | NOT AVAILABLE                                                                                         
   cloud_sql_proxy | NOT AVAILABLE                                                                                         
   mysql           | mysql  Ver 15.1 Distrib 10.11.5-MariaDB, for debian-linux-gnu (x86_64) using readline EditLine wrapper
   sqlite3         | 3.34.1 2021-01-20 14:10:07 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ealt1           
   psql            | psql (PostgreSQL) 16.0 (Debian 16.0-1.pgdg110+1) 
   ```


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #35070:
URL: https://github.com/apache/airflow/pull/35070#issuecomment-1774796806

   small NIT: we shoudl be mentioning experimental status.


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #35070:
URL: https://github.com/apache/airflow/pull/35070#discussion_r1366829817


##########
Dockerfile:
##########
@@ -195,6 +195,7 @@ COLOR_RESET=$'\e[0m'
 readonly COLOR_RESET
 
 : "${INSTALL_MYSQL_CLIENT:?Should be true or false}"
+: "${MYSQL_CLIENT_TYPE:-mysql}"

Review Comment:
   Yes. It's better to keep consistent prefix.



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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #35070:
URL: https://github.com/apache/airflow/pull/35070


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on PR #35070:
URL: https://github.com/apache/airflow/pull/35070#issuecomment-1774816448

   In `docs/docker-stack/build-arg-ref.rst`, `docs/docker-stack/changelog.rst` or in both?


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


Re: [PR] Allow to install MariaDB client libraries instead of MySQL on x86_64 [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #35070:
URL: https://github.com/apache/airflow/pull/35070#issuecomment-1773108275

   > Since it experimental feature, I guess it could be included into the 2.7.3, am I right?
   
   Generally SemVer limitations apply to Airflow, not the image, so yes. We do not "SemVer" images, the features of those images (as convenience packages) are very independent from Airflow. I was considering versioning the images, or Dockerfiles but it would be very confusing so we have no "Semver" promises for the image and it means - yes we can add new things any time.


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