Description
The rust-build-release action is failing when attempting to detect Podman availability on GitHub Actions runners. The podman info command consistently times out after 10 seconds, causing the entire workflow to fail.
Error Details
The failure occurs in .github/actions/rust-build-release/src/main.py at line 114:
podman_present = runtime_available("podman")
The runtime_available function in runtime.py executes podman info with a 10-second timeout, but the command hangs and eventually times out:
TimeoutExpired: Command '['/usr/bin/podman', 'info']' timed out after 9.999988809000115 seconds
Impact
- Workflow fails completely when Podman detection times out
- Docker detection works fine (
docker_present = True)
- This prevents the rust-build-release action from completing successfully
Suspected Root Cause
The issue appears to be environmental rather than code-related:
- Podman service issues: Podman may not be properly initialized on the GitHub Actions runner
- Permission problems: The runner may lack sufficient permissions to query Podman
- Configuration issues: Podman configuration might be incomplete or corrupted
- Race conditions: Podman setup might not be complete when the detection runs
Potential Solutions
Short-term fixes:
- Increase timeout: Extend the 10-second timeout to allow more time for Podman to respond
- Graceful degradation: Make Podman detection non-blocking and continue with Docker if Podman fails
- Add retry logic: Implement retry mechanism for the Podman detection
Long-term solutions:
- Skip Podman detection: If Podman isn't critical, consider removing the detection entirely
- Better error handling: Add more specific error handling for different failure modes
- Conditional detection: Only check for Podman if explicitly needed
Recommended Fix
Modify the runtime_available function to handle timeouts gracefully and not fail the entire workflow:
def runtime_available(name: str, cwd: Optional[str] = None) -> bool:
try:
path = which(name)
if path is None:
return False
result = run_validated(
exec_path,
["info"],
allowed_names=(name, f"{name}.exe"),
timeout=10,
cwd=cwd,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
return result.returncode == 0
except (UnexpectedExecutableError, subprocess.TimeoutExpired):
return False # Gracefully handle failures
Environment
- OS: Ubuntu (GitHub Actions runner)
- Podman: Available but unresponsive
- Docker: Working correctly
- Action: .github/actions/rust-build-release
Related
Description
The rust-build-release action is failing when attempting to detect Podman availability on GitHub Actions runners. The
podman infocommand consistently times out after 10 seconds, causing the entire workflow to fail.Error Details
The failure occurs in
.github/actions/rust-build-release/src/main.pyat line 114:The
runtime_availablefunction inruntime.pyexecutespodman infowith a 10-second timeout, but the command hangs and eventually times out:Impact
docker_present = True)Suspected Root Cause
The issue appears to be environmental rather than code-related:
Potential Solutions
Short-term fixes:
Long-term solutions:
Recommended Fix
Modify the
runtime_availablefunction to handle timeouts gracefully and not fail the entire workflow:Environment
Related