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

s2i steps: cannot check logs when s2i build fails #72

Closed
jmtd opened this issue Nov 28, 2024 · 0 comments · Fixed by #73
Closed

s2i steps: cannot check logs when s2i build fails #72

jmtd opened this issue Nov 28, 2024 · 0 comments · Fixed by #73

Comments

@jmtd
Copy link
Collaborator

jmtd commented Nov 28, 2024

s2i builds all take place via the helper routine s2i_inner

def s2i_inner(context, application, path='.', env="", incremental=False, tag="master", runtime_image=""):
which calls the s2i binary via the helper routine _execute
def _execute(command, log_output=True):
_execute returns False if the command fails, otherwise it (sometimes) returns the command's output. s2i_inner saves the command output returned by _execute if the command succeeds, but not if it fails (since it hasn't been returned).

We provide a test step to check for a failing s2i build:

@given(u'failing s2i build {application} from {path} using {tag}')

We also provide steps to inspect the logs, e.g.,
@then(u's2i build log should contain {phrase}')

However, none of these follow-on steps can be used in conjunction with the failing s2i build case, because the build logs are not saved.

I think we should capture and save the build logs in either the success or failure case. It looks like the only caller of _execute is s2i_inner, luckily.

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