zalando / spilo

Highly available elephant herd: HA PostgreSQL cluster using Docker
Apache License 2.0
1.52k stars 374 forks source link

Update /usr/bin/env to python3 (python not found). #930

Closed rocket357 closed 5 months ago

rocket357 commented 10 months ago

A few of the python scripts in postgres-appliance and spilo_cmd contain "#!/usr/bin/env python" and a few contain "#!/usr/bin/env python3". I noticed cloning (via /scripts/clone_with_wale.py) fails silently, so investigating further showed "/usr/bin/env: ‘python’: No such file or directory" when run with appropriate envdir.

I suspect these should be updated to explicitly select python3, and quick testing shows that resolves the issue (scripts provide usage information instead of the above "No such file or directory" error).

rocket357 commented 10 months ago

This appears to be a non-issue for automated runs (the clone issue I was hitting was unrelated, and only while manually running the clone_with_wale.py script does the above issue hit) because the scripts themselves are called with python3 (via configure_spilo.py, which is correctly using python3).

It may make sense to merge this if testing the scripts (i.e. clone_with_wale.py) manually is expected, but I suspect that isn't the case?

I'll leave that up to you guys to decide the relevance of this PR.