Skip to content

Commit

Permalink
Fixes bug 1318534 - Added a lot of deprecation warnings to API endpoi…
Browse files Browse the repository at this point in the history
…nts. (#3597)
  • Loading branch information
adngdb committed Dec 15, 2016
1 parent 746b3b4 commit b00275c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions webapp-django/crashstats/crashstats/models.py
Expand Up @@ -44,6 +44,12 @@
from crashstats.api.cleaner import Cleaner


DEPRECATION_RAMPAGE_WARNING = (
'This endpoint is deprecated and will soon cease to exist.\n'
'Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1314814'
)


logger = logging.getLogger('crashstats_models')


Expand Down Expand Up @@ -729,6 +735,8 @@ def get_all(self):
class CrashesPerAdu(SocorroMiddleware):
# Fetch records for active daily installs.

deprecation_warning = DEPRECATION_RAMPAGE_WARNING

URL_PREFIX = '/crashes/daily/'

required_params = (
Expand Down Expand Up @@ -762,6 +770,8 @@ class CrashesPerAdu(SocorroMiddleware):

class TCBS(SocorroMiddleware):

deprecation_warning = DEPRECATION_RAMPAGE_WARNING

URL_PREFIX = '/crashes/signatures/'

required_params = (
Expand Down Expand Up @@ -1053,6 +1063,8 @@ def get(self, **kwargs):

class CrashesByExploitability(SocorroMiddleware):

deprecation_warning = DEPRECATION_RAMPAGE_WARNING

URL_PREFIX = '/crashes/exploitability/'

required_params = (
Expand Down Expand Up @@ -1185,6 +1197,8 @@ def get_dates(self, signatures):

class SignatureTrend(SocorroMiddleware):

deprecation_warning = DEPRECATION_RAMPAGE_WARNING

URL_PREFIX = '/crashes/signature_history/'

required_params = (
Expand Down Expand Up @@ -1281,6 +1295,8 @@ def get(self, bugs):

class Correlations(SocorroMiddleware):

deprecation_warning = DEPRECATION_RAMPAGE_WARNING

URL_PREFIX = '/correlations/'

required_params = (
Expand All @@ -1300,6 +1316,8 @@ class Correlations(SocorroMiddleware):

class CorrelationsSignatures(SocorroMiddleware):

deprecation_warning = DEPRECATION_RAMPAGE_WARNING

URL_PREFIX = '/correlations/signatures/'

required_params = (
Expand All @@ -1319,6 +1337,8 @@ class CorrelationsSignatures(SocorroMiddleware):

class CrashesCountByDay(SocorroMiddleware):

deprecation_warning = DEPRECATION_RAMPAGE_WARNING

cache_seconds = 60 * 60 * 18 # 18 hours of cache should be good.

URL_PREFIX = '/crashes/count_by_day/'
Expand Down

0 comments on commit b00275c

Please sign in to comment.