Commit Graph

7889 Commits

Author SHA1 Message Date
Brian Simpson
fd9e8b4e41 Split processing for Link votes and Comment votes 2016-10-26 11:54:01 -07:00
Brian Simpson
22de659e23 link.py: Move cast_vote import to within method
This gets around some circular import issues and is simpler than changing
the imports in voting.py.
2016-10-26 11:29:36 -07:00
Brian Simpson
329b3c1c8e LocalCache.simple_get_multi: Use exception handling to get keys
Doing the 2 step process of:
1. check for existence of key
2. get key

introduces a race condition if the key is deleted between the two steps.
2016-10-25 11:25:36 -07:00
Brian Simpson
2fdddb69e4 raven: Specify all application code path prefixes
The raven client inspects the traceback and attempts to figure out which
parts belong to the app and which belong to external libraries. It uses
a whitelist of paths to identify application code. Previously we had been
using the list of repository names, but that was incorrect because the
plugin "liveupdate" is actually called "reddit_liveupdate" in the traceback.
The whitelist was also incomplete because it didn't account for scripts run with
paster run which can have a path like /opt/something/script.py.
2016-10-19 16:34:43 -07:00
Brian Simpson
1d0dda280a compute_time_listings: Report exceptions to Sentry 2016-10-19 16:34:22 -07:00
Brian Simpson
3328493ef5 RunCommand: Report exceptions with RavenErrorReporter 2016-10-19 16:33:24 -07:00
Brian Simpson
48930b80c5 RavenErrorReporter: Don't install_sys_hook
This creates a sys.excepthook handler that reports any exceptions
to Sentry. This results in double reporting errors when in script
mode because the exception is re-raised and caught by that handler.
2016-10-19 16:33:24 -07:00
Brian Simpson
6c7c5df58e RavenErrorReporter: handle exceptions in script mode 2016-10-19 16:33:19 -07:00
Prashant Singh
40625dcc07 Add page-based experiment support
We can conduct experiments that impact how pages are rendered across
users, bucketing pages according to the fullname, so that search engines
will crawl and index the same experimental content that users see. We
support subreddit listings pages, comments pages, and comment permalink
pages. We use the link fullname for both comments pages and comment
permalink pages, so that they are bucketed together.
2016-10-19 15:52:38 -07:00
Prashant Singh
098d047e8a Tell crawlers not to index comment permalink pages
We don't want to spend crawl budget or rank on what are essentially
duplicate pages. In case we have inbound links to these pages, we don't
want the robots.txt to prevent crawlers from accessing them.
2016-10-19 15:20:22 -07:00
William Ting
94a70830be Add automatic search engine integration.
This adds the required metadata and files to support automatic search engine
additions to Chrome / Chromium.
2016-10-18 10:15:20 -07:00
Daniel Ellis
d5992d6a30 Remove memcached deletion from hardcache cleanup. 2016-10-12 11:06:29 -07:00
Dan
8b31ebc99b Remove hardcache cache. 2016-10-12 10:00:01 -07:00
Matt Lee
da54902795 reddit.js: Don't submit disabled forms in post_form 2016-10-07 17:48:13 -04:00
Matt Lee
8fb3e9106d errors.js: Add r.errors.create method
Makes creating errors consistent with the formatting of API errors on
the client side easier.
2016-10-07 17:48:13 -04:00
Matt Lee
45b7989556 mixins.less: Add moz and ms prefixes to animation 2016-10-07 17:48:12 -04:00
Matt Lee
f61ba21bc0 POST_fetch_title: Send title in json response data 2016-10-07 17:48:12 -04:00
Matt Lee
d003c3a4fc JS: Add actions.js 2016-10-07 17:48:12 -04:00
Matt Lee
1d467eed70 Add callback to r.analytics.sendEvent 2016-10-07 17:48:12 -04:00
Matt Lee
381d2a0ca3 Events.js - use callback if supplied 2016-10-07 17:48:12 -04:00
Matt Lee
8cb8cd4ca6 Wrap js config in scriptsafe_dumps 2016-10-07 17:48:12 -04:00
Matt Lee
ad69953293 r.syncedSessionStorage: Get values from e.originalEvent
The jQuery event doesn't expose the storage key or newValue attributes.
2016-10-07 17:48:12 -04:00
Matt Lee
e946fa3b58 Use jQuery to bind storage event listener
I suspect that IE8 is throwing some errors here because of this.
2016-10-07 17:48:12 -04:00
Matt Lee
107cf63841 fixup: Prevent error while instantiating r.syncedSessionStorage 2016-10-07 17:48:12 -04:00
Matt Lee
5db40de34f Fix expando events on previews getting wrong provider 2016-10-07 17:48:12 -04:00
Matt Lee
c23a188774 Analytics: Allow defining events outside of analytics.js
Conflicts:
	r2/r2/public/static/js/analytics.js
2016-10-07 17:48:11 -04:00
Matt Lee
ad08159fc8 JS: Add r.syncedSessionStorage 2016-10-07 17:48:11 -04:00
Matt Lee
01ce8b5810 Expando: Use sprites for new expando icons 2016-10-07 17:48:11 -04:00
Matt Lee
95d53d1d79 Sprites: Add support for hdpi sprites to nymph.py
Adds another optional argument to sprites to set the desired pixel
ratio.  HDPI sprites are added to the spritesheet normally, and the
pixel ratio scales the background position and size rules.
2016-10-07 17:48:11 -04:00
Matt Lee
c074762917 Add media_previews feature state to link cache key 2016-10-07 17:48:11 -04:00
Matt Lee
b288e1a787 Screenview Event: Add beta participation field 2016-10-07 17:48:11 -04:00
Matt Lee
a91e867fa3 Expando NSFW Flow: Update styles 2016-10-07 17:48:11 -04:00
Matt Lee
befa39c4af Wrap preview images in link 2016-10-07 17:42:43 -04:00
Matt Lee
acefcc103d Expando: Add media prefs to events 2016-10-07 17:42:43 -04:00
Matt Lee
7d3217a5b0 Expando: Do not float
Expandos got a css rule added to them to support the NSFW interstitial
flow, but this caused some unintended bugs with subreddit CSS.  The
positioning of the interstitial's button on the media preview overlay
is dependent on the floating, so this moves the application of the
float rule to a child element on media previews only so the expando
element itself can remain unfloated.
2016-10-07 17:42:43 -04:00
Matt Lee
7770ad7f9b Expando: Really fix position of new icons 2016-10-07 17:42:43 -04:00
Matt Lee
918a7872dc Expando: Fix position of new icons 2016-10-07 17:42:43 -04:00
Matt Lee
fcee900fe7 Expando: Feature flag nsfw flow 2016-10-07 17:42:43 -04:00
Matt Lee
f9a4bebb2f Expando: New NSFW media flow
Conflicts:
	r2/r2/lib/template_helpers.py
	r2/r2/templates/link.html
2016-10-07 17:42:42 -04:00
Matt Lee
749ee7c22e Expando: Update icons under feature flag 2016-10-07 17:42:42 -04:00
Matt Lee
bfd5a327c1 Media Previews: Show for direct image links 2016-10-07 17:42:42 -04:00
Matt Lee
900ba93e9a Feature flag media previews 2016-10-07 17:42:42 -04:00
Matt Lee
ebac4439f1 Show media preview images 2016-10-07 17:42:42 -04:00
Matt Lee
e0c16b8714 Feature flag auto-expanding media previews
Conflicts:
	r2/r2/models/link.py
2016-10-07 17:42:42 -04:00
Matt Lee
2fba350079 Add preferences for auto-expanding media previews
Conflicts:
	r2/r2/models/link.py
2016-10-07 17:42:42 -04:00
Neil Williams
64813ada66 Update baseplate integrations
This syncs with the changes in baseplate to diagnostics for OpenTracing
consistency.
2016-10-06 16:49:24 -07:00
Brian Simpson
21ee09a107 RavenErrorReporter: set user and oauth data in user_context 2016-10-06 13:40:47 -07:00
Chad Birch
414f9535b0 Remove multiple-sticky transitional code
Subreddit sticky posts (announcements) were originally implemented with
only allowing a single sticky to be set. When we added support for a
second sticky, there was some transitional code added that would handle
automatically converting the old single sticky to the new storage format
for multiple.

Everything's been long converted now, so this is no longer necessary to
keep around.
2016-10-06 13:10:36 -06:00
Brian Simpson
fd17945edf Delete log_q 2016-10-04 13:45:11 -07:00
Brian Simpson
5d75e3e5b9 Delete log_text()
This fed non-Exception events into /admin/errors. None of these have been
actively monitored for years. If we do care about monitoring stuff like
this we should use graphite or Sentry.
2016-10-04 13:44:37 -07:00