When getting a list of user subreddits, we'll check if they're
subscribed to any automatic subreddits and remove them from the mix
before doing the random selection. Then they'll be added back in. This
is important to ensure that maintenance announcements aren't missed by
users because the announcement wasn't in their subset of subscriptions.
On reddit.com the automatic subreddits are /r/blog and /r/announcements.
Some evil people are using the toolbar URLs to spam their links and then
framebusting to ditch the toolbar. This patch makes it so that if the
framed URL is on a shame-banned domain, the framing will abort and
return a 404.
This will allow us to collect information about how users found
subreddits that they subscribe to. We can use this information to test
the effectiveness of new ways of discovering and subscribing to
subreddits.
Specifically, when the subscribe button is clicked, for the current page
and previous page: the URL, referrer URL, and the type of UI element
clicked are sent. We'll use this to answer questions like:
* "did clicking on gizmo A lead to users subscribing to subreddit B?"
* "why did we see a spike in subscriptions to subreddit X today?"
The "Read from PromoCampaign things" change broke the code that causes the
traffic display to show the past month by default if a promoted link has
no campaigns.
This change fixes a bug where clicking on "traffic" on one of the subreddit
discovery spotlight links caused a 500 error.
See: 273c548c7d386126152e96b2bfde1eed2c4f18aa
Aggressively catches and logs exceptions inside the campaign loop in
get_scheduled. This change will allow make_daily_promotions to skip over
campaigns with corrupt data and still launch the others.
Note: We might want to consider passing the list of errored campaigns
back up to the calling function so they can be handled more noisily there.
In memcached there is a chance of the keys being evicted before their
time runs out. We can mitigate this by adding more memcaches, but that
has other downsides (such as increased risk of failure).
Pycassa will do its own marshalling when columns have validators
specified in the C* metadata. We need to disable our own marshalling
when we know Pycassa will take care of it. This is already taken care of
in the general case, but timestamps are handled somewhat uniquely.
This provides a system for two-factor authentication, using a compliant
OTP-generator such as Google Authenticator. The framework includes a
validator for use on API calls needing authentication as well as a UI
for provisioning/resetting your secret key. A secure cookie may be
generated to effectively turn the user's browser into a temporary
authentication factor.
This feature is currently limited to admins only until full-site SSL is
available.
If the config variable profile_directory is set, ProfilingMiddleware
will be added to the WSGI stack. The middleware will generate a file in
the specified directory on each request containing the contents of that
request's profile.
The code has already been dual-writing to PromoCampaign Things. This change
begins reading from Things while still writing to both Things and the link
attributes in case we need to roll back.
Makes the behavior match that of PromoteDates.bid_history, which sets the
end_date to today if it's not given as a parameter.
This fixes a bug where the function raised an error if the optional parameter
end_date wasn't provided.
Gets rid of default values so a data attribute will be saved even when trans_id
is zero. This change will make it possible to query for unpaid campaigns.
Also gets rid of payment state and makes sure the transaction id is preserved
even if the promoted link is rejected because this lets us link the campaign
to the refund in the promo log.
In the previous system, the weekday summary showed the average traffic
for each day-of-week over the day interval range. The new system was
just showing the latest week's data.
boto attempts to validate the bucket when calling get_bucket by doing a
LIST with zero desired items. By turning off validate we can reduce the
permissions.
Occasional rogue promotion weights were causing /promoted/graph to fail. We
should figure out how those weights are being created in the first place, but
for now just check to make sure a campaign exists before using it.