Skip to content

Docs built during 2018-{10-12} link to the wrong url for static resources #1181

Closed
@Nemo157

Description

@Nemo157

Noticed by @fasterthanlime: https://twitter.com/fasterthanlime/status/1328374357689765890

An example doc page: https://docs.rs/druid/0.1.1/druid/index.html

All docs built with these rustc versions hit the issue:

prod-dump=# select distinct doc_rustc_version from releases where doc_rustc_version like '%2018-1%';
              doc_rustc_version
---------------------------------------------
 rustc 1.32.0-nightly (3e90a12a8 2018-11-29)
 rustc 1.33.0-nightly (adbfec229 2018-12-17)
 rustc 1.32.0-nightly (6b9b97bd9 2018-11-15)
 rustc 1.31.0-nightly (78ff609d7 2018-10-19)
(4 rows)

The issue is that these include bad paths to the static resources:

<link rel="stylesheet" type="text/css" href="../normalize-20181019-1.31.0-nightly-78ff609d7.css">

Previously this worked because the static file handler ignored the path, and just served these static resources from any directory if the filename matched, which I recently fixed: d8caa1c

This affects 14k releases, of which 3k were the latest version of a crate as of 7 months ago (which is the dataset I have available)
prod-dump=# select count(*) from releases where doc_rustc_version like '%2018-1%';
 count
-------
 14298
(1 row)

prod-dump=# select count(*) from (select doc_rustc_version, rank() OVER (PARTITION BY crate_id ORDER BY id DESC) as rank from releases) as _ where rank = 1 and doc_rustc_version like '%2018-1%';
 count
-------
  2929
(1 row)

prod-dump=# select max(release_time) from releases;
         max
---------------------
 2020-04-27 14:13:00
(1 row)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Web frontendC-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions