Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling the Internal Bug Tracker in local_settings.py makes Kiwi unusable #1370

Closed
butterdroid opened this issue Feb 12, 2020 · 0 comments
Closed

Comments

@butterdroid
Copy link

butterdroid commented Feb 12, 2020

Description of problem

Disabling the Internal Bug Tracker in local_settings.py makes Kiwi unusable. It causes an internal error and the website cannot be accessed.

Version or commit hash (if applicable)

7.3

Steps to Reproduce

  1. Follow the production installation instructions
  2. In the local_settings.py file overwrite the INSTALLED_APPS, comment out 'tcms.bugs'
  3. Attempt to docker-compose up

Actual results

The docker initialization appears fine, but when you try to hit the url, it blows up.

Expected results

The Internal Tracker should be disabled.

Additional info (Python traceback, logs, etc.)

I deployed a development environment and found the same issue if I tried to do it there by modifying the config filed.

My current workaround is:
Comment out the tcms.bugs calls
urls.py line 16
urls.py line 42
forms.py Line 8
views.py Line 17
kiwitcms.py Lines 11 and 12
types.py Line 22

I'm not sure if there would be further repercussions from these changes yet.

But there should be a more elegant way of handling this, ideally, the superuser should be able to disable the system from the settings.

web_1  | [Wed Feb 12 14:08:02.532160 2020] [wsgi:error] [pid 10:tid 140157336868608]  mod_wsgi (pid=10): Failed to exec Python script file '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Wed Feb 12 14:08:02.532237 2020] [wsgi:error] [pid 10:tid 140157336868608]  mod_wsgi (pid=10): Exception occurred processing WSGI script '/venv/lib64/python3.6/site-packages/tcms/wsgi.py'.
web_1  | [Wed Feb 12 14:08:02.534578 2020] [wsgi:error] [pid 10:tid 140157336868608]  Traceback (most recent call last):
web_1  | [Wed Feb 12 14:08:02.534915 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/tcms/wsgi.py", line 40, in <module>
web_1  | [Wed Feb 12 14:08:02.534935 2020] [wsgi:error] [pid 10:tid 140157336868608]      _APPLICATION = get_wsgi_application()
web_1  | [Wed Feb 12 14:08:02.534945 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
web_1  | [Wed Feb 12 14:08:02.534949 2020] [wsgi:error] [pid 10:tid 140157336868608]      django.setup(set_prefix=False)
web_1  | [Wed Feb 12 14:08:02.534954 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/django/__init__.py", line 24, in setup
web_1  | [Wed Feb 12 14:08:02.534957 2020] [wsgi:error] [pid 10:tid 140157336868608]      apps.populate(settings.INSTALLED_APPS)
web_1  | [Wed Feb 12 14:08:02.534962 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/django/apps/registry.py", line 122, in populate
web_1  | [Wed Feb 12 14:08:02.534965 2020] [wsgi:error] [pid 10:tid 140157336868608]      app_config.ready()
web_1  | [Wed Feb 12 14:08:02.535368 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/django/contrib/admin/apps.py", line 24, in ready
web_1  | [Wed Feb 12 14:08:02.535376 2020] [wsgi:error] [pid 10:tid 140157336868608]      self.module.autodiscover()
web_1  | [Wed Feb 12 14:08:02.535382 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/django/contrib/admin/__init__.py", line 26, in autodiscover
web_1  | [Wed Feb 12 14:08:02.535385 2020] [wsgi:error] [pid 10:tid 140157336868608]      autodiscover_modules('admin', register_to=site)
web_1  | [Wed Feb 12 14:08:02.535392 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/django/utils/module_loading.py", line 47, in autodiscover_modules
web_1  | [Wed Feb 12 14:08:02.535397 2020] [wsgi:error] [pid 10:tid 140157336868608]      import_module('%s.%s' % (app_config.name, module_to_search))
web_1  | [Wed Feb 12 14:08:02.535402 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module
web_1  | [Wed Feb 12 14:08:02.535405 2020] [wsgi:error] [pid 10:tid 140157336868608]      return _bootstrap._gcd_import(name[level:], package, level)
web_1  | [Wed Feb 12 14:08:02.535411 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "<frozen importlib._bootstrap>", line 994, in _gcd_import
web_1  | [Wed Feb 12 14:08:02.535892 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "<frozen importlib._bootstrap>", line 971, in _find_and_load
web_1  | [Wed Feb 12 14:08:02.535912 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
web_1  | [Wed Feb 12 14:08:02.535918 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
web_1  | [Wed Feb 12 14:08:02.535924 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "<frozen importlib._bootstrap_external>", line 678, in exec_module
web_1  | [Wed Feb 12 14:08:02.535929 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
web_1  | [Wed Feb 12 14:08:02.535934 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/tcms/testcases/admin.py", line 11, in <module>
web_1  | [Wed Feb 12 14:08:02.535937 2020] [wsgi:error] [pid 10:tid 140157336868608]      from tcms.issuetracker import types
web_1  | [Wed Feb 12 14:08:02.535942 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/tcms/issuetracker/types.py", line 22, in <module>
web_1  | [Wed Feb 12 14:08:02.535945 2020] [wsgi:error] [pid 10:tid 140157336868608]      from tcms.issuetracker.kiwitcms import KiwiTCMS  # noqa, pylint: disable=unused-import
web_1  | [Wed Feb 12 14:08:02.535950 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/tcms/issuetracker/kiwitcms.py", line 11, in <module>
web_1  | [Wed Feb 12 14:08:02.535952 2020] [wsgi:error] [pid 10:tid 140157336868608]      from tcms.bugs.models import Bug
web_1  | [Wed Feb 12 14:08:02.535957 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/tcms/bugs/models.py", line 12, in <module>
web_1  | [Wed Feb 12 14:08:02.535960 2020] [wsgi:error] [pid 10:tid 140157336868608]      class Bug(models.Model, UrlMixin):
web_1  | [Wed Feb 12 14:08:02.535965 2020] [wsgi:error] [pid 10:tid 140157336868608]    File "/venv/lib64/python3.6/site-packages/django/db/models/base.py", line 115, in __new__
web_1  | [Wed Feb 12 14:08:02.535968 2020] [wsgi:error] [pid 10:tid 140157336868608]      "INSTALLED_APPS." % (module, name)
web_1  | [Wed Feb 12 14:08:02.535991 2020] [wsgi:error] [pid 10:tid 140157336868608]  RuntimeError: Model class tcms.bugs.models.Bug doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
web_1  | xx - - [12/Feb/2020:14:08:00 +0000] "GET / HTTP/1.1" 500 527 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0"
@atodorov atodorov added this to the bug-tracker integration milestone Apr 30, 2020
atodorov added a commit that referenced this issue Apr 30, 2020
- all tests should be passign with and without this App
- specific tcms.bugs related tests should be skipped when the
  App is not found in INSTALLED_APPS
atodorov added a commit that referenced this issue Apr 30, 2020
- all tests should be passing with and without this App
- specific tcms.bugs related tests should be skipped when the
  App is not found in INSTALLED_APPS
atodorov added a commit that referenced this issue May 1, 2020
- all tests should be passing with and without this App
- specific tcms.bugs related tests should be skipped when the
  App is not found in INSTALLED_APPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants