Skip to content

Commit

Permalink
plume: upload release index with max-age=300
Browse files Browse the repository at this point in the history
Ideally, we'd be able to signal CloudFront at release time that the
release index has changed. But at least let's upload it with a more
aggressive caching policy so that Cincinnati isn't lagging e.g. a whole
day behind.

See related discussions in:
coreos/fedora-coreos-tracker#232
  • Loading branch information
jlebon committed Aug 1, 2019
1 parent a73e4d4 commit 150a742
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/plume/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,9 @@ func modifyReleaseMetadataIndex(spec *fcosChannelSpec, commitId string) {
plog.Fatalf("marshalling release metadata json: %v", err)
}

err = api.UploadObjectExt(bytes.NewReader(out), spec.Bucket, path, true, specPolicy, aws.ContentTypeJSON, -1)
// we don't want this to be cached for very long so that e.g. Cincinnati picks it up quickly
var releases_max_age = 60 * 5
err = api.UploadObjectExt(bytes.NewReader(out), spec.Bucket, path, true, specPolicy, aws.ContentTypeJSON, releases_max_age)
if err != nil {
plog.Fatalf("uploading release metadata json: %v", err)
}
Expand Down

0 comments on commit 150a742

Please sign in to comment.