← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1286717] Re: Keystone unit tests fails with SQLAlchemy 0.9.3

 

** Changed in: keystone/havana
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1286717

Title:
  Keystone unit tests fails with SQLAlchemy 0.9.3

Status in OpenStack Identity (Keystone):
  Fix Released
Status in Keystone havana series:
  Fix Released

Bug description:
  Keystone fails its unit tests when running with SQLAlchemy 0.9.3, as
  per the log below. It is important for Debian that Havana Keystone
  continues to work in Sid with SQLA 0.9.

  ======================================================================
  ERROR: keystone.tests.test_sql_upgrade.SqlUpgradeTests.test_upgrade_14_to_16
  ----------------------------------------------------------------------
  _StringException: traceback-1: {{{
  Traceback (most recent call last):
    File "/home/zigo/sources/openstack/havana/keystone/build-area/keystone-2013.2.2/keystone/tests/test_sql_upgrade.py", line 90, in tearDown
      self.downgrade(0)
    File "/home/zigo/sources/openstack/havana/keystone/build-area/keystone-2013.2.2/keystone/tests/test_sql_upgrade.py", line 125, in downgrade
      self._migrate(*args, downgrade=True, **kwargs)
    File "/home/zigo/sources/openstack/havana/keystone/build-area/keystone-2013.2.2/keystone/tests/test_sql_upgrade.py", line 139, in _migrate
      self.schema.runchange(ver, change, changeset.step)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 91, in runchange
      change.run(self.engine, step)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 145, in run
      script_func(engine)
    File "/home/zigo/sources/openstack/havana/keystone/build-area/keystone-2013.2.2/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py", line 430, in downgrade
      downgrade_user_table_with_copy(meta, migrate_engine, session)
    File "/home/zigo/sources/openstack/havana/keystone/build-area/keystone-2013.2.2/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py", line 225, in downgrade_user_table_with_copy
      'extra': user.extra})
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 978, in execute
      clause, params or {})
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 717, in execute
      return meth(self, multiparams, params)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection
      return connection._execute_clauseelement(self, multiparams, params)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 814, in _execute_clauseelement
      compiled_sql, distilled_params
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 927, in _execute_context
      context)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1076, in _handle_dbapi_exception
      exc_info
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 185, in raise_from_cause
      reraise(type(exception), exception, tb=exc_tb)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 920, in _execute_context
      context)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 425, in do_execute
      cursor.execute(statement, parameters)
  IntegrityError: (IntegrityError) UNIQUE constraint failed: temp_user.name u'insert into temp_user (id, name, password, enabled, extra) values ( ?, ?, ?, ?, ?);' (u'433e0e1c02ff436a9bf1829ee42790d1', u'6327d5d819064064a82bc10e0ef7fdca', u'5ef83255a7df4fb1a3ae1d6877719a1e', True, u'{}')
  }}}
   
  Traceback (most recent call last):
    File "/home/zigo/sources/openstack/havana/keystone/build-area/keystone-2013.2.2/keystone/tests/test_sql_upgrade.py", line 487, in test_upgrade_14_to_16
      self.check_uniqueness_constraints()
    File "/home/zigo/sources/openstack/havana/keystone/build-area/keystone-2013.2.2/keystone/tests/test_sql_upgrade.py", line 882, in check_uniqueness_constraints
      cmd = this_table.delete(id=user['id'])
    File "<string>", line 1, in <lambda>
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/selectable.py", line 1237, in delete
      return dml.Delete(self, whereclause, **kwargs)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/dml.py", line 749, in __init__
      self._validate_dialect_kwargs(dialect_kw)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/base.py", line 132, in _validate_dialect_kwargs
      "named <dialectname>_<argument>, got '%s'" % k)
  TypeError: Additional arguments should be named <dialectname>_<argument>, got 'id'

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


References