Skip to content
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

rustdoc referenced search.js and settings.js not via static-root-path #1979

Open
syphar opened this issue Dec 28, 2022 · 9 comments
Open

rustdoc referenced search.js and settings.js not via static-root-path #1979

syphar opened this issue Dec 28, 2022 · 9 comments
Labels
A-builds Area: Building the documentation for a crate C-bug Category: This is a bug

Comments

@syphar
Copy link
Member

syphar commented Dec 28, 2022

initial issue

reported broken releases:

reported via:

@syphar
Copy link
Member Author

syphar commented Dec 28, 2022

interestingly I found that

the latter seems to be served from the cache

@syphar
Copy link
Member Author

syphar commented Dec 28, 2022

there are also working releases, via version and /latest/:

@syphar
Copy link
Member Author

syphar commented Dec 28, 2022

the JS file that gets requested:
https://docs.rs/regex/1.7.0/search-20221104-1.67.0-nightly-09508489e.js

is actually not invocation specific, but toolchain specific. I can also find it in our bucket in the root directory.

It is still requested from the release specific path, and not from the given static-root-path.

@syphar
Copy link
Member Author

syphar commented Dec 28, 2022

This feels like a bug in rustdoc, while our LegacySharedResourcesHandler previously hid this issue because it checked all static file requests with the bucket root

@syphar
Copy link
Member Author

syphar commented Dec 28, 2022

as a workaround I'll probably add back checking the toolchain specific files for this case, pending a fix in rustdoc (and then potentially a rebuild?)

@syphar
Copy link
Member Author

syphar commented Dec 28, 2022

To sum up the discussion on zulip ( topic link in issue description):

@syphar
Copy link
Member Author

syphar commented Dec 28, 2022

The fix (= hack) for this is to partially re-introduce this behaviour, pending another rebuild of the broken docs.

syphar added a commit to syphar/docs.rs that referenced this issue Dec 28, 2022
syphar added a commit to syphar/docs.rs that referenced this issue Dec 28, 2022
syphar added a commit to syphar/docs.rs that referenced this issue Dec 28, 2022
@syphar syphar changed the title search broken for some releases rustdoc referenced search.js not via static-root-path, but via /krate/version/search-...js Dec 28, 2022
@syphar syphar changed the title rustdoc referenced search.js not via static-root-path, but via /krate/version/search-...js rustdoc referenced search.js not via static-root-path Dec 28, 2022
@syphar syphar added C-bug Category: This is a bug A-builds Area: Building the documentation for a crate labels Dec 28, 2022
syphar added a commit to syphar/docs.rs that referenced this issue Jan 8, 2023
@syphar syphar changed the title rustdoc referenced search.js not via static-root-path rustdoc referenced search.js and settings.js not via static-root-path Jan 8, 2023
@syphar
Copy link
Member Author

syphar commented Jan 8, 2023

I believe a broken settings.js reference is probably coming from the same rustdoc issue, see #1992

@syphar
Copy link
Member Author

syphar commented Sep 27, 2023

Some numbers:

( just guessing the nightly versions):

cratesfyi=> select min(id) from releases where doc_rustc_version like '%2021-11-27%';
  min
--------
 453093
(1 row)

cratesfyi=> select max(id) from releases where doc_rustc_version like '%2022-11-07%';
  max
--------
 650838
(1 row)

cratesfyi=> select count(*) from releases where id >= 453093 and id <= 650838;
 count
--------
 195720
(1 row)

cratesfyi=> select count(*) from releases inner join crates on releases.id = crates.latest_version_id where releases.id >= 453093 and releases.id <= 650838;
 count
-------
 24056
(1 row)

Which means we would have to rebuild 195720 releases to rebuild if we want to fully fix the issue, and remove the fallback static file handler.
Alternatively 24056 releases to rebuild if we only care about latest versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-builds Area: Building the documentation for a crate C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant