@@ -383,12 +383,41 @@ set -euo pipefail
383383common::get_colors
384384declare -a packages
385385
386- readonly MYSQL_LTS_VERSION="8.0"
387386readonly MARIADB_LTS_VERSION="10.11"
388387
389388: "${INSTALL_MYSQL_CLIENT:?Should be true or false}"
390389: "${INSTALL_MYSQL_CLIENT_TYPE:-mariadb}"
391390
391+ if [[ "${INSTALL_MYSQL_CLIENT}" != "true" && "${INSTALL_MYSQL_CLIENT}" != "false" ]]; then
392+ echo
393+ echo "${COLOR_RED}INSTALL_MYSQL_CLIENT must be either true or false${COLOR_RESET}"
394+ echo
395+ exit 1
396+ fi
397+
398+ if [[ "${INSTALL_MYSQL_CLIENT_TYPE}" != "mysql" && "${INSTALL_MYSQL_CLIENT_TYPE}" != "mariadb" ]]; then
399+ echo
400+ echo "${COLOR_RED}INSTALL_MYSQL_CLIENT_TYPE must be either mysql or mariadb${COLOR_RESET}"
401+ echo
402+ exit 1
403+ fi
404+
405+ if [[ "${INSTALL_MYSQL_CLIENT_TYPE}" == "mysql" ]]; then
406+ echo
407+ echo "${COLOR_RED}The 'mysql' client type is not supported any more. Use 'mariadb' instead.${COLOR_RESET}"
408+ echo
409+ echo "The MySQL drivers are wrongly packaged and released by Oracle with an expiration date on their GPG keys,"
410+ echo "which causes builds to fail after the expiration date. MariaDB client is protocol-compatible with MySQL client."
411+ echo ""
412+ echo "Every two years the MySQL packages fail and Oracle team is always surprised and struggling"
413+ echo "with fixes and re-signing the packages which lasts few days"
414+ echo "See https://bugs.mysql.com/bug.php?id=113432 for more details."
415+ echo "As a community we are not able to support this broken packaging practice from Oracle"
416+ echo "Feel free however to install MySQL drivers on your own as extension of the image."
417+ echo
418+ exit 1
419+ fi
420+
392421retry() {
393422 local retries=3
394423 local count=0
@@ -407,44 +436,6 @@ retry() {
407436 done
408437}
409438
410- install_mysql_client() {
411- if [[ "${1}" == "dev" ]]; then
412- packages=("libmysqlclient-dev" "mysql-client")
413- elif [[ "${1}" == "prod" ]]; then
414- # `libmysqlclientXX` where XX is number, and it should be increased every new GA MySQL release, for example
415- # 18 - MySQL 5.6.48
416- # 20 - MySQL 5.7.42
417- # 21 - MySQL 8.0.34
418- # 22 - MySQL 8.1
419- packages=("libmysqlclient21" "mysql-client")
420- else
421- echo
422- echo "${COLOR_RED}Specify either prod or dev${COLOR_RESET}"
423- echo
424- exit 1
425- fi
426-
427- common::import_trusted_gpg "B7B3B788A8D3785C" "mysql"
428-
429- echo
430- echo "${COLOR_BLUE}Installing Oracle MySQL client version ${MYSQL_LTS_VERSION}: ${1}${COLOR_RESET}"
431- echo
432-
433- echo "deb http://repo.mysql.com/apt/debian/ $(lsb_release -cs) mysql-${MYSQL_LTS_VERSION}" > \
434- /etc/apt/sources.list.d/mysql.list
435- retry apt-get update
436- retry apt-get install --no-install-recommends -y "${packages[@]}"
437- apt-get autoremove -yqq --purge
438- apt-get clean && rm -rf /var/lib/apt/lists/*
439-
440- # Remove mysql repository from sources.list.d as MySQL repos have a basic flaw that they put expiry
441- # date on their GPG signing keys and they sign their repo with those keys. This means that after a
442- # certain date, the GPG key becomes invalid and if you have the repository added in your sources.list
443- # then you will not be able to install anything from any other repository. This id unlike any other
444- # repository we have seen (for example Postgres, MariaDB, MsSQL - all have non-expiring signing keys)
445- rm /etc/apt/sources.list.d/mysql.list
446- }
447-
448439install_mariadb_client() {
449440 # List of compatible package Oracle MySQL -> MariaDB:
450441 # `mysql-client` -> `mariadb-client` or `mariadb-client-compat` (11+)
@@ -484,23 +475,7 @@ install_mariadb_client() {
484475}
485476
486477if [[ ${INSTALL_MYSQL_CLIENT:="true"} == "true" ]]; then
487- if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; then
488- INSTALL_MYSQL_CLIENT_TYPE="mariadb"
489- echo
490- echo "${COLOR_YELLOW}Client forced to mariadb for ARM${COLOR_RESET}"
491- echo
492- fi
493-
494- if [[ "${INSTALL_MYSQL_CLIENT_TYPE}" == "mysql" ]]; then
495- install_mysql_client "${@}"
496- elif [[ "${INSTALL_MYSQL_CLIENT_TYPE}" == "mariadb" ]]; then
497- install_mariadb_client "${@}"
498- else
499- echo
500- echo "${COLOR_RED}Specify either mysql or mariadb, got ${INSTALL_MYSQL_CLIENT_TYPE}${COLOR_RESET}"
501- echo
502- exit 1
503- fi
478+ install_mariadb_client "${@}"
504479fi
505480EOF
506481
@@ -870,6 +845,8 @@ function install_from_sources() {
870845 --editable ./airflow-core --editable ./task-sdk --editable ./airflow-ctl \
871846 --editable ./kubernetes-tests --editable ./docker-tests --editable ./helm-tests \
872847 --editable ./task-sdk-tests \
848+ --editable ./airflow-ctl-tests \
849+ --editable ./airflow-e2e-tests \
873850 --editable ./devel-common[all] --editable ./dev \
874851 --group dev --group docs --group docs-gen --group leveldb"
875852 local -a projects_with_devel_dependencies
@@ -1207,6 +1184,27 @@ function environment_initialization() {
12071184 ssh-keyscan -H localhost >> ~/.ssh/known_hosts 2>/dev/null
12081185 fi
12091186
1187+ if [[ ${INTEGRATION_LOCALSTACK:-"false"} == "true" ]]; then
1188+ echo
1189+ echo "${COLOR_BLUE}Configuring LocalStack integration${COLOR_RESET}"
1190+ echo
1191+
1192+ # Define LocalStack AWS configuration
1193+ declare -A localstack_config=(
1194+ ["AWS_ENDPOINT_URL"]="http://localstack:4566"
1195+ ["AWS_ACCESS_KEY_ID"]="test"
1196+ ["AWS_SECRET_ACCESS_KEY"]="test"
1197+ ["AWS_DEFAULT_REGION"]="us-east-1"
1198+ )
1199+
1200+ # Export each configuration variable and log it
1201+ for key in "${!localstack_config[@]}"; do
1202+ export "$key"="${localstack_config[$key]}"
1203+ echo " * ${COLOR_BLUE}${key}:${COLOR_RESET} ${localstack_config[$key]}"
1204+ done
1205+ echo
1206+ fi
1207+
12101208 cd "${AIRFLOW_SOURCES}"
12111209
12121210 # Temporarily add /opt/airflow/providers/standard/tests to PYTHONPATH in order to see example dags
@@ -1653,10 +1651,10 @@ COPY --from=scripts common.sh install_packaging_tools.sh install_additional_depe
16531651# You can swap comments between those two args to test pip from the main version
16541652# When you attempt to test if the version of `pip` from specified branch works for our builds
16551653# Also use `force pip` label on your PR to swap all places we use `uv` to `pip`
1656- ARG AIRFLOW_PIP_VERSION=25.2
1654+ ARG AIRFLOW_PIP_VERSION=25.3
16571655# ARG AIRFLOW_PIP_VERSION="git+https://github.com/pypa/pip.git@main"
1658- ARG AIRFLOW_UV_VERSION=0.9.4
1659- ARG AIRFLOW_PREK_VERSION="0.2.10 "
1656+ ARG AIRFLOW_UV_VERSION=0.9.7
1657+ ARG AIRFLOW_PREK_VERSION="0.2.12 "
16601658
16611659# UV_LINK_MODE=copy is needed since we are using cache mounted from the host
16621660ENV AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION} \
@@ -1670,7 +1668,7 @@ ENV PATH="/usr/python/bin:/root/.local/bin:/root/.cargo/bin:${PATH}"
16701668# an incorrect architecture.
16711669ARG TARGETARCH
16721670# Value to be able to easily change cache id and therefore use a bare new cache
1673- ARG DEPENDENCY_CACHE_EPOCH="1 "
1671+ ARG DEPENDENCY_CACHE_EPOCH="2 "
16741672
16751673# Install useful command line tools in their own virtualenv so that they do not clash with
16761674# dependencies installed in Airflow also reinstall PIP and UV to make sure they are installed
0 commit comments