If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Move input.stage's product_details_json dir somewhere that does not conflict with the checkout

RESOLVED FIXED

Status

mozilla.org Graveyard
Server Operations
--
major
RESOLVED FIXED
7 years ago
3 years ago

People

(Reporter: wenzel, Assigned: oremj)

Tracking

Details

(Reporter)

Description

7 years ago
The reporter codebase comes with some JSON files, but we also run a cron job to update those on the fly. We should put the data somewhere else so the cron job does not interfere with the checked-out code.

- First, create a dir somewhere
- change PROD_DETAILS_DIR in settings_local.py to point to that dir
- run ``./manage.py update_product_details`` as the user that runs that as a cron job (so we don't get permission issues later)
- ``git checkout lib/product_details_json/*`` to reset the files to what the checkout contains.

Thanks!

Updated

7 years ago
Assignee: server-ops → shyam
(Assignee)

Updated

7 years ago
Assignee: shyam → jeremy.orem+bugs
(Assignee)

Comment 1

7 years ago
Seeing:


>Traceback (most recent call last):
>  File "/data/www/input.stage.mozilla.com/reporter/manage.py", line 47, in <module>
>    execute_manager(settings)
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/core/management/__init__.py", line 438, in execute_manager
>    utility.execute()
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/core/management/__init__.py", line 379, in execute
>    self.fetch_command(subcommand).run_from_argv(self.argv)
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/core/management/base.py", line 191, in run_from_argv
>    self.execute(*args, **options.__dict__)
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/core/management/base.py", line 209, in execute
>    translation.activate('en-us')
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/utils/translation/__init__.py", line 66, in activate
>    return real_activate(language)
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/utils/functional.py", line 55, in _curried
>    return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/utils/translation/__init__.py", line 36, in delayed_loader
>    return getattr(trans, real_name)(*args, **kwargs)
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/utils/translation/trans_real.py", line 193, in activate
>    _active[currentThread()] = translation(language)
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/utils/translation/trans_real.py", line 176, in translation
>    default_translation = _fetch(settings.LANGUAGE_CODE)
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/utils/translation/trans_real.py", line 159, in _fetch
>    app = import_module(appname)
>  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/utils/importlib.py", line 35, in import_module
>    __import__(name)
>  File "/data/www/input.stage.mozilla.com/reporter/apps/feedback/__init__.py", line 36, in <module>
>    FIREFOX: product_details.firefox_versions['LATEST_FIREFOX_RELEASED_DEVEL_VERSION'],
>AttributeError: 'module' object has no attribute 'firefox_versions'
(Reporter)

Comment 2

7 years ago
Crap :( copy the json files from lib/product_details_json/*.json into your new target dir once, then run this command again.

I really need to make this library not throw ImportErrors when the json files are not present the first time.
(Assignee)

Updated

7 years ago
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.