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

omnibus: fail the task when omnibus can't be installed #27730

Merged
merged 7 commits into from
Jul 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tasks/omnibus.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,17 @@ def bundle_install_omnibus(ctx, gem_path=None, env=None, max_try=2):

with gitlab_section("Bundle install omnibus", collapsed=True):
for trial in range(max_try):
# The exception being raised when ommiting `warn=True` only includes
# the last 10 lines of stdout/stderr which might not be enough
# for should_retry_bundle_install to do its job
chouquette marked this conversation as resolved.
Show resolved Hide resolved
res = ctx.run(cmd, env=env, warn=True, err_stream=sys.stdout)
if res.ok:
return
if not should_retry_bundle_install(res):
return
print(
f'Fatal error while installing omnibus: stdout: {res.stdout}\nstderr: {res.stderr}\nCannot continue.'
chouquette marked this conversation as resolved.
Show resolved Hide resolved
)
raise Exit(code=2)
print(f"Retrying bundle install, attempt {trial + 1}/{max_try}")


Expand Down
Loading