Skip to content

Commit

Permalink
dont invalidate sources on static cloudfront distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Oct 10, 2022
1 parent 5cf39ca commit 6bdcd9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/build_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,6 @@ mod tests {
"distribution_id_static".into(),
"/rustdoc/will_succeed*".into()
),
(
"distribution_id_static".into(),
"/sources/will_succeed*".into()
),
]
);
}
Expand Down
11 changes: 2 additions & 9 deletions src/cdn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,8 @@ pub(crate) fn invalidate_crate(config: &Config, cdn: &CdnBackend, name: &str) ->
.context("error creating web CDN invalidation")?;
}
if let Some(distribution_id) = config.cloudfront_distribution_id_static.as_ref() {
cdn.create_invalidation(
distribution_id,
&[
&format!("/rustdoc/{}*", name),
&format!("/sources/{}*", name),
],
)
.context("error creating static CDN invalidation")?;
cdn.create_invalidation(distribution_id, &[&format!("/rustdoc/{}*", name)])
.context("error creating static CDN invalidation")?;
}

Ok(())
Expand Down Expand Up @@ -196,7 +190,6 @@ mod tests {
("distribution_id_web".into(), "/krate*".into()),
("distribution_id_web".into(), "/crate/krate*".into()),
("distribution_id_static".into(), "/rustdoc/krate*".into()),
("distribution_id_static".into(), "/sources/krate*".into()),
]
);
}
Expand Down

0 comments on commit 6bdcd9a

Please sign in to comment.