Commit Graph

41 Commits

Author SHA1 Message Date
Neil Williams
e028c35676 Add a new listing of gilded comments. 2012-12-14 12:52:36 -08:00
Jason Harvey
8b4b3961d9 Rework queries and add sanity checks. 2012-12-07 14:09:24 -08:00
Neil Williams
efa3bb4009 Add migration script for regenerating CommentParticipationByAccount CF. 2012-12-04 11:41:24 -08:00
Neil Williams
68291521b5 Move query_cache scripts to a more general "migrate" directory.
Not just for the query cache anymore!
2012-12-04 11:41:24 -08:00
Jason Harvey
d476208e38 Re-work the gen_time_listings query WHERE clause. 2012-11-15 15:22:55 -08:00
Neil Williams
e3952a5555 Add script for cleaning up the static files bucket on S3. 2012-11-08 15:04:25 -08:00
Neil Williams
8fc311487d Add a Pig-based map/reduce system for filling the new query cache. 2012-10-19 12:56:17 -07:00
maxwellhansen
ca39abfa9b upload_static: Use dictionary comprehension for readability. 2012-08-13 10:21:37 -07:00
Neil Williams
f495dad2a8 Add ZooKeeper-based dynamic configuration system.
The dynamic configuration system has two components: the app, which
reads, and the writer script. The latter is meant for use by humans, and
converts a [live_config] section of the INI file into JSON for storage
in ZooKeeper. The app will read this data on startup and place a watch
on the node to be notified, by ZooKeeper, of changes. This means that
running the writer script with new data will automatically propagate the
changes to every app very quickly, without restart.

The writer script relies on a human-entered password to authenticate
with ZooKeeper. The reddit app uses a different set of credentials
(specified in the INI file) to obtain read-only access to the
configuration data.

Also adds a new "live_config" spec to reddit and plugins. This spec is
parsed at write-time only and the parsed values are stored as JSON in
ZooKeeper.
2012-08-02 17:14:36 -07:00
Neil Williams
914b949286 Update / add license headers.
I'm actually quite excited to do this.
2012-06-19 14:02:42 -07:00
Neil Williams
165cd3c62e Delete old scripts, daemontools run files, and configs.
NOTE: if you're using an old-style install with symlinks to any of these
files, please make sure to copy them out of the repo before merging this
commit.
2012-06-18 15:13:56 -07:00
Neil Williams
da3bd2ee69 Get rid of problematic buffering in job wrapper. 2012-05-31 15:57:57 -07:00
Neil Williams
533e695d55 Tweak wrap-job to support queue consumer naming conventions. 2012-05-31 15:57:57 -07:00
Neil Williams
5c80560e51 Add script for starting/restarting queue consumer jobs. 2012-05-31 15:57:57 -07:00
Neil Williams
1c1863e464 Add script to wrap cron jobs. 2012-05-29 12:15:59 -07:00
Keith Mitchell
c209cc2f32 Switch to cloudsearch as primary search provider
Also, remove unused indextank files
2012-05-15 08:21:01 -07:00
Neil Williams
ab6be6c95f Make static file uploader use custom ini file for S3 credentials. 2012-04-17 16:00:55 -07:00
Keith Mitchell
3ff6d3a66c Avoid iri_to_uri in flask redirect 2012-02-09 11:54:24 -08:00
Neil Williams
d48284c4cf Make mr_top jobs more portable. 2011-12-15 22:16:26 -08:00
David King
a39f0bcc8f Update cron scripts to reflect reality.
Still out of date, but less so.
2011-12-15 22:16:26 -08:00
Neil Williams
10d19f3140 Make S3 uploader aware of bizarre .gzip extension. 2011-11-29 16:23:28 -08:00
Neil Williams
ab243a7bcd upload_static: Put the unmangled files on S3 as well. 2011-11-15 15:03:59 -08:00
Neil Williams
af61995c48 Add script for uploading static files to S3. 2011-11-14 20:45:01 -08:00
Neil Williams
93a65a6a3a Move onload out of the app.
We need onload to be able to get a client-IP based
tracking validation hash, but it doesn't actually need
to do any database work to make those hashes. It also
fails a huge number of times per day. This moves the hash
calculation out to an external app with no db dependencies.
2011-10-06 08:22:16 -07:00
Neil Williams
79b95b085e Add simple app for redirect validity checking. 2011-08-17 15:36:06 -07:00
Neil Williams
2cc640e708 Move subreddit name search to its own CF.
Subreddit name search is used for recommending
subreddits to users as they type a name on the
submission page.

Also adds a missing script that is needed
to load up the subreddit names into cassandra.
This script should be run occasionally (we do it
once per day) to fill/update the search cache.
2011-06-27 15:40:46 -07:00
Neil Williams
68a06c568b April 2011 Merge
* Show "this post is archived" message for things we won't allow votes on.
* Don't mark messages read when pulled via RSS
* Make compact (smartphone) interface respect user's toolbar
* preferences.
* Make mobile interface more friendly for kindles.
* Fix bug that caused comment tree corruption.
* Use cachebuster on traffic pixel for more accurate tracking.
* Make apps restart themselves after a configurable number of requests.
* Move to pycassa 1.0.8.
* Fix bug in calculations for "best" sort.
* Fixes for Firefox Mobile
* Add a global flag to disable editing of the wiki.
* Move the child-comment collapse button to the left.
* Updated list of disallows in robots.txt to save needless hits from
  crawlers.
* Fix vote_q by splitting it into vote_link_q and vote_comment_q.
* Fix bug where /reddits crashes due to 'promos' subreddit.
2011-04-18 16:30:48 -07:00
ketralnis
37e2ba9892 * Combine cassandra clusters into a single one
* Add a new Cassandra CF for comment-sort caching
* Add JSONP support
* Support non-auto-renewing PayPal IPNs
* Gold accounting
* Gold features: comments tracking, larger comment limit
* Autorenewing gold
* Google checkout support
* Profile-page sorting for all
* Title-text on the logo
* Hardcache sharding and profiling
* Self serve enhancements
* Add /r/foo/faq
* Make self-centred reddits allow for more verbose selftext
* Much better down-handling of databases
* Add the ability to take a thread-dump from a running process
* Remove the comscore tracker
* Add comments to modqueue (does not back-populate)
2010-10-18 11:52:44 -07:00
ketralnis
0ae8f2fb96 21 Jul 2010 merge
* Use Flaptor's Indextank product for search, including santip's patch
* for their new API
* Add Cassandra ConsistencyLevels to the ini file, and storage-conf.xml
* to the public repo
* Patch contributed by umbrae in ticket #929: Add jumpToContent support
* for Keyboard Accessibility
* reddit gold
    - paypal/postcard support
    - friends with benefits
    - profile-page sorting for gold members
    - move domain listings into the permacache
2010-07-21 17:48:12 -07:00
Christopher Slowe (KeyserSosa)
52da322156 Bugfixes:
* no-repeat on some background images in the sprite (#797)
     * fix deleted comments on the mobile site -- preserve author anonymity (#624
     * faulty permalinks on pages with all unicode title (#776)
     * no more spreadshirt
     * reorganize comment_tree and _builder.pyx to clean up cache handling
     * fix styling for Bug #78
     * Improve handling of /r/all+all (bug #699), etc (not always a 400 now)
     * Fix the time listings: sometimes we get passed unicode for self.time
     * Don't allow private reddits to show in /r/random
     * Try to allow remote sites to show their own favicons in the reddit
        toolbar

  Speed improvements:
  * CommentBuilder refactor rount 1:
     * create new sort and parent permacache entries so that we don't need to loa
     * update sorts and parents when a new comment comes in
     * update non-date sorts when a new comment vote comes in
     * add more trace info to timeouts in CommentBuilder
  * Some misc. performance hacks (incl. adding _utils.pyx)
  * Increase SR description box limit from 1k to 5k
  * Fix a bug where we weren't properly allowing hidden items to be hidden
    on time-filtered listings
  * Make Subreddit._by_name take a list of names like byID
  * Upload thumbs to S3 with reduced_redundancy==True
  * make rss feeds without a 'feed' get parameter act as if the user is not logged in
  * Require a boto that knows about reduced_redundancy
  * remove fast_queries from Message.add_props and put the onus on fetching the unread messages from the permacache
  * Store the list of popular subreddits in the permacache
    * make SubredditTopBar cacheable per-user.
  * add (as safe as we can make it) annotation for sql selects to track down requests hitting the db when they shouldn't be.

 User submitted features:
  * Merge and clean up Phire's selfs-only/no-selfs patch.

  * Don't show expired items on time-filtered controversy listings

  * Also add the 'hide' button to the toolbar just for breakneckridge.
    Next time someone calls me prickly, breakneckridge had better step
    up to the plate for me or I'm rolling it back.
2010-06-25 17:36:51 -07:00
KeyserSosa
9a4271f641 Upgrade Instructions
====
   * Uninstall the python Cassandra package that we previously depended on (it has a namespace conflict with the new package we depend on).  To find it:

     $ python -c "import cassandra; print cassandra.__file__"

    and rm -r the .egg directory after "site-packages/"

   * This version relies on cython, so if "make" fails, you may have to install cython via your distro's package manager.

     $ cd reddit/r2
     $ python setup.py develop # possibly with "sudo" depending on your install
     $ make

   * Cassandra is now required for the caching layer.  An example storage-conf.xml can be found in reddit/srv/cassandra.  Make sure that the additional <Keyspace> items are included in your conf file.

   * remove the query_queue_reader services if they are running.  add new gen_time_listings.sh instead.  Suggested cron:

    0    */2 *   *   *   $SCRIPTS/gen_time_listings.sh year '("month","year")'
    */5  *   *   *   *   $SCRIPTS/gen_time_listings.sh week '("day","week")'
    *    *   *   *   *   $SCRIPTS/gen_time_listings.sh hour '("hour",)'

   where $SCRIPTS is the location of this script directory

Features and Bugfixes
====
 * Mobile reddit:
   * templates are in r2/templates of the form *.compact
   * css is r2/public/static/css/compact.css
     * beginning of a sass-based (http://sass-lang.com/) compact.scss
   * reachable via .compact extension or from the "i" subdomain.
 * Cassandra is now *required*, and votes are currently written out to both cassandra and postgres (part of an eventual migration).
 * attempt to make the db connection code a little smarter.
   * A dropped DB connection will mark the connection dead and randomly attempt to reconnect.
   * A dropped db connection on start will permanently mark the connection as dead.
 * Calculate the time-filtered top/controversy listings using mapreduce instead of prec_links (new cron job in reddit/scripts)
 * allow default user/pass for database to be specified with '*' to fallback on db_user and db_pass in the INI file
 * Search feedback buttons
 * make deleted comments not show up in your inbox.
 * move last_visited into cassandra
 * Swallow rare, race-conditiony POST_save/hide/subscribe problems
 * Apparently we haven't been breaking properly for the past few weeks.
2010-06-16 17:01:50 -07:00
KeyserSosa
08c431bd85 * Comply with the spec on 304 errors so Chrome won't barf download.gz all over the place
* The error pages have been broken for the past week.
 * Fix /r/all+all
 * Provides about.json to the api for subreddits (it already works for users)
 * Make sure Accounts have data before checking their name and msgtime
 * new bigger arrows for mobile site and a the alien is fingerless now
 * Try to update the _fast_query_timestamps less often to alleviate some of the load it causes on the Accounts DB
 * Swallow rare, race-conditiony POST_save/hide/subscribe problems
2010-05-28 14:55:13 -07:00
Jeremy Edberg
253c4730f9 * Add services and scripts to public repos for ease of reddit installation
* bring discount up to date
 * fix consistency errors in the self-serve traffic page
2010-05-18 16:43:06 -07:00
Jeremy Edberg
e6838895e0 New Features
* Two new 404 aliens
    * enable a comment page cache if the user isn't author of any of the comments and the page is a non-permalink.  votes and friends are updated by javascript

    Additions
    * descriptive example.ini
    * create "trusted_sponsor" who get auto-accepted
    * split off url cache from the permacache, with major clean-up to app_globals
    * Move is_banned_domain() call into POST_submit() so it can take the sanitized url
    * Redirect /r/asdfasdfasdf to the search page, not the create page.
    * updates to draw_load.py
    * orangered envelope goes to unread, not all.
    * Remove "enable whitelisting" checkbox, and switch to new failiens
    * Put verification link on email prefs page

    Bugfixes:
    * split off a minimal api controller for onload calls (which don't care about c.site or c.user, making them cheaper)
    * Assume admins want to keep their cookies forever just like everyone else
    * /randomrising bugfix
    * JSON error page was rendering in html.  it now returns "{ error: ${code} }"
2010-05-17 13:31:25 -07:00
ketralnis
67814d543b Features:
* Cassandra
      * Add new cassandra libraries that we'll need to setup.py
      * Select Cassandra seeds at random rather than in order
      * Bugfix in CassandraCache.delete and a faster permacache migration function
      * Like other caches, CassandraCaches need to be able to take (and ignore) a 'time' parameter
      * add Cassandra to the permacache chain
    * beginning of jury duty (later called deputy moderation)

    Additions:
    * Make /r/friends much cheaper at the expense of sorting
    * Add Jury.delete_old(), which removes Account-Trial relations > 3 days old
    * Make the pretty_button() template function's callback optional, so that
      actionless pretty-buttons can be used on the admin details page
    * make .embed listings work for permalink pages (think of this as a first pass to getting blog comments working).  Adds 'limit' and 'depth' parameter to permalink pages
    * Added final redditheader.html pretty-button class
    * new iframe ads; also make button.js static
    * Usage sampling

    Bugfixes:
    * Stop adding batched time query recalculations to the queue at all except through the catch_up_batch_queries function
    * Superflous comma might be causing IE7 to barf
    * Change the byurl keys again, to fit in memcaches 251 character limit
    * Indentation error causing non-sponsors to be able to get to the advert listing
    * Move to a custom build of pylibmc that doesn't hold the GIL during blocking operations
    * Convert some cache.gets to cache.get_multis, and implement our own thread-safety around pylibmc's client
    * Make search caching a little smarter for time searches
    * Make the ads not be cached for 30 seconds each, ie. more random
    * fix deleted things on profile pages
2010-05-17 13:27:59 -07:00
Mike
a402d48de3 New features:
* Discount 1.6.1
      * Lines beginning with spaces are considered code. I don't know why markdown.py didn't trigger this.
      * tables in mark down: why not?
      * validation of resulting HTML vial libxml to prevent hax.
    * private RSS and JSON feeds
    * optional whitelists for subreddits
    * Moderator messaging

    Additions:
    * destination sanitization to cut down on XSRF
    * cosmetic fix to spam and reported listing
    * make the rss feeds on messages useful
    * /admin/errors
    * Of the types of listings hitting the precomputers (top/controversy by hour/day/week/month/year), the ones over long periods of time don't change often. So we can try to run them at most once per day, and then merge in the day's listings.
    * google analytics
    * logging queue
    * Created empty commentspanel.xml, errorpage.xml, login.xml
    * add subreddit rules/info box to submit page
    * add 'via' link on messages in moderator inbox
    * add a show=all get parameter to link listings to optionally ignore hiding preferences.
    * Raise edited timelimit to three mins
    * Remove UI that makes it look like you can edit deleted selftexts
    * Make it clearer to admins when a link is deleted
    * Fix [S] leak on deleted comments
    * Fix /user/[deleted] misrendering
    * New house ads system
    * updated so that minimalcontrollers actually can use the page cache.
    * Added /admin/usage

    Bugfixes:
    * Reduce the number of results that we request from Solr and simplify that caching a bit
    * Require a secret key to shut down app-servers
    * Make get_title a little more resilient to malformed documents and slow remote servers
    * Cause the SearchBuilder to only byID the results that it's going to render instead of all 1000
    * Remove ability for an author to XSS himself
    * fix spam listings and an xsrf
    * More verbose VDestination
    * Fixing the famous ?limit=0.1 error, and one last password-validation one
    * distinguish deleted comments' and deleted links' error messages
    * Don't allow ridiculously long log lines to widen the page
    * Bug with HardCache.add() when existing key is expired
    * Add adminbox next to domain
2010-05-17 13:27:40 -07:00
spez
09045d987d add a couple more ad reddits 2009-05-03 22:41:58 -07:00
spez
c837ef147c update copyright strings. show star on admin comments after they've been editted 2009-02-11 13:54:09 -08:00
spez
ad38d86315 ad technology ad file 2008-10-21 11:52:13 -07:00
shuffman
cea93dbd30 added music ad tag 2008-07-22 12:05:32 -07:00
KeyserSosa
4778b17e93 initial checkin 2008-06-17 19:00:27 -07:00