Note that pylons.wsgiapp uses pylons.i18n's get_lang()
and friends, instead of our modified versions in
r2.lib.translation. This means that setting 'lang' in the
conf causes it to try and 'help' us by looking up PO files
in r2/i18n. Changing the ini files to use 'site_lang' as the
key gets around that.
Updates javascript to use min bid defined in the app config instead of using a
hard-coded value, and allows admin to override min bid.
Updates validation code to allow admin to override min bid on the back end.
Previously, only old-style SHA-1 passwords were upgraded on login. Now,
if we change the bcrypt work factor, bcrypted passwords will also get
the upgrade treatment.
The base LiveList set up is similar to LiveConfig; it sets a watch and
will get notified by ZooKeeper when the data changes. Sometimes we don't
need data very frequently, if at all, and would rather eschew the watch
for a pull based model (asking ZK for the data only when needed.) This
is particularly helpful if we're doing write-only changes to a
datastructure read only in one place (such as a queue processor).
This buys us two things: one fewer memcache roundtrip per request to
determine if the IP is throttled or not, and the ability to use CIDR for
specifying blocks.
Google's ipaddress-py library as currently being modified (6f231f50aace)
for inclusion in the Python stdlib is included here to help us
manipulate CIDR ranges etc.
The reddit PPA version of Cassandra no longer auto-starts on install
because that was really obnoxious in production. We'll have to make
sure to start the service after installing it.
Previously, it would treat anything that wasn't (case insensitively)
equal to "true" as False. The new configparser will ensure that the
value is either "true" or "false" and not "slkdjfljksdf", reducing the
risk of accidental False by typo.
The dynamic configuration system has two components: the app, which
reads, and the writer script. The latter is meant for use by humans, and
converts a [live_config] section of the INI file into JSON for storage
in ZooKeeper. The app will read this data on startup and place a watch
on the node to be notified, by ZooKeeper, of changes. This means that
running the writer script with new data will automatically propagate the
changes to every app very quickly, without restart.
The writer script relies on a human-entered password to authenticate
with ZooKeeper. The reddit app uses a different set of credentials
(specified in the INI file) to obtain read-only access to the
configuration data.
Also adds a new "live_config" spec to reddit and plugins. This spec is
parsed at write-time only and the parsed values are stored as JSON in
ZooKeeper.
The first phase loads the entry points and instantiates plugin objects.
This phase is useful for inspecting plugin metadata without having a
full environment configured (routing etc.). This phase is moved earlier
in the init process, to the first moment after the configuration has
been parsed.
The second phase does the heavy work of making individual plugins inject
themselves into the otherwise ready reddit environment. This phase stays
where plugin loading took place before (after global setup).