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

fedora-bot: Continue after failure #55

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

elkoniu
Copy link
Contributor

@elkoniu elkoniu commented Sep 10, 2024

Fedora Bot can handle more than one component to be processed. The components are processed one by one in the loop. When processing of component fails it breaks the loop. This commit fixes this adding exception for such case and continuing with the next component.

fedora_bot.py Outdated
Comment on lines 339 to 340
except:
print(f"Failure in processing component [{component}] - skipping")
Copy link
Member

Choose a reason for hiding this comment

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

Is there a specific exception that we could be catching? In addition, I think that it would be good to actually print the exception message, potentially with the traceback as part of the message. Otherwise we are loosing potentially useful information, which would make debugging harder.

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 have updated the code, hope it looks better now :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My proposition would be to evaluate this code next time it will fail and start adding detected exceptions one by one (and eventually handle them specified ways).

Fedora Bot can handle more than one component to be processed.
The components are processed one by one in the loop. When processing of
component fails it breaks the loop. This commit fixes this adding
exception for such case and continuing with the next component.
Copy link

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

Fwiw, this looks fine to me

@thozza thozza merged commit 1133320 into osbuild:main Sep 10, 2024
1 check passed
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.

3 participants