rust-lang / docs.rs

crates.io documentation generator
https://docs.rs
MIT License
956 stars 193 forks source link

add API for crates.io to trigger rebuilds #2534

Open pflanze opened 6 days ago

pflanze commented 6 days ago

relates to #2442.

Note: does not yet contain any kind of rate limiting!

pflanze commented 5 days ago

I think I've handled all of your suggestions, but I forgot about Clippy. I'll need to get back to that another evening.

pflanze commented 5 days ago

Oh build failures:

error: set DATABASE_URL to use query macros online, or run cargo sqlx prepare to update the query cache

Not sure right now what to do about this (need to stop for tonight).

syphar commented 5 days ago

Oh build failures:

error: set DATABASE_URL to use query macros online, or run cargo sqlx prepare to update the query cache

Not sure right now what to do about this (need to stop for tonight).

I've put the necessary command into our Justfile, so calling just sqlx-prepare is fine

syphar commented 5 days ago

Thank you for all the work! This will be awesome for crate authors

pflanze commented 4 days ago

I've so far avoided to force-push and instead pushed 3 commits (those with subject lines starting with "sq", standing for squash) with changes that I will squash into the earlier commits where they belong; the idea is that this makes it easier for you to see what I changed; this assumes that diffing is easier as a last step after I do the squashing together with the right commits and force-pushing at the end. Let me know once you're happy and I'll do that. And if that was useful or rather a complication.

pflanze commented 4 days ago

I've realized that you can still see the commit from before me squashing the commits anyway and have now force-pushed db8b3636...b7deb0d7 (i.e. if you'd like to see the incremental changes I did easily, look at db8b3636, for the state I wish to be merged b7deb0d7).

pflanze commented 15 hours ago

I've pushed 3 commits with (a) the 'optimized' SQL query, FWIW, (b)+(c) add and use the constant_time_eq crate for token comparisons. Without it, it would likely be possible for attackers to find the token via response times.