Commit Graph

7693 Commits

Author SHA1 Message Date
Shawn Krisman
7edd1ec8cd Use s3 to read and store subreddit sitemaps. 2016-07-07 15:12:28 -07:00
Roger Ostrander
4b2a669d6f Controllers: Remove @vary_pagecache_on_experiments entries 2016-07-06 17:55:30 -07:00
Brian Simpson
d732efd1e1 Use stalecache for "all:rising" key 2016-07-06 15:33:12 -07:00
Brian Simpson
84153cabea rising: Change the "all" key to work with replicated mcrouter 2016-07-06 15:33:07 -07:00
Neil Williams
6dbe772e03 Remove the pagecache
With some experimentation, we've determined that it is not necessary for
the site to function these days. There's no noticeable effect on p90 or
p99 response times in the loggedout cache pool and several large traffic
events have occurred while the pagecache was off. By removing this
layer, we reduce complexity, remove a possible source of poisoning bugs,
and make it easier to do stuff like logged out A/B experiments.
2016-07-06 13:44:06 -07:00
Chris Slowe
ade2b9da96 Add missing cache-varying decorator on POST_register. 2016-07-06 13:43:57 -07:00
adam
b3935be6aa Make Oembed endpoint work with links. 2016-07-06 13:43:57 -07:00
Chris Slowe
36990c40f5 Allow for multiple signing errors, and propagate onto login_event.
Rather than having the validator issue the 403 on improper signing, this moves the handling into the controller and therefore allows signing errors to be logged as part of a failed login_event.

Additionally, some persistent time-related issues with android's v1 implementation needs debugging.  This disables the epoch check but will still persist the error and timing info on the login_event.
2016-07-06 09:35:38 -07:00
Jack Niu
47c792248d Return json instead of html for /api/v1/login 403 2016-07-06 09:26:20 -07:00
Brian Simpson
267a7fccf0 emr_helpers: Don't convert date string to datetime
The date strings should sort correctly and for some reason the format of the
date strings aren't consistent so they can't be reliably converted to
datetimes.
2016-07-05 16:01:28 -07:00
Brian Simpson
f748f1423d LocalizedSubreddits: Ignore memcache errors 2016-07-05 13:42:11 -07:00
Brian Simpson
3ce8385af3 geoip: Ignore memcache errors 2016-07-05 13:42:11 -07:00
Brian Simpson
75cbbd02bb sgm: Optionally ignore errors on set 2016-07-05 13:42:06 -07:00
Brian Simpson
7bd786c09f Subreddit._by_name: Ignore errors on populating the cache 2016-07-05 13:41:45 -07:00
Brian Simpson
9ede0e7795 Import sgm from its own module, not from r2.lib.cache 2016-07-05 13:39:39 -07:00
Lev Alexandrovich Neiman
8c97bf4f24 Rethrow exception in exponential_retrier without sacrificing stack trace 2016-07-05 12:47:21 -07:00
Lev Alexandrovich Neiman
9282b47553 Add fetch_things_with_retry and exponential_retrier to utils 2016-07-05 12:46:59 -07:00
Kevin O'Connor
74033fc9dd Allow employees to distinguish messages. 2016-06-30 12:49:07 -07:00
Chad Birch
e355b0da5f Remove remaining links to /about/team page 2016-06-22 15:33:31 -06:00
Brian Simpson
28332d6430 Query: move caching to g.gencache and make key human readable 2016-06-21 13:58:37 -07:00
Brian Simpson
f46f38b229 CachedResults: implement get_query_iden() to not rely on Query._iden() 2016-06-21 13:57:34 -07:00
Brian Simpson
cff9be0969 MultiQuery: Remove caching
This wasn't used. The implementation might have run into problems with
overly long cache keys because it used a concatenation of the cache keys
of all the sub queries. If we really want to get some caching here the
sub queries should have read_cache/write_cache set.
2016-06-21 13:42:42 -07:00
J. Smith
4e7029bdbe Make mod removal message clear what user was removed
Specify the user that was removed in the subject line (instead of `You've been removed...`, it's `{user} has been removed...`) and start the message body with `{user}: You have been been removed...` (instead of just `You have been removed`).
2016-06-21 09:27:52 -07:00
Brian Simpson
387becd9e4 LocalizedSubreddits: Use g.gencache 2016-06-20 16:20:13 -07:00
Joshua Uziel
805a9a4b79 Onboarding: Featured subreddits API endpoint
Endpoint for retrieving subreddits to make new
users aware of without actually subscribing
them while doing the onboarding process.

The list of featured subreddits will be managed
separately from the default ones.

For testing purposes, we add a subreddit to show
up via the inject_test_data script.
2016-06-20 16:19:37 -07:00
Brian Simpson
c94ea00fd2 Subreddit._by_name: Use g.gencache 2016-06-20 16:07:03 -07:00
Brian Simpson
18fb269f1b rising: Use g.gencache 2016-06-20 16:06:53 -07:00
Brian Simpson
753039574e promote: Use g.gencache 2016-06-20 16:06:53 -07:00
Brian Simpson
004895b8ef geoip: Use g.gencache 2016-06-20 16:06:49 -07:00
Brian Simpson
7e0a7678da voting: Use g.gencache for queued votes 2016-06-20 16:06:42 -07:00
Brian Simpson
260268df5b captcha: Store solutions in g.gencache 2016-06-20 16:06:37 -07:00
Brian Simpson
6f78328c5d VOneTimePassword: Use g.gencache to check for code reuse 2016-06-20 16:06:30 -07:00
Brian Simpson
cf73f43adc api: Use g.gencache for storing otp secret 2016-06-20 16:06:30 -07:00
Brian Simpson
e81a93cba4 Add g.gencache for moving keys to mcrouter but still in the g.cache pool 2016-06-20 16:06:24 -07:00
Chris Slowe
1a452edf81 Re-allow announcements ("stickies") to apply to any type of link. 2016-06-20 15:56:16 -07:00
Shawn Krisman
c5c1c901c9 All pages include a canonical link.
The main points we hit on for canonicalization are that:

1) All pages should be https
2) All pages should end in a '\'
3) All language specific subdomains (de, pt, etc ...) are canonicalized to 'www'.

For comment pages we also do extra logic to ensure that pages of the form:

https://www.reddit.com/r/hiphopheads/comments/4nc0ln/

are canonicalized to:

https://www.reddit.com/r/hiphopheads/comments/4nc0ln/fresh_clams_casino_all_nite_feat_vince_staples/
2016-06-20 15:18:51 -07:00
Kevin O'Connor
dc501488ca Send .compact traffic to m.reddit.com instead of h.reddit.com. 2016-06-20 13:07:18 -07:00
MelissaCole
d43d7f9ff9 Disassociate preview object when deleting a Link object 2016-06-20 12:58:09 -07:00
Strix
f56e810a48 fix closing parens/braces in fn reply() 2016-06-17 11:11:13 -07:00
Brian Simpson
8123b9917c TryLater: ready_items key should be the original uuid, not datetime 2016-06-15 13:49:54 -07:00
Brian Simpson
1f93cbbd23 Modaction.create: Don't pass request or c to mod_event if out of request 2016-06-15 13:49:49 -07:00
birakattack
9581950ada Add already exists error to form for duplicate links 2016-06-15 12:08:59 -07:00
Brian Simpson
2cc7c85294 TryLater.run: Make a copy of the all_hooks items to avoid RuntimeError 2016-06-15 11:33:47 -07:00
Brian Simpson
94acb322aa TryLater: Attempt row/timestamp delete to avoid generating tombstones 2016-06-15 11:18:59 -07:00
Brian Simpson
a4bf06235c TryLater: move all processing and cleanup into class method
Previously it was split between the class and the script handler
2016-06-15 11:18:59 -07:00
Brian Simpson
4292df773f TryLater: Use xget to process ALL ready items 2016-06-15 11:18:59 -07:00
Brian Simpson
d4cb4087b5 run_trylater: Flush the stats 2016-06-15 11:18:59 -07:00
Brian Simpson
791e117245 TryLater: Add stats for number of ready items 2016-06-15 11:18:59 -07:00
Brian Simpson
3c031c8db6 TryLater.multi_handle: Document context manager magic 2016-06-15 11:18:59 -07:00
Brian Simpson
777c655f80 VOneTimePassword: Change name to otp_ratelimit to avoid UnboundLocalError 2016-06-15 11:18:59 -07:00