Commit Graph

5432 Commits

Author SHA1 Message Date
David Wick
6f7fa8aa68 analytics.js: Add optional callback to #fireGAEvent 2015-02-19 14:21:01 -08:00
David Wick
a98e0751e9 Future promos: Hide links after approval
Links that have been approved should be removed from the page when
the sort is "unseen".
2015-02-19 14:20:50 -08:00
David Wick
25c22cb295 Remove reference to /r/promos from user pages 2015-02-19 14:20:08 -08:00
David Wick
c93451d317 Ads: ad creation flow funnel tracking 2015-02-19 14:19:57 -08:00
David Wick
8a38390f26 Add hook for successful ad buys 2015-02-19 14:19:49 -08:00
David Wick
d3dca3ba4a Flagged promotions: display multiple reasons 2015-02-19 14:19:43 -08:00
Trevor Senior
d0beab632e cache: Import random. 2015-02-18 11:37:38 -05:00
Brian Simpson
28e140d05d Message.add_props: Use subreddit attribute set by Builder.wrap_items. 2015-02-18 11:37:32 -05:00
Jordan Milne
6cbbabb9a9 Keep a separate list of subdomains that can't be in c.domain_prefix
I forgot how insanely brittle this bit of code is since I last tried
messing with it last year. At some point we might want to look into
deprecating everything but oauth., the lang subdomains, and www. To
hell with `www.ssl.circlejerk.json.reddit.com`.
2015-02-18 14:50:41 -08:00
Avinash Dwarapu
dc47412df4 Change /{article}/related to /related/{article} in API docs
Frankly surprised this error hasn't been caught...
2015-02-18 14:01:50 -08:00
Brian Simpson
bb07898dcf Use c3.2xlarge instance for EMR hourly traffic log processing. 2015-02-18 03:57:54 -05:00
Chad Birch
bc73cef822 Subreddit creation: add captcha 2015-02-18 13:22:36 -07:00
Chad Birch
6ae6a1e931 Subreddit creation: remove nonfunctional check
This didn't actually even do anything.
2015-02-18 13:21:55 -07:00
Chad Birch
bc1d082a14 Inbox count: add to JSON 2015-02-18 13:21:07 -07:00
Chad Birch
2c8995603a Inbox count: remove feature flag 2015-02-18 13:21:01 -07:00
Chad Birch
18e922f8b2 butler_q: handle CreationError when inserting 2015-02-18 13:20:44 -07:00
Brian Simpson
5ff830f8d4 StaleCacheChain: record cache hits and misses. 2015-02-17 18:09:27 -05:00
Brian Simpson
cd88707fdb cache: Add timers. 2015-02-17 18:09:20 -05:00
Neil Williams
198e67fe97 Reduce gzip threshold for main caches to 1400 bytes.
The goal here is to reduce network traffic to the main cache nodes.
This will also affect the size of the objects in the cache which could
make things better by fitting more things in cache, or make things worse
by oversubscribing specific slabs. We should watch network traffic on
the cache nodes, hit rates, and eviction rates in the period after
rolling this out. Additionally, this will increase the amount of
gzipping app servers deal with, so response times and CPU should be
monitored as well.

I chose 1400 bytes to be a fudge-factor smaller than the MTU; since the
goal here is network efficiency and not cache memory space, going
smaller than a single packet isn't terribly important.
2015-02-13 17:49:29 -05:00
Brian Simpson
705c4f1992 inventory: Correctly retrieve transactions for freebie campaigns. 2015-02-13 15:04:02 -05:00
John-William Trenholm
9e64e56960 tracker.py: use env var for configuration file
Upstart needs to use a environment variable to determine the
configuration file.
2015-02-12 16:00:04 -08:00
Neil Williams
f94e9cc14e install-reddit: Upgrade Cassandra and use DataStax repos.
This modernizes install-script reddit a bit, as we're already running
1.2 in production.

Note: this upgrades Cassandra from a patched 1.0.7 to vanilla 1.2.19. Please see
http://www.datastax.com/documentation/cassandra/1.2/cassandra/upgrade/upgradeC_c.html
for instructions on upgrading which may require some upgrades of the
data on disk.
2015-02-12 13:27:32 -08:00
Neil Williams
f869f10dbc tdb_sql: Upgrade uses of deprecated last_inserted_ids().
This function gets removed in SQLAlchemy 0.8 in favor of the already
present inserted_primary_key.
2015-02-12 13:27:32 -08:00
Florence Yeun
5712c98f37 Hide inbox notifications for user's own comment and post replies
Fix bug where your own comment and post replies appear in your inbox.
New notifications are no longer generated.  Old notifications will remain.
2015-02-12 11:56:21 -08:00
penn300bb
aa698dd807 Fix uri & extensions of the /duplicates endpoint
The order was backwards.

```
/{article}/duplicates --> /duplicates/{article}
```

Switched the order, and added in the proper extensions.

Referenced in: https://www.reddit.com/r/redditdev/comments/2vbnkt/sample_curl_call_for_articleduplicates/
2015-02-12 13:38:26 -05:00
Brian Simpson
29d3c53369 Query: Use a 7 day ttl for caching. 2015-02-11 14:52:08 -05:00
Brian Simpson
720a99ea70 Thing: Use a 7 day ttl for caching. 2015-02-11 14:52:03 -05:00
powerlanguage
f2ccc78086 Fix long usernames breaking snoovatar link. 2015-02-11 11:38:37 -08:00
powerlanguage
6eb1dbcaf3 Style sidebar snoovatar link. 2015-02-11 11:37:20 -08:00
MelissaCole
2b84cc0439 Add snoovatar link on userpage of those with public snoovatar and gold. 2015-02-11 11:36:59 -08:00
MelissaCole
bb96aad266 Add creddits to purchase price in gold checkout
This will appear as '$3.99 or 1 creddit' if the user making the purchase
already has creddits. This will hopefully reduce confusion about the
ability to purchase gold with creddits.

Suggested by /u/roastedlasagna: https://www.reddit.com/r/ideasfortheadmins/comments/2s7ktf/giving_gold_allow_a_user_to_give_another_user/cnn6jhn
2015-02-11 11:27:02 -08:00
powerlanguage
d012d21f51 Add transparency to goldvertisment graphic. 2015-02-11 11:27:02 -08:00
Brian Simpson
966d9519b1 cache: Log events for retry successes.
This will help us determine if multiple retries are worthwhile.
2015-02-11 00:11:03 -05:00
Ricky Ramirez
46167ecb88 pages: Use a hashed key for commentpane.
The previous method could generate key names with whitespace which don't work
with the memcache ASCII protocol.
2015-02-11 10:31:38 -08:00
umbrae
42ca7212e5 Make restrict_sr on search retain state across page views.
This commit heavily influenced by @samertm's work
in https://github.com/reddit/reddit/pull/1211
2015-02-09 20:58:32 -08:00
Florence Yeun
4030b68c6d Revert "Hide inbox notifications for user's own comment and post replies"
This reverts commit 309dad8e1a.
2015-02-09 16:39:33 -08:00
Brian Simpson
21d3f1258a CachedQuery._prune: calculate newest_prune only if items exist. 2015-02-09 18:03:23 -05:00
Brian Simpson
460c93aca4 CachedQuery: on prune attempt to remove the entire row with a timestamp.
Performing a row delete (even if some columns are left behind due to higher
timestamps) might have better tombstone performance than deleting specific
columns from that row.
2015-02-09 18:03:14 -05:00
Brian Simpson
7f6232e4ce Read from CommentVisitsByUser and stop writing hardcache. 2015-02-09 18:03:01 -05:00
Brian Simpson
fdc2a2cf77 Dual write hardcache and CommentVisitsByUser. 2015-02-09 18:02:49 -05:00
Florence Yeun
309dad8e1a Hide inbox notifications for user's own comment and post replies
Fix bug where your own comment and post replies appear in your inbox.
Notifications are still generated but not displayed.
2015-02-09 14:43:19 -08:00
Florence Yeun
93b904a51c Prevent duplicate inbox messages
Fix bug where sending a message to yourself results in a duplicate inbox message.
2015-02-09 14:43:19 -08:00
xiongchiamiov
f75599579e Thumbnail scraper: handle protocol-relative urls
`urllib2` by default doesn't handle protocol-relative urls, nor can it without
access to the context in which the url was created.  This has been causing
problems with scraping thumbnails from pages where the `og:image` attribute
uses a protocol-relative url, as reported in reddit/reddit#1069 and
[/r/bugs](http://redd.it/2q62g2).

Now we coerce any protocol-relative urls we extract from the page into the same
protocol as the page itself.
2015-02-06 09:13:02 -08:00
xiongchiamiov
8d2a668c5b Utils: add coerce_url_to_protocol()
Sometimes we have a url that may or may not be using the protocol we want.  In
those cases, it's nice to have a handy way to ensure the protocol.
2015-02-06 09:13:01 -08:00
Keith Mitchell
4a9d45a878 API: Add 'archived' attribute to Links & Comments 2015-02-04 16:40:25 -08:00
Keith Mitchell
2b5b10dd23 /dev/api: Stop documenting non-OAuth2 endpoints 2015-02-04 15:50:09 -08:00
Keith Mitchell
18240366df /dev/api: Document additional endpoints
* sticky
* sidebar
* related
* duplicates

Are now lightly documented on /dev/api.
2015-02-04 15:50:01 -08:00
Jordan Milne
436281f88e Fix link generation on oauth.
When on `foo.oauth.reddit.com`, we want to generate links like
`foo.reddit.com`
2015-02-04 11:27:30 -08:00
KeenRivals
d6358c7484 Losslessly reduced PNGs with Optipng and Advancecomp. Only PNGs that were referenced in less files that were not commented as sprites were reduced. 2015-02-03 06:16:59 -08:00
Florence Yeun
817aecef1a Disable voting when page is in read only mode
Voting should not be available when a page is in read only or heavy load mode.
This prevents a blank modal from appearing when voting on a post or comment.
2015-02-03 15:15:28 -08:00