Commit Graph

108 Commits

Author SHA1 Message Date
xiongchiamiov
fb507e59a6 TryLater: use more generic parameter name
`mature_items` made sense in the original context, but now that I'm stealing it
for other uses it's really just some set of some sort of data.
2015-03-03 15:50:04 -08:00
Jordan Milne
28a913c242 Add backfill script for deleted user accounts 2015-03-03 14:26:22 -08:00
Neil Williams
274a8d7008 Overhaul populatedb script.
This new script attempts to generate some subreddits that are more like
production data.  It first pulls down data from reddit.com, then uses
markov chains to generate new data for insertion into the databases.
2015-03-02 14:44:57 -08:00
Neil Williams
1605b48eda upload_static_files_to_s3: Improve logging clarity.
The goal is to make it seem less like the build is "hanging" during the
upload step.
2015-03-02 10:41:07 -08:00
Neil Williams
30e2256fdd upload_static_files_to_s3: Remove vestigial support for gzipped statics.
This feature was never really used and the core support for it was torn
out in 68857e1a7d.
2015-03-02 10:41:07 -08:00
Neil Williams
64a469e64e upload_static_files_to_s3: Rework to use command line arguments.
* configuration now comes from the command line so it's easier to use
  for multiple projects.
* the bucket is now an s3 url allowing a path prefix to be added to
  files.
* authentication now comes from boto's credential system which allows
  us to use IAM roles.
2015-03-02 10:41:07 -08:00
Neil Williams
4090acd8d8 Remove unused static file cleaner.
It never really worked right and is getting in the way now.
2015-03-02 10:41:07 -08:00
Neil Williams
f501106d9c zookeeper: gzip live config payload.
This takes our current config payload from 4700 bytes to 1700. The goal
is to reduce zookeeper network load during config changes as well as app
restarts during deploys.
2015-03-02 10:41:07 -08:00
Neil Williams
f00e90f0ed zookeeper: Remove obsolete LiveDict class.
This is no longer used since the relevant consumers have switched to
Cassandra as a backing store.
2015-03-02 10:41:07 -08:00
umbrae
0850bd3044 Tracker: URL decode session cookie 2015-02-20 23:58:51 -08:00
umbrae
ea5aa9c538 Tracker: add domain prefix to redirect domain 2015-02-20 21:49:46 -08:00
umbrae
76fb41a3f8 Tracker: add session tracking redirector
This adds in two redirects - `event_click` and `event_redirect` - `event_click`
to allow appending in a user ID to an event before redirect, if we require one,
and `event_redirect` to service a local evented redirect, similar to ad clicks.

`event_click` is necessary for tracking clicks from users on embeds, which are
served via redditmedia, and therefore are always anonymous. When a user clicks
through, we want to know who they were and redirect them on their way. Because
of the way we're using nginx to store events as an access log right now, this
means we'll need to use two redirects: one to append the session ID and
another to store the event with the proper session ID.
2015-02-20 21:23:09 -08: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
Jordan Milne
b1dbd3071d Handle allocation failures in C code gracefully
Thanks to Nathanael A. Hoyle for the report! Some of these may have
been exploitable due to pointer arithmetic before reads / writes.
Just bail out if we can't allocate.
2015-02-02 16:07:13 -08:00
Neil Williams
af09fa8dee Update license headers to 2015.
The highlight of each year for me.
2015-01-08 13:35:03 -08:00
Brian Simpson
5863fb6b8f pixel: Use user id36 rather than user name. 2015-01-06 04:01:12 -05:00
Brian Simpson
00e03edbfd Traffic processing: Validate clicks by checking response code.
Double checking in the click app and in the processing scripts was
difficult. Just trust the click app and assume any request that got
a 302 response is valid.
2014-12-12 17:00:29 -05:00
Brian Simpson
af04006baf click: unquote destination before unmangling query string. 2014-12-10 13:09:19 -08:00
Brian Simpson
966bb14675 Click redirect: fix encoding of destination url.
Some advertisers set their ad's url to an intermediate tracker so
they can independently track clicks. This results in a series of
redirects like this:

reddit tracker > intermediate tracker > final destination

The ad's url is communicated to the reddit tracker through a query
parameter which is urlencoded on reddit.com and then unquoted when
being handled by the reddit tracker. This unquoting causes problems
if there is an intermediate tracker with its own query string
that needs to be urlencoded. This commit adds handling for those query
strings.
2014-12-10 13:09:18 -08:00
Brian Simpson
a2e41ed4a6 click: Don't unquote destination url.
The url is already unquoted correctly and double unquoting can cause
problems with unicode characters.
2014-11-04 09:21:45 -05:00
Brian Simpson
78631fa746 Properly encode arguments for click tracker. 2014-10-09 05:55:50 -04:00
Brian Simpson
4bd2eb6ab8 Remove support for old click and impression hashes. 2014-10-09 05:55:50 -04:00
Brian Simpson
0a67287684 tracker: Delete unused adtracker_url. 2014-10-07 16:21:59 -04:00
Brian Simpson
4a9d7457bd tracker: Use constant_time_compare for hash check. 2014-10-07 16:21:54 -04:00
Brian Simpson
5a012fb789 Support new click and impression hashes that don't include IP.
Support new and old style hashes in verify.c and the click redirect app,
but only generate old style hashes.
2014-10-07 16:21:26 -04:00
umbrae
ee5ea8ca3c Inbox_counts: corrections on deletes, spams, edits
Conflicts:

	r2/r2/controllers/listingcontroller.py
2014-10-03 11:46:48 -07:00
umbrae
aad94d3f80 Inbox counts: fix typo in backfill script 2014-10-03 11:46:45 -07:00
umbrae
09c98d6dde Inbox counts: Add dark unread counts badge, start writing to inbox_count 2014-10-03 11:46:34 -07:00
Brian Simpson
eb9f0ae0e3 PromotionWeights: speed up queries by using distinct.
The queries are used to find the ids of PromoCampaign or Link objects
and we don't need the many (one per campaign per subreddit target per day)
PromotionWeights objects.
2014-10-01 02:44:16 -04:00
umbrae
9361596d68 Register hooks on app load rather than inline 2014-08-23 00:09:05 -07:00
umbrae
c0bff7498b Support 'all' in compute_time_listings 2014-07-17 13:03:13 -07:00
Brian Simpson
c18dcac467 Add subreddit gildings backfill script. 2014-06-11 14:39:06 -04:00
Roger Ostrander
dc68b16776 Trylater: Enable temporary subreddit bans 2014-06-05 14:45:28 -07:00
Brian Simpson
20f57a17eb Add GeoIP service. 2014-05-28 12:57:10 -07:00
Neil Williams
90cfcaaecc Update license headers to 2014.
Ok, now I'm getting some angst in my commit messages like my
predecessors had.  I understand now.  It's a terrible burden.  Why must
the calendar progress?  Why must numbers increment?  The world is
forever turning.

The future is here.

It is 2014.
2014-05-02 16:26:31 -04:00
Brian Simpson
17fcb723fc fetch_trackers: allow up to 100 ids. 2014-04-01 21:41:39 -04:00
Neil Williams
d2ccc40733 Automatically delete password hashes of deleted accounts.
The password hash is no longer necessary once an account is deleted (and
after a period of time for safety in case it needs to be restored)
2014-02-26 12:45:55 -08:00
Roger Ostrander
89762c93f0 Add TryLater: a system for scheduling events. 2014-02-26 12:45:55 -08:00
Chad Birch
7b24dacd77 compute_time_listings MINID query: order by date 2014-02-26 11:44:08 -08:00
Neil Williams
3511b08110 Combine and generalize the time listing precomputer scripts.
Previously, the subreddit/domain and account precomputers were separate.
This merges the two and improves their portability in the process.
Because of the increased portability, the precomputer can now be added
to the install script by default.
2014-02-13 13:50:52 -08:00
Neil Williams
5e249f4773 Make all moderators have a modmsgtime attribute.
This attribute can serve as a handy indicator that a user is a moderator
somewhere and can therefore replace the more costly modship lookup in
reddit_base.
2014-01-12 10:08:07 -05:00
bsimpson63
2a05f17161 No intermediate storage step in mr_process_hour.pig.
Made possible by upgrading pig to 0.10.
2013-12-05 04:04:35 -05:00
Neil Williams
c3c2f200fc read_secrets: Don't transform INI options on output. 2013-11-19 12:43:28 -08:00
Neil Williams
3366083663 Create a vault for secret tokens and move some into it.
This is intended to reduce the number of critical secrets stored in the
INI file.  An initial subset of secrets is moved into the vault to test
things out.
2013-11-19 12:16:58 -08:00
Neil Williams
342ad24409 Factor out INI file parsing into util. 2013-11-19 12:16:58 -08:00
Chad Birch
05c06df947 Userpage gildings tab: start writing
Includes backfill script to be run before the other commit that actually
adds the tab
2013-10-22 12:43:19 -06:00
Max Goodman
aaf1e51abb write-live-config: Update to reflect PluginLoader API change. 2013-10-21 11:37:17 -07:00
Jason Harvey
96fdb4dcb5 Cleanup temp files if dying due to replication lag. 2013-10-07 16:57:18 -07:00
Chad Birch
7722a73d15 Userpage gilded tab: start writing
Includes backfill script to be run before second commit to actually add
tab is deployed.
2013-10-07 15:45:06 -06:00
Neil Williams
f2cf180597 Remove remnants of legacy stylesheet systems. 2013-10-04 11:53:47 -07:00