← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1520008] Re: JSON Encoder crashes on settings with translations: "ValueError: Circular reference detected"

 

** Changed in: horizon
       Status: Fix Committed => Invalid

** Changed in: horizon
    Milestone: next => None

-- 
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/1520008

Title:
  JSON Encoder crashes on settings with translations: "ValueError:
  Circular reference detected"

Status in OpenStack Dashboard (Horizon):
  Invalid

Bug description:
  Description:

  Horizon uses the REST_API_REQUIRED_SETTINGS key in the
  local_settings.py configuration file In order to make the contained
  configuration available to the the client side angular code.

  Some configurations include ugettext objects which fail to serialize
  when passing through http.

  eg. 
  OPENSTACK_IMAGE_BACKEND = {
      'image_formats': [
          ('aki', _('AKI - Amazon Kernel Image'))
      ]
  }

  Steps to Reproduce:
  * Add 'OPENSTACK_IMAGE_BACKEND' to the 'REST_API_REQUIRED_SETTINGS' key in the local_settings.py.
  * call the settings endpoint: http://localhost:8000/api/settings
  * Django throws a 500 server exception with the following stack trace: see attached

  Impact:
  As a workaround, we are setting configuration settings as constants, instead of getting it from the settings service. See 
  https://review.openstack.org/#/c/236042/22/openstack_dashboard/static/app/core/images/images.module.js

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1520008/+subscriptions


References