Skip to content

Builds: ignore cancelling the build at "Uploading" state #10006

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

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

humitos
Copy link
Member

@humitos humitos commented Feb 8, 2023

This protects the user to end up with half of their documentation uploaded.

This protects the user to end up with half of their documentation uploaded.
@humitos humitos requested a review from a team as a code owner February 8, 2023 14:42
@humitos humitos requested a review from benjaoming February 8, 2023 14:42
@humitos humitos requested review from ericholscher and removed request for benjaoming February 13, 2023 16:50
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

I feel like there's probably more we should be doing here, but this seems like a useful first step.

# This is to protect our users to end up with half of the documentation uploaded.
# TODO: remove this condition once we implement "Atomic Uploads"
if self.data.build["state"] == BUILD_STATE_UPLOADING:
log.warning('Ignoring cancelling the build at "Uploading" state.')
Copy link
Member

Choose a reason for hiding this comment

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

I think this will just end with the build getting KILL after INT, after an amount of time, but I guess that will take a bit longer?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure to understand your comment.

When the build process receive the INT signal, we are just ignoring it here. The build will continue uploading the files normally.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but celery will send a KILL signal after the hard stop limit: https://docs.celeryq.dev/en/stable/userguide/configuration.html?highlight=settings#task-time-limit

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Hard stop limit is a different thing, tho. I opened a PR some time ago to work on that but it's not trivial: #9387

@humitos
Copy link
Member Author

humitos commented Feb 14, 2023

I feel like there's probably more we should be doing here

What other things you have in mind? Are they easy enough to add to this PR? If not, we should open an issue with these ideas so we don't loose them.

@ericholscher
Copy link
Member

Mostly just trying to have better error handling when the process gets KILL'd. I think the atomic uploads (#9947) captures the useful parts of that conversation though.

@humitos humitos merged commit 4598ee4 into main Feb 15, 2023
@humitos humitos deleted the humitos/ignore-cancel-at-upload branch February 15, 2023 07:58
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