docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

yanks might get ignored when the build is still queued

Open syphar opened this issue 2 years ago • 3 comments

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.

syphar avatar Nov 27 '22 14:11 syphar

Sentry issue: DOCS-RS-BACKEND-35

sentry[bot] avatar Dec 01 '22 20:12 sentry[bot]

This definitely happens regularly, probably more often when our queue is longer:

grafik

syphar avatar Dec 05 '22 17:12 syphar

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 warn to error when 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

syphar avatar Jan 07 '23 14:01 syphar