-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
This protects the user to end up with half of their documentation uploaded.
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 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.') |
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 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?
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'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.
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.
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
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.
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
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. |
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. |
This protects the user to end up with half of their documentation uploaded.