Many thanks to @chromakode for design and copy.
The old goldvertisement live config is left in for now so that old code
continues to function during rollout.
This media provider is for simple single-server installations where an
HTTP server running on the same machine handles serving of the static
media files.
An appropriate setup with nginx is now the default in the new install
script.
This allows defining a set of phrases on a wiki page, and whenever an
automatic gold-related PM is sent, a random phrase is selected and
appended to the message.
This does several things to subreddit stylesheets:
- stores them on the thumbs buckets rather than the main static bucket.
(this was not desirable before on reddit.com due to CDN configuration)
- enforces a new restriction of custom (%%style%%) images only in
stylesheets to make secure urls easier to resolve. existing subreddits
are grandfathered in for now.
- writes, if possible as above, a second stylesheet that references
subreddit images over https.
At some point in the future, the thumbs buckets should be directly accessible
on HTTPS via the same URLs which would remove the need for the second
stylesheet to be created and uploaded. The custom image rules and other changes
would still be good.
Since the S3 bucket we upload stylesheets to is not necessarily the same
as the rest of the statics, it is useful to be able to specify this
static domain separately.
Memoize creates very large objects that take up lots of space
and has weird behaviour when it gets evicted. We get some isolation
and monitoring by moving it to its own pool. Since it is sensitive
to split-brain stuff, we start out here by dual-writing to the new
pool.
If the relevant configuration options are left blank in the ini file, we
will pass None to boto for credentials allowing it to look in other
places, including the AWS instance metadata used by Roles for EC2.
The paste-supplied gzip middleware is primarily for testing and is
insufficient in that it:
1) is unable to require a minimum size for gzipping
2) does not correctly add the "Vary: Accept-Encoding" header
it is also somewhat difficult to add those features given its structure.
Much new code expects the query cache to always be present, especially
for stuff that is 100% Cassandra based and doesn't even have a Postgres
query to back it. These options are just cluttering up our code since
they're useless now.