-
Notifications
You must be signed in to change notification settings - Fork 196
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
Update bodhi-push to only resume failed composes #2670
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you amend your commit message to sign the Developer Certificate of Origin as described here?
', '.join([str(c) for c in session.query(Compose).all()])), abort=True) | ||
if not resume and session.query(Compose).filter(Compose.state == ComposeState.failed).count(): | ||
click.confirm('Failed composes detected: {}. Do you wish to resume them all?'.format( | ||
', '.join([str(c) for c in session.query(Compose).filter(Compose.state == ComposeState.failed).all()])), abort=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably make the query match non-failed composes instead of detecting failed ones. We could then print a warning and exit, something like "WARNING: running composes detected, refusing to resume as that is a dangerous operation. If you are sure they are not really running, you can re-run with the --force flag." Of course, this would require a --force
flag to be added as well.
resume = True | ||
resume_all = True | ||
|
||
# If we're resuming a push | ||
if resume: | ||
for compose in session.query(Compose).all(): | ||
for compose in session.query(Compose).filter(Compose.state == ComposeState.failed).all(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add a --force
flag, we would want to respect that here as well.
Hey @ryanlerch! Do you still want to work on this? |
Closing due to inactivity. |
This updates bodhi-push so it only resumes failed composes. This, however does not allow the user to restart other composes that might be failed.
Any ideas on how to re-structure this to allow both use-cases?
Fixes #2579