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

fix(prefetch): fail step when error happen #1756

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MartinBasti
Copy link
Contributor

Task were failing silently causing harder to debug errors or misleding users that different step failed. Ensure that steps aren't failing silently and we don't run unnecessary steps after failure.

Before you complete this pull request ...

Look for any open pull requests in the repository with the title "e2e-tests update" and
see if there are recent e2e-tests updates that will be applicable to your change.

Comment on lines 411 to +415
image: quay.io/redhat-appstudio/cachi2:0.15.0@sha256:b141cb5cf4d98e6c5f668f1fe172e1d68f2a44ac1027403fbcff94ce1e68185d
script: |
#!/bin/bash

set -euo pipefail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, I just saw the unregister-rhsm step at the end. This means the prefetch task will only unregister itself if it succeeds, otherwise it will leave a registration hanging around in the system.

But exiting on failure properly probably doesn't make that problem much worse than it already was

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

questionable is, how much of hanging are we talking about in ephemeral tasks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can rework it to hard way using an internal state

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by hard way I mean to trap errror, record it and skip all tasks except unregister

@chmeliik
Copy link
Contributor

/retest

Task were failing silently causing harder to debug errors or misleding
users that different step failed. Ensure that steps aren't failing
silently and we don't run unnecessary steps after failure.

Signed-off-by: Martin Basti <[email protected]>
@MartinBasti MartinBasti force-pushed the prefetch-fail-on-error branch from 0f4f1b3 to b86dc89 Compare December 18, 2024 09:15
@MartinBasti
Copy link
Contributor Author

e2e Fails at this

container step-unregister-rhsm: \ncp: cannot stat '/shared/rhsm/consumer/*': No such file or directory\n\

@MartinBasti MartinBasti marked this pull request as draft December 18, 2024 10:06
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 this pull request may close these issues.

2 participants