openstack-tox-py310-with-sqlalchemy-master broken with latest alembic commit

Bug #2034016 reported by yatin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Critical
yatin

Bug Description

The job runs with latest alembic/sqlalchemy commits and is broken with recent alembic commit[1].

Test neutron.tests.unit.db.test_migration.TestCli.test_autogen_process_directives fails as below:-
ft1.27: neutron.tests.unit.db.test_migration.TestCli.test_autogen_process_directivestesttools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 178, in func
    return f(self, *args, **kwargs)
  File "/usr/lib/python3.10/unittest/mock.py", line 1379, in patched
    return func(*newargs, **newkeywargs)
  File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/db/test_migration.py", line 708, in test_autogen_process_directives
    self.assertThat(
  File "/home/zuul/src/opendev.org/openstack/neutron/.tox/py310/lib/python3.10/site-packages/testtools/testcase.py", line 481, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: "# ### commands auto generated by Alembic - please adjust! ###\n op.drop_constraint('user', 'uq_user_org')\n op.drop_column('user', 'organization_name')\n # ### end Alembic commands ###" does not match /(# )?### commands\ auto\ generated\ by\ Alembic\ \-\ please\ adjust!\ \#\#\#\\n\ \ \ \ op\.drop_constraint\('user',\ 'uq_user_org',\ type_=None\)\\n\ \ \ \ op\.drop_column\('user',\ 'organization_name'\)\\n\ \ \ \ (# )?### end\ Alembic\ commands\ \#\#\#/

Example failure:-
https://76069f8f7ed36a9de08a-3a08f5dd30775d36f5503265ac08cfa4.ssl.cf2.rackcdn.com/886988/10/check/openstack-tox-py310-with-sqlalchemy-master/70a282c/testr_results.html

[1] https://github.com/sqlalchemy/alembic/commit/733197e0e794ed6aec3e21542257d6cec5bb7d1f

yatin (yatinkarel)
Changed in neutron:
importance: Undecided → Critical
status: New → Triaged
tags: added: gate-failure unittest
yatin (yatinkarel)
Changed in neutron:
assignee: nobody → yatin (yatinkarel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/893602

Changed in neutron:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/893603

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "yatin <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/893603
Reason: duplicate https://review.opendev.org/c/openstack/neutron/+/893602

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/893602
Committed: https://opendev.org/openstack/neutron/commit/f7489abaf822574f6d8c01b72495788e07d756d3
Submitter: "Zuul (22348)"
Branch: master

commit f7489abaf822574f6d8c01b72495788e07d756d3
Author: yatinkarel <email address hidden>
Date: Mon Sep 4 13:33:29 2023 +0530

    [UT] Adjust autogen_process_directives for alembic-1.12.0+

    With [1] included in alembic-1.12.0 the unit test
    test_autogen_process_directives fails as it was
    expecting 'type_' param in Autogenerated output.
    But this is not included with 1.12.0 by default,
    this patch enhances the regex to care only for relevant
    parameters.

    [1] https://github.com/sqlalchemy/alembic/commit/733197e
    Closes-Bug: #2034016
    Change-Id: I088cc4b260cccf6be2963d23a76a05f11cfccf2c

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 23.0.0.0rc1

This issue was fixed in the openstack/neutron 23.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.