Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,15 @@ jobs:
- name: Make binary executable
run: chmod +x ./target/debug/rustfs
Comment on lines 243 to 245

# Same as e2e-s3tests.yml: provision awscurl (admin API SigV4) and tox before run.sh.
# Minimal images may ship python3 without pip (No module named pip).
- name: Install Python tools
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip
python3 -m pip install --user --upgrade pip awscurl tox
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: Run implemented s3-tests
run: |
DEPLOY_MODE=binary \
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e-s3tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:

- name: Install Python tools
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip
python3 -m pip install --user --upgrade pip awscurl tox
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

Expand Down Expand Up @@ -240,6 +242,8 @@ jobs:

- name: Install Python tools
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip
python3 -m pip install --user --upgrade pip awscurl tox
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

Expand Down
26 changes: 26 additions & 0 deletions scripts/s3-tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,32 @@ install_python_package() {
local package=$1
local error_output

# Debian/Ubuntu minimal images often have python3 but no pip (No module named pip).
if ! python3 -m pip --version >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
Comment on lines +726 to +728

Copilot AI Apr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The python3 -m pip --version check will also fail when python3 itself is missing, but the warning/error messages assume Python is present (“python3 has no pip”). Consider checking command -v python3 first (or distinguish exit codes) so the log guidance is accurate (e.g., install python3 vs install python3-pip).

Suggested change
# Debian/Ubuntu minimal images often have python3 but no pip (No module named pip).
if ! python3 -m pip --version >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
# Distinguish between missing python3 and missing pip so remediation is accurate.
if ! command -v python3 >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
log_warn "python3 is missing; installing python3 and python3-pip via apt..."
if [ "$(id -u)" -eq 0 ]; then
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip || {
log_error "Failed to install python3 and python3-pip via apt-get"
return 1
}
elif command -v sudo >/dev/null 2>&1; then
sudo apt-get update -qq
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip || {
log_error "Failed to install python3 and python3-pip via apt-get"
return 1
}
else
log_error "python3 is missing. Install python3 and python3-pip, then retry."
return 1
fi
else
log_error "python3 is missing. Install python3 and pip (e.g. python3-pip on Debian/Ubuntu), then retry."
return 1
fi
elif ! python3 -m pip --version >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then

Copilot uses AI. Check for mistakes.
log_warn "python3 has no pip; installing python3-pip via apt..."
if [ "$(id -u)" -eq 0 ]; then
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip || {
log_error "Failed to install python3-pip via apt-get"
return 1
}
elif command -v sudo >/dev/null 2>&1; then
sudo apt-get update -qq
Comment on lines +731 to +737

Copilot AI Apr 9, 2026

Copy link

Choose a reason for hiding this comment

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

apt-get update -qq is executed under set -e, so if it fails the whole script will exit without emitting a log_error, which makes failures harder to diagnose. Consider wrapping apt-get update with an explicit || { log_error ...; return 1; } (or similar) so update failures produce a clear message like the install failure path does.

Suggested change
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip || {
log_error "Failed to install python3-pip via apt-get"
return 1
}
elif command -v sudo >/dev/null 2>&1; then
sudo apt-get update -qq
apt-get update -qq || {
log_error "Failed to update apt package index"
return 1
}
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip || {
log_error "Failed to install python3-pip via apt-get"
return 1
}
elif command -v sudo >/dev/null 2>&1; then
sudo apt-get update -qq || {
log_error "Failed to update apt package index"
return 1
}

Copilot uses AI. Check for mistakes.
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip || {
log_error "Failed to install python3-pip via apt-get"
return 1
}
else
log_error "python3 has no pip. Install python3-pip (or ensure pip) and retry."
return 1
fi
else
log_error "python3 has no pip. Install pip (e.g. python3-pip on Debian/Ubuntu) and retry."
return 1
fi
fi

# Try --user first (works on most Linux systems)
error_output=$(python3 -m pip install --user --upgrade pip "${package}" 2>&1)
if [ $? -eq 0 ]; then
Expand Down
Loading