docs.rs
docs.rs copied to clipboard
yanks might get ignored when the build is still queued
So it's not forgotten I'll write down my findings here.
When we get a Yank change from crates-index-diff, we are running an UPDATE statement on the releases table.
We only add the release to that table after the build is finished, so when the release is still in our build-queue, or in progress, the yank wouldn't do anything.
Since we don't check the number of updated rows for that UPDATE statement, this also never lead to an error.
While we could solve this issue by storing the yank-state in the build-queue too, this could also be solved via solving #1011.
Sentry issue: DOCS-RS-BACKEND-35
This definitely happens regularly, probably more often when our queue is longer:
small update here: While digging into this issue I discovered one thing:
after a build, we're already fetching the release-data from crates.io, and updating our release-record with the yank-status from the response.
https://github.com/rust-lang/docs.rs/blob/6b1505d2393518a317224c8ffeb4c098e4500fc3/src/docbuilder/rustwide_builder.rs#L487-L493
so I created a PR to
- change a
warntoerrorwhen the crates.io data can't be fetched. - only log an error for the yank-state-update if we don't have a build queued, assuming the build will fix the yank-state