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

hack/boilerplate.sh does not work on systems without python2 yet returns success #2586

Closed
andreasf opened this issue Jun 19, 2023 · 0 comments · Fixed by #2587
Closed

hack/boilerplate.sh does not work on systems without python2 yet returns success #2586

andreasf opened this issue Jun 19, 2023 · 0 comments · Fixed by #2587

Comments

@andreasf
Copy link
Contributor

Actual behavior

hack/boilerplate.sh relies on python2, which is no longer included in modern distributions. When running the shell script, the call to python fails but the script returns a zero exit code.

user@debian:~/go/src/github.com/andreasf/kaniko$ make test
...
RUN /home/user/go/src/github.com/andreasf/kaniko/scripts/../hack/boilerplate.sh
/home/user/go/src/github.com/andreasf/kaniko/scripts/../hack/boilerplate.sh: line 22: python: command not found
PASSED /home/user/go/src/github.com/andreasf/kaniko/scripts/../hack/boilerplate.sh

user@debian:~/go/src/github.com/andreasf/kaniko$ ./hack/boilerplate.sh; echo $?
./hack/boilerplate.sh: line 22: python: command not found
0

Expected behavior
The script should return a non-zero exit code if calling python fails.

The script should call python3, because python2 will soon be removed from Github Actions Ubuntu images used in CI: actions/runner-images#7402

To Reproduce
Steps to reproduce the behavior:

  1. Checkout repository on a system without python2 (e.g. Debian 12)
  2. Run ./hack/boilerplate.sh, observe error message and exit code
  3. Run make test, observe that it passes despite the error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant