Skip to content

Show "Uploading" build state when uploading artifacts into storage #6810

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions readthedocs/builds/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
BUILD_STATE_CLONING = 'cloning'
BUILD_STATE_INSTALLING = 'installing'
BUILD_STATE_BUILDING = 'building'
BUILD_STATE_UPLOADING = 'uploading'
BUILD_STATE_PUSHING_CACHE = 'pushing-cache'
BUILD_STATE_FINISHED = 'finished'

Expand All @@ -18,6 +19,7 @@
(BUILD_STATE_CLONING, _('Cloning')),
(BUILD_STATE_INSTALLING, _('Installing')),
(BUILD_STATE_BUILDING, _('Building')),
(BUILD_STATE_UPLOADING, _('Uploading')),
Copy link
Member

Choose a reason for hiding this comment

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

I would expect this to need a migration. Curious that it isn't failing.

(BUILD_STATE_PUSHING_CACHE, _('Pushing cache')),
(BUILD_STATE_FINISHED, _('Finished')),
)
Expand Down
3 changes: 3 additions & 0 deletions readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
BUILD_STATE_INSTALLING,
BUILD_STATE_PULLING_CACHE,
BUILD_STATE_PUSHING_CACHE,
BUILD_STATE_UPLOADING,
BUILD_STATUS_SUCCESS,
BUILD_STATUS_FAILURE,
LATEST,
Expand Down Expand Up @@ -727,6 +728,7 @@ def run_build(self, record):
localmedia=bool(outcomes['localmedia']),
pdf=bool(outcomes['pdf']),
epub=bool(outcomes['epub']),
environment=self.build_env,
)

# Finalize build and update web servers
Expand Down Expand Up @@ -965,6 +967,7 @@ def store_build_artifacts(
)
return

environment.update_build(BUILD_STATE_UPLOADING)
storage = get_storage_class(settings.RTD_BUILD_MEDIA_STORAGE)()
log.info(
LOG_TEMPLATE,
Expand Down