7956 Commits

Author SHA1 Message Date
Brian Simpson
753b17407e Update README for archival 2017-10-16 13:46:21 -07:00
Brian Simpson
c587593b8a Remove CONTRIBUTING.md
The repository is archived and not accepting contributions.
2017-10-16 13:46:21 -07:00
Brian Simpson
22770a3279 ApiDocs: Don't link to code
The docs are generated from the production code, but the links are to the
deprecated opensource repository (github.com/reddit/reddit), so the
links and line references are wrong.
2017-10-16 13:46:20 -07:00
Brian Simpson
3ef6a288c3 Fix https config 2017-10-16 13:46:20 -07:00
Brian Simpson
8d80490784 Fix expando icons 2017-10-16 13:46:20 -07:00
Brian Simpson
6402a4c3de example.ini: Add gold_servername_sr 2017-10-16 13:46:20 -07:00
Brian Simpson
c3a8a13cea opensource: Don't install liveupdate 2017-10-12 14:50:06 -07:00
Brian Simpson
fd2962cfe2 opensource: Stop trying to install private plugins 2017-10-12 09:44:02 -07:00
Ruslan Zalalov
163b7a5751 Fix baseplate.configure_tracing() arguments 2017-10-12 09:39:10 -07:00
elnuno
52728820cf SimpleSillyStub: Add __exit__ and __exit__ for context managers 2017-04-18 15:41:10 -07:00
Brian Simpson
1b66f1caed setup_cassandra: Increase the per-thread stack size
This used to be set to 256k in cassandra version 1.2.19, but we
recently downgraded to version 1.2.11 where it's set too low.
2017-03-09 14:58:19 -08:00
Brian Simpson
a09f43c9bc reddit.sh: Install plugins before attempting first startup
This lets Cassandra CFs in the plugins get created at the same time,
avoiding some weird conflict or race condition.
2017-03-09 14:58:13 -08:00
Brian Simpson
67338d58fb Use the default packaged mcrouter instance for local installs 2017-03-09 14:57:40 -08:00
Brian Simpson
864681b8c9 Randomize scores of all top level comments for shuffle sort
This will ensure that all top level comments are considered for
display. It also makes it more clear that the sorting of child
comments is uneffected.
2017-02-21 14:26:30 -08:00
Ricky Ramirez
33a8b4be0f Ignore IDN decoding errors. 2017-02-21 11:07:39 -08:00
Ricky Ramirez
87c315b8ae Remove defunct ads tables.
These used to back the sidebar 300x250 ad space. This was replaced a long time
ago.
2017-02-15 10:20:12 -08:00
Ricky Ramirez
0f5ec4ca6b Remove last vestiages of the jury system.
This was removed in 2012.
2017-02-14 15:45:06 -08:00
Brian Simpson
61bda1b5ce tracing: Add traces for Cassandra 2017-01-19 11:32:18 -08:00
Chris Slowe
96bbaa04da add tracking of the result from calls to cassandra to graphite 2017-01-19 11:32:14 -08:00
Brian Simpson
a95a23ca80 tracing: Add traces for postgres 2017-01-19 11:29:54 -08:00
Brian Simpson
866f39bf23 tracing: Add some request details to the trace as tags 2017-01-19 11:29:48 -08:00
Brian Simpson
1039d351d3 Add baseplate tracing on r2 requests 2017-01-19 11:27:33 -08:00
Brian Simpson
8508f30d10 search: Disable faceting
Faceting returns counts of query matches per subreddit name so we can
show the user all the subreddits that contain links for their query.
This ends up returning many unpopular subreddits, which when looked up
by name are often missing from cache and result in a postgres query. This
is bad for performance, and the feature is not popular with users so it is
safe to remove.
2017-01-12 15:03:43 -08:00
Brian Simpson
2e22f91894 Subreddit._by_name: Increase TTL from 1 to 12 hours 2017-01-12 15:03:43 -08:00
Brian Simpson
aa3487863b Subreddit._by_name: Add timer around pg query 2017-01-12 15:03:38 -08:00
Andy Sacher
e024bb2960 Sanitize trailing ? when stripping analytics parameters from URL
Safari doesn't remove the ? from a URL when setting `url.search = ''`
which results in links not correctly applying `:visited`.

For example, before this change:
https://www.reddit.com/?utm_foo=bar -> https://www.reddit.com/?
and links to https://www.reddit.com/ don't render as :visited

After this change,
https://www.reddit.com/?utm_foo=bar -> https://www.reddit.com/
and links to https://www.reddit.com/ are properly empurpled.
Additionally, hash is preserved:
https://www.reddit.com/?utm_foo=bar&baz=qux#hoopla -> https://www.reddit.com/?baz=qux#hoopla
2017-01-04 15:50:10 -08:00
Andy Sacher
7471b22d90 Replace link href with inbound tracking url on click
If a link has an inbound tracking url (regular url plus utm query parameters)
or outbound tracking url (redirect via outbound link tracker service),
then replace the link's `href` with the tracking url when clicked.

This ensures links to the same resource with different tracking details
(e.g. comments flatlist button vs self-post title vs self-post source-url)
correctly render as `:visited` despite different `?utm_content=button-name`.

This commit also includes fixes to properly split the cache for rendered
link and comment templates when inbound tracking URLs are enabled.
2016-12-20 17:37:22 -08:00
William Ting
02e31838cd Revert "Generate mobile bi-directional links"
This reverts commit 920abafaa6
2016-12-20 10:38:47 -08:00
William Ting
b86af6082f Remove /mobile
This subdomain is going away, and redirects should be happening via the
"mobile website" link at the bottom.
2016-12-19 11:48:09 -08:00
William Ting
733b03af9a Remove beta references to 2X. 2016-12-14 13:57:30 -08:00
Brian Simpson
a40219258e MultiApiController: fix on_validation_error() to set code
Some errors don't have a code associated with them so we need to
supply a default value to abort_with_error. This fixes the
USER_DOESNT_EXIST errors that are causing exceptions.
2016-12-14 12:18:43 -08:00
Brian Simpson
db3bb27a84 Use stale subreddit lookup for saved subreddits 2016-12-08 11:18:58 -08:00
Andy Sacher
0d0e41473a Add missing import to printablebuttons 2016-12-02 11:20:49 -08:00
Andy Sacher
dd46d3677f Add utm query parameters onto links for comments/messages
Link.tracking_link adds utm query parameters onto links inside reddit
to track which button was clicked, what component type contains the button
(e.g. post listing, inbox, post listing embedded on a comments page),
what page type the user is visiting, and the page's subreddit.

This feature is enabled via feature flag and disabled by admin mode.

This commit affects programmatically-generated links to comments and messages.
2016-12-01 17:39:27 -08:00
Avinash Dwarapu
b900d9b342 Fix documentation for GET_rules in subreddit 2016-12-01 13:02:38 -08:00
Pokechu22
e5eb480ed3 Search: Fix restrict_sr for domains listings and AllMinus
For domains listings, it was possible to have results from the wrong domain be included.  Switching to a phrase search fixes that.  See https://redd.it/5ew4ve for more info about, and caveats of, this method.

For AllMinus, see https://redd.it/5eqiyy for the general context.  This does not need to be explicitly handled for ModMinus, as ModMinus excludes the filtered subreddits from its sr_ids property.  Additionally, ModMinus doesn't need special handling since it inherits the already-handled MultiReddit.
2016-12-01 13:02:32 -08:00
Eric
bb1abcccc1 Mention karma in CANT_CREATE_SR
The most common, and I really mean it, the most common post in /r/help and related subreddits is when users question why they can't make a subreddit even though they have an old account. The error that users get only mentions account age and does not mention any kind of karma requirement. It's in the /r/help FAQ, but we all know no one reads that.

Just lightly mentioning karma could reduce the traffic on /r/help as well as be more clear.
2016-11-29 12:05:21 -08:00
David Wick
80c97df6f4 Ads: Remove roadblocks functionality
These were original to prevent users from buying ads when
managed campaign page takeovers were in effect.  With auction this
no longer matters since impressions are no longer guaranteed.

More recently it seems roadblocks were used to prevent people from
buying ads in places that were inappropriate.  We now have other
ways of dealing with that (`subreddit.hide_sponsored_headlines and
`subreddit.allow_ads`) so these pages are completely obsolete.
2016-11-29 11:25:06 -08:00
William Ting
ea8f0b72c5 Remove unused imports. 2016-11-28 14:33:15 -08:00
William Ting
de071d9b17 Remove unused Cassandra Counter. 2016-11-28 14:31:03 -08:00
Brian Simpson
1a4dcb4fc4 StripeController: Add noop 'review.opened' event 2016-11-22 11:15:02 -08:00
Brian Simpson
77eaf71b1b consume_comment_vote_queue: Don't update commenttree if not needed 2016-11-14 14:48:30 -08:00
Brian Simpson
49e86551a1 Move get_active_sort_orders_for_link to separate method 2016-11-14 14:48:30 -08:00
Brian Simpson
6b15b30954 Process updates in non-fastlane queue when a link is fastlaned
Previously the messages in the non-fastlane queue were dropped so some
older comments would not be added to the CommentTree. There may be some
lock contention with multiple queue consumers processing updates for the
fastlaned links, but it shouldn't last very long.
2016-11-14 14:48:30 -08:00
Brian Simpson
39630c6432 Remove live config "precomputed_comment_sort_read_chance"
This was used to gradually ramp up reads of the precomputed comment
orders. We've been running for a while with this set to always read,
so the setting can be removed.
2016-11-14 14:48:30 -08:00
Brian Simpson
e4ebb6df4a comment_tree: Eliminate some duplication in calculating scores 2016-11-14 14:48:29 -08:00
Brian Simpson
1f5be6b3a6 _get_qa_comment_scores: Take cid_tree as input
Previously it wasn't clear that the CommentTree would be looked up and
that there might be some consistency concerns.
2016-11-14 14:48:29 -08:00
Brian Simpson
12d5f73a51 comment_tree: Move write_comment_scores to its own function 2016-11-14 14:48:22 -08:00
Brian Simpson
f90ab4aa71 write_comment_orders: Add counters to track writes vs. noops
This will let us get a sense of how much work is actually done. I'm looking
at splitting the CommentOrderer update out into a separate queue and need
to understand how many writes actually happen.
2016-11-14 14:48:16 -08:00
Brian Simpson
b22711866c add_comments: Remove warning about writing scores first
This warning was no longer true--any missing scores are automatically
calculated and updated.

We actually have the opposite issue--the CommentTree must be updated
before writing scores because the QA score reads it.
2016-11-14 14:48:11 -08:00