-
Notifications
You must be signed in to change notification settings - Fork 91
Description
We've noticed that the manifests.txt cache on Fastly is sometimes outdated after a new nightly is published. This is purge by promote-release here (https://github.com/rust-lang/promote-release/blob/44a5f66b1e0b9d780a8737abcbe41587e952dbb0/src/fastly.rs#L19, https://github.com/rust-lang/promote-release/blob/44a5f66b1e0b9d780a8737abcbe41587e952dbb0/src/main.rs#L611). That code generally speaking works for CloudFront because CloudFront supports path-based invalidation. Fastly requires 'tags' to be set on URLs at request time, and then those are invalidated later: https://www.fastly.com/documentation/reference/api/purging/#purge-tag
We will need to extend
simpleinfra/terragrunt/modules/release-distribution/fastly-static.tf
Lines 82 to 90 in 5fe9fb7
| snippet { | |
| name = "set cache key for dist" | |
| type = "fetch" | |
| content = <<-VCL | |
| if (req.url ~ "^\/dist\/") { | |
| set beresp.http.Surrogate-Key = "dist"; | |
| } | |
| VCL | |
| } |
manifeststxt per https://github.com/rust-lang/promote-release/blob/44a5f66b1e0b9d780a8737abcbe41587e952dbb0/src/fastly.rs#L48.