Skip to content

Commit 8fad146

Browse files
committed
Updates from review
1 parent 90e63cf commit 8fad146

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

readthedocs/core/unresolver.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ def unresolve(self, url, add_index=True):
9595
filename = None
9696
elif not version.is_external:
9797
log.warning(
98-
"Version is not external.",
98+
"Attempt of serving a non-external version from RTD_EXTERNAL_VERSION_DOMAIN.",
9999
domain=domain,
100100
version_slug=version.slug,
101101
version_type=version.type,
102+
url=url,
102103
)
103104
version = None
104105
filename = None
@@ -174,6 +175,8 @@ def _match_subproject(self, parent_project, path):
174175
.first()
175176
)
176177
if project_relationship:
178+
# We use the subproject as the new parent project
179+
# to resolve the rest of the path relative to it.
177180
subproject = project_relationship.child
178181
response = self._unresolve_path(
179182
parent_project=subproject,
@@ -279,7 +282,7 @@ def unresolve_domain(self, domain):
279282
# Serve from the PUBLIC_DOMAIN, ensuring it looks like `foo.PUBLIC_DOMAIN`.
280283
if public_domain == root_domain:
281284
project_slug = subdomain
282-
log.info("Public domain.", domain=domain)
285+
log.debug("Public domain.", domain=domain)
283286
return project_slug, None, None
284287

285288
# TODO: This can catch some possibly valid domains (docs.readthedocs.io.com)
@@ -291,7 +294,7 @@ def unresolve_domain(self, domain):
291294
if external_domain == root_domain:
292295
try:
293296
project_slug, version_slug = subdomain.rsplit("--", maxsplit=1)
294-
log.info("External versions domain.", domain=domain)
297+
log.debug("External versions domain.", domain=domain)
295298
return project_slug, None, version_slug
296299
except ValueError:
297300
log.info("Invalid format of external versions domain.", domain=domain)

0 commit comments

Comments
 (0)