Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bootstrap.sh): bump the mariadb version from 11.1 to 11.2 #12

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docker/script/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ sudo mkdir mariadb_rpm
sudo chown airflow /mariadb_rpm

if [[ $(uname -p) == "aarch64" ]]; then
wget https://mirror.mariadb.org/yum/11.1/fedora38-aarch64/rpms/MariaDB-common-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.1/fedora38-aarch64/rpms/MariaDB-shared-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.1/fedora38-aarch64/rpms/MariaDB-devel-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.2/fedora38-aarch64/rpms/MariaDB-common-11.2.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.2/fedora38-aarch64/rpms/MariaDB-shared-11.2.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.2/fedora38-aarch64/rpms/MariaDB-devel-11.2.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
else
wget https://mirror.mariadb.org/yum/11.1/fedora38-amd64/rpms/MariaDB-common-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.1/fedora38-amd64/rpms/MariaDB-shared-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.1/fedora38-amd64/rpms/MariaDB-devel-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.2/fedora38-amd64/rpms/MariaDB-common-11.2.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.2/fedora38-amd64/rpms/MariaDB-shared-11.2.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.2/fedora38-amd64/rpms/MariaDB-devel-11.2.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
Comment on lines +56 to +62
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Consider upgrading to MariaDB 11.6.1 for better long-term maintenance

The verification shows that version 11.2.2 packages are being redirected (302 Found), while 11.6.1 is the latest available version in both architectures with direct downloads. For better maintainability, consider updating to version 11.6.1:

  • Replace 11.2.2 with 11.6.1 in the package URLs
  • Both aarch64 and amd64 architectures have consistent package availability
  • Version 11.7 directory exists but doesn't contain the required packages yet

Example update for aarch64:

https://mirror.mariadb.org/yum/11.6/fedora38-aarch64/rpms/MariaDB-common-11.6.1-1.fc38.$(uname -p).rpm
🔗 Analysis chain

Verify MariaDB version selection and availability

The PR mentions version 11.7 as a potential alternative. Let's verify the availability and stability of different versions.

While version 11.2.2 resolves the immediate 404 error, we should confirm if using the latest stable version (11.7) would be more beneficial for long-term maintenance.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check available MariaDB versions and their availability on the mirror
# Test both architectures to ensure consistent availability

echo "Checking aarch64 versions..."
curl -sI "https://mirror.mariadb.org/yum/11.2/fedora38-aarch64/rpms/" | grep "HTTP/"
curl -sI "https://mirror.mariadb.org/yum/11.7/fedora38-aarch64/rpms/" | grep "HTTP/"

echo "Checking amd64 versions..."
curl -sI "https://mirror.mariadb.org/yum/11.2/fedora38-amd64/rpms/" | grep "HTTP/"
curl -sI "https://mirror.mariadb.org/yum/11.7/fedora38-amd64/rpms/" | grep "HTTP/"

# Check if these are the latest stable versions
curl -s "https://downloads.mariadb.org/rest-api/mariadb/" | jq -r '.[] | select(.release_status=="stable") | .release_id'

Length of output: 721


Script:

#!/bin/bash
# Let's check the actual package availability and versions for both architectures
echo "Checking aarch64 packages..."
curl -s "https://mirror.mariadb.org/yum/11.7/fedora38-aarch64/rpms/" | grep -o 'MariaDB-\(common\|shared\|devel\)-[0-9.]\+-[0-9]\.fc38\.aarch64\.rpm' || true

echo -e "\nChecking amd64 packages..."
curl -s "https://mirror.mariadb.org/yum/11.7/fedora38-amd64/rpms/" | grep -o 'MariaDB-\(common\|shared\|devel\)-[0-9.]\+-[0-9]\.fc38\.x86_64\.rpm' || true

# Let's also check if the current 11.2.2 packages are still available
echo -e "\nVerifying current 11.2.2 packages..."
for arch in "aarch64" "amd64"; do
  for pkg in "common" "shared" "devel"; do
    curl -sI "https://mirror.mariadb.org/yum/11.2/fedora38-${arch}/rpms/MariaDB-${pkg}-11.2.2-1.fc38.$([ "$arch" = "amd64" ] && echo "x86_64" || echo "aarch64").rpm" | grep "HTTP/"
  done
done

Length of output: 3360

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 56-56: Quote this to prevent word splitting.

(SC2046)


[warning] 57-57: Quote this to prevent word splitting.

(SC2046)


[warning] 58-58: Quote this to prevent word splitting.

(SC2046)


[warning] 60-60: Quote this to prevent word splitting.

(SC2046)


[warning] 61-61: Quote this to prevent word splitting.

(SC2046)


[warning] 62-62: Quote this to prevent word splitting.

(SC2046)

fi

# install mariadb_devel and its dependencies
Expand Down