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

Bash scripts fail but GH Actions continue #1030

Closed
kimwnasptd opened this issue Aug 21, 2024 · 2 comments
Closed

Bash scripts fail but GH Actions continue #1030

kimwnasptd opened this issue Aug 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kimwnasptd
Copy link
Contributor

Bug Description

Observed it firstly in the following code

IMAGES=$(./kubeflow-ci/scripts/images/get-all-images.sh ${{ matrix.bundle }}/bundle.yaml ${RELEASE}-${RISK})

In the above case the script there failed, because of some misconfiguration, but the GH Job step didn't fail at all. The above is a bug since we can't accurately understand what went wrong and need to further look at all steps to find the one that failed.

To Reproduce

Try and call a bash script, that doesn't set -xe, and one of its sub-commands fail. In this case the overall bash script will just continue.

Environment

Any GH action

Relevant Log Output

.

Additional Context

To avoid this, we should:

  1. Use python everywhere possible instead of bash scripts
  2. Set set -xe in the bash scripts, to ensure they exit on failure
@kimwnasptd kimwnasptd added the bug Something isn't working label Aug 21, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-6139.

This message was autogenerated

@kimwnasptd
Copy link
Contributor Author

After merging canonical/kubeflow-ci#142 the scanning actions are indeed erroring out in the correct step
https://github.com/canonical/bundle-kubeflow/actions/runs/10523106840/job/29157141080

> Get images
...
++ bash ./tools/get-images.sh
Error: open ./net-istio.yaml: no such file or directory
rm: cannot remove 'net-istio.yaml': No such file or directory

Will go on and close this issue and scope it for the scanning scripts, but the same should apply for all bash scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant