yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #88639
[Bug 1720893] Re: django.template VariableDoesNotExist error when enabling DEBUG logging
Reviewed: https://review.opendev.org/c/openstack/horizon/+/830944
Committed: https://opendev.org/openstack/horizon/commit/85e20a62e2b986f066484147d0a15446d2699559
Submitter: "Zuul (22348)"
Branch: master
commit 85e20a62e2b986f066484147d0a15446d2699559
Author: Akihiro Motoki <amotoki@xxxxxxxxx>
Date: Fri Feb 25 17:14:53 2022 +0900
local_settings.py: Disable django.template DEBUG messages
VariableDoesNotExist error in DEBUG messages from django.template are
super noisy. It happens even for cases where variables are not defined
like "default" filter. It also happens with Django built-in templates.
Previously we tried to fix VariableDoesNotExist errors in our templates,
but it tunrs out there is no convenient way to prevent it.
We agreed to disable django.template DEBUG messages by default
in the horizon weekly meeting [1].
Closes-Bug: #1720893
[1] https://meetings.opendev.org/meetings/horizon/2022/horizon.2022-02-23-15.00.log.html#l-105
Change-Id: Ife9a91c7cd050b30d7f1eca8861a0d6629a23827
** Changed in: horizon
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1720893
Title:
django.template VariableDoesNotExist error when enabling DEBUG logging
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
When enabling the DEBUG level for "console" handler in
local_settings.py, you can see a lot below errors.
DEBUG 2017-10-02 21:06:11,615 django.template Exception while resolving variable 'is_small' in template 'horizon/common/_data_table_row_actions_dropdown.html'.
Traceback (most recent call last):
File "/home/feilong/MyWorkspace/workspace_catalyst/openstack-horizon/pike/local/lib/python2.7/site-packages/django/template/base.py", line 903, in _resolve_lookup
(bit, current)) # missing attribute
VariableDoesNotExist: Failed lookup for key [is_small] in u'[{\'False\': False, \'None\': None, \'True\': True}, {\'x_trace_info\': \'{"X-Trace-HMAC": "79db818611c206ee6b8aacdf9cb6eecc1bcd5233", "X-Trace-Info": "eyJwYXJlbnRfaWQiOiAiYWM0OGIyYzgtOGZiOC00N2FjLTkyOTEtZTMxY2U5MmRlZDhlIiwgImJhc2VfaWQiOiAiYzdiNzUzMmQtOGY4OS00ZTlhLThmM2MtNTQzNTdlMGJjZTRlIiwgImhtYWNfa2V5IjogIlNFQ1JFVF9LRVkifQ=="}\', u\'csrf_token\': <SimpleLazyObject: <function _get_val at 0x7f3ef8e727d0>>, \'False\': False, u\'request\': <WSGIRequest: GET \'/project/instances/\'>, \'profiler_enabled\': True, \'JS_CATALOG\': \'horizon+openstack_dashboard+adjutant_ui.dashboards.management+distil_ui+horizon_plugins\', \'messages\': <django.contrib.messages.storage.fallback.FallbackStorage object at 0x7f3f0858e290>, u\'STATIC_URL\': \'/static/\', u\'LANGUAGES\': ((\'cs\', \'Czech\'), (\'de\', \'German\'), (\'en\', \'English\'), (\'en-au\', \'Australian English\'), (\'en-gb\', \'British English\'), (\'es\', \'Spanish\'), (\'fr\', \'French\'), (\'id\', \'Indonesian\'), (\'it\', \'Italian\'), (\'ja\', \'Japanese\'), (\'ko\', \'Korean (Korea)\'), (\'pl\', \'Polish\'), (\'pt-br\', \'Portuguese (Brazil)\'), (\'ru\', \'Russian\'), (\'tr\', \'Turkish\'), (\'zh-cn\', \'Simplified Chinese\'), (\'zh-tw\', \'Chinese (Taiwan)\')), \'WEBROOT\': \'/\', \'regions\': {\'current\': {\'endpoint\': u\'https://api.cloud.catalyst.net.nz:5000/v2.0\', \'name\': \'Default Region\'}, \'available\': [], \'support\': False}, \'keystone_providers\': {\'support\': False}, \'authorized_tenants\': [<Tenant {u\'description\': u\'\', u\'disabled_by\': u\'\', u\'enabled\': True, u\'disabled_at\': u\'\', u\'id\': u\'55d08ec945f144d9aeec8234e6cdebbc\', u\'name\': u\'feilong.catalyst.net.nz\'}>, <Tenant {u\'enabled\': True, u\'description\': u\'Openstack development tenant\', u\'name\': u\'openstack-dev.catalyst.net.nz\', u\'id\': u\'b23a5e41d1af4c20974bf58b4dff8e5a\'}>], u\'LANGUAGE_CODE\': \'en\', \'HORIZON_CONFIG\': <horizon.conf.LazySettings object at 0x7f3f0d2fce50>, \'DEFAULT_MESSAGE_LEVELS\': {\'DEBUG\': 10, \'INFO\': 20, \'WARNING\': 30, \'SUCCESS\': 25, \'ERROR\': 40}, \'True\': True, u\'LANGUAGE_BIDI\': False, u\'MEDIA_URL\': \'/media/\'}, {}, {\'row_id\': u\'8130d5dc-6db0-4976-bef3-b8655ff5a282\', \'row_actions\': [<CreateSnapshot: snapshot>, <AssociateIP: associate>, <AttachInterface: attach_interface>, <DetachInterface: detach_interface>, <EditInstance: edit>, <AttachVolume: attach_volume>, <DetachVolume: detach_volume>, <UpdateMetadata: update_metadata>, <EditInstanceSecurityGroups: edit_secgroups>, <ConsoleLink: console>, <LogLink: log>, <TogglePause: pause>, <ToggleSuspend: suspend>, <ToggleShelve: shelve>, <ResizeLink: resize>, <LockInstance: lock>, <UnlockInstance: unlock>, <SoftRebootInstance: soft_reboot>, <RebootInstance: reboot>, <StopInstance: stop>, <RebuildInstance: rebuild>, <DeleteInstance: delete>]}, {u\'forloop\': {u\'revcounter0\': 5, u\'last\': False, u\'counter\': 17, u\'parentloop\': {}, u\'revcounter\': 6, u\'counter0\': 16, u\'first\': False}, u\'action\': <UnlockInstance: unlock>}, {}]'
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1720893/+subscriptions
References