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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove status transition of paused => cancelling #434

Merged
merged 1 commit into from Jun 10, 2021

Conversation

adrianna-chang-shopify
Copy link
Contributor

This transition was introduced in #166, but I have no idea why 馃槄

With our logic in Run#cancel:

def cancel
if paused? || stuck?
update!(status: :cancelled, ended_at: Time.now)
else
cancelling!
end

The only possible transition for a paused run if a user presses "Cancel" is to move it to cancelled.

@adrianna-chang-shopify
Copy link
Contributor Author

adrianna-chang-shopify commented Jun 9, 2021

RuboCop v1.6.1 has got a bug so CI is failing

Copy link
Member

@etiennebarrie etiennebarrie left a comment

Choose a reason for hiding this comment

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

Right, it should go straight to cancelled if it's paused.

@adrianna-chang-shopify adrianna-chang-shopify merged commit 4435dbf into main Jun 10, 2021
@adrianna-chang-shopify adrianna-chang-shopify deleted the remove-invalid-status-transition branch June 10, 2021 14:43
lawrencewong pushed a commit to lawrencewong/maintenance_tasks that referenced this pull request Apr 29, 2023
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.

None yet

2 participants