Error while using changes to applied alembic migrations scripts

Bug #1421164 reported by Artem Roma
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Artem Roma

Bug Description

When changes are made to alembic revision script and that migration is already applied, second applying will not set the changes for database which could lead to different errors while interacting with db. Such situation can occur, for example, when in different git topics revisions with same uid but different content are stored. The issue mainly affects development process, particularly tests execution.

In order to resolve the problem we may need to perform cleaning of db schema before new tests execution. Such code is already present in nailgun infrastructure [1], so we need to include it to ostf and adapt it for the project.

[1]: https://github.com/stackforge/fuel-web/blob/d31b59a7ed9f1aade5bd73cc252b301b0a257733/nailgun/nailgun/db/sqlalchemy/__init__.py#L96-146

Changed in fuel:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-ostf (master)

Fix proposed to branch: master
Review: https://review.openstack.org/155290

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-ostf (master)

Reviewed: https://review.openstack.org/155290
Committed: https://git.openstack.org/cgit/stackforge/fuel-ostf/commit/?id=f509330e00f6a04bd9ab9afd1923f1ab44aa839e
Submitter: Jenkins
Branch: master

commit f509330e00f6a04bd9ab9afd1923f1ab44aa839e
Author: Artem Roma <email address hidden>
Date: Thu Feb 12 14:48:11 2015 +0200

    Cleaning db before integration tests added

    Complete cleaning of db schema added before execution of integration
    tests. The main reason of introducing such cleaning - issue with
    applying alembic revisions with same uid but different content that are
    stored in different git branches, which leads to erros while interaction
    with db.

    Change-Id: I94611015beb4dd83d036b813c9337958dc6af064
    Closes-Bug: #1421164

Changed in fuel:
status: In Progress → Fix Committed
Changed in fuel:
status: Fix Committed → Fix Released
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.