Skip to content

Commit

Permalink
Fix PR builds being marked built
Browse files Browse the repository at this point in the history
This was removed in #7044,
and it's needed to properly link to the PR builds and update their status.
  • Loading branch information
ericholscher committed May 12, 2020
1 parent 2a9f6a7 commit b91213f
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,14 +787,13 @@ def run_build(self, record):
# We upload EXTERNAL version media files to blob storage
# We should have this check here to make sure
# the files don't get re-uploaded on web.
if self.version.type != EXTERNAL:
self.update_app_instances(
html=bool(outcomes['html']),
search=bool(outcomes['search']),
localmedia=bool(outcomes['localmedia']),
pdf=bool(outcomes['pdf']),
epub=bool(outcomes['epub']),
)
self.update_app_instances(
html=bool(outcomes['html']),
search=bool(outcomes['search']),
localmedia=bool(outcomes['localmedia']),
pdf=bool(outcomes['pdf']),
epub=bool(outcomes['epub']),
)
else:
log.warning('No build ID, not syncing files')

Expand Down Expand Up @@ -1114,9 +1113,6 @@ def update_app_instances(
'Updating version failed, skipping file sync: version=%s',
self.version,
)
hostname = socket.gethostname()

delete_unsynced_media = True

# Broadcast finalization steps to web application instances
fileify.delay(
Expand Down Expand Up @@ -1272,7 +1268,7 @@ def fileify(version_pk, commit, build):
This is so we have an idea of what files we have in the database.
"""
version = Version.objects.get_object_or_log(pk=version_pk)
if not version:
if not version or version.type == EXTERNAL:
return
project = version.project

Expand Down

0 comments on commit b91213f

Please sign in to comment.