vignesh1507 opened a new pull request, #37015: URL: https://github.com/apache/superset/pull/37015
This patch hardens scripts/check-env.py and fixes several issues that could cause the script to crash or mis-report versions: What I changed Catch FileNotFoundError (in addition to CalledProcessError) in get_version and get_docker_platform so the script no longer crashes when a binary is missing; it reports "Not Installed" or "Not Detected" instead. Normalize version strings for commands that commonly prefix versions with "v" (node, docker-compose) using small post-processing functions so packaging.version.Version can parse them. Make the supported-range check respect both lower and upper bounds (previous code only checked the lower bound). Improve get_version to use the last token of the command output after applying any post-processing (safer extraction of the numeric version). Add a defensive post-process for docker --version to extract only the comma-separated part already present in the original code, and add a docker-compose post-processor to strip leading "v". Minor robustness: get_docker_platform now handles FileNotFoundError. Why? Prevents unhandled exceptions when commands are not installed on the host. Ensures versions like "v20.4.0" are parsed correctly, avoiding false "Invalid Version Format" results. Ensures versions outside the supported upper bound are correctly marked as unsupported. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
