Skip to content

refine CDN invalidations after build #1861

@jsha

Description

@jsha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions