data migration should depend on reflection

Bug #1380479 reported by Visnusaran Murugan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Visnusaran Murugan

Bug Description

Sqlalchemy data migration should depend on reflection rather that importing model.

Model always represents the latest database state and using it for facilitate data migration will fail eventually.

https://github.com/openstack/heat/blob/master/heat/db/sqlalchemy/migrate_repo/versions/037_migrate_hot_template.py#L29
relies on sqlalchemy/model.py

Revision history for this message
Visnusaran Murugan (visnusaran-murugan) wrote :

Adding a new column "environment" to raw_template as part of template versioning and db_sync for UTs fail because 037_ migration relies on sqlalchemy/model.py

Changed in heat:
assignee: nobody → Visnusaran Murugan (visnusaran-murugan)
Revision history for this message
Visnusaran Murugan (visnusaran-murugan) wrote :

Found similar code in 041 ans 43 migration's too.

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

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

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

Reviewed: https://review.openstack.org/127897
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=a73c4eac9453f0ed09709962e486ef93a1f19922
Submitter: Jenkins
Branch: master

commit a73c4eac9453f0ed09709962e486ef93a1f19922
Author: Visnusaran Murugan <email address hidden>
Date: Mon Oct 13 13:58:34 2014 +0530

    sqlalchemy migration not to import model

    sqlalchemy migration scripts should depend on
    reflections rather than import model.py
    Model denotes the latest state and will fail
    if used in migration scripts

    Change-Id: I4fcc3d06b96fab07ed47d5cc1fc4040395a60be8
    Closes-Bug: #1380479

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 2015.1.0
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.