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

refine CDN invalidations after build #1861

Closed
jsha opened this issue Sep 29, 2022 · 4 comments
Closed

refine CDN invalidations after build #1861

jsha opened this issue Sep 29, 2022 · 4 comments

Comments

@jsha
Copy link
Contributor

jsha commented Sep 29, 2022

Following up on #1825:

I notice there are a few ? operators that come after the build happens, but before the CDN invalidation. For instance, purging the build dir and the local cache:

https://github.com/rust-lang/docs.rs/pull/1825/files#diff-b06b44e6583254ce69af8cedabc04a73a97599d593676e1bbad7ee442240ccf1R502-R506

In the unlikely event one of these fails, we would fail to invalidate. Probably the CDN invalidation should happen regardless of those errors.

Relatedly: Right now it looks like we'll do a CDN invalidation even for a build that failed. But a failed build won't affect any page except /crate/<name>/<version>/builds. Depending on how frequent failed builds are, we could save some money on invalidations by making /builds max-age=0, and not invalidating cache on builds.

@Nemo157
Copy link
Member

Nemo157 commented Sep 29, 2022

Failed builds affect the version list in the crate dropdown (at least without #1772).

Also the version list on the left of the /crate/<name>/<version> page, which probably doesn't make sense to dynamically load.

@syphar
Copy link
Member

syphar commented Sep 29, 2022

invaliding when we use ? is definitely a gap in the current logic, I would fix this after we merged #1856,
but before we introduce the default TTL ( = before we actually start caching)

@syphar
Copy link
Member

syphar commented Feb 4, 2023

@jsha perhaps I'm missing something because of the early morning, but:
is this here still an issue? The diff-link above doesn't show me any example I need, perhaps it became invalid because of some force-pushes.

I'm mostly talking about the ? piece where we would not create the needed invalidation in certain error situations.

@syphar
Copy link
Member

syphar commented Feb 4, 2023

correction: I just see I might have solved it myself in #1864 , so this doesn't block increasing the TTL any more.

@syphar syphar closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants