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

Update bodhi-push to only resume failed composes #2670

Closed
wants to merge 1 commit into from
Closed

Update bodhi-push to only resume failed composes #2670

wants to merge 1 commit into from

Conversation

ryanlerch
Copy link
Collaborator

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

@ryanlerch ryanlerch requested a review from a team as a code owner October 16, 2018 08:59
Copy link
Contributor

@bowlofeggs bowlofeggs left a 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)
Copy link
Contributor

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():
Copy link
Contributor

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.

@bowlofeggs
Copy link
Contributor

Hey @ryanlerch! Do you still want to work on this?

@bowlofeggs
Copy link
Contributor

Closing due to inactivity.

@bowlofeggs bowlofeggs closed this Dec 7, 2018
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