alembic based data migration version file is missing an import

Bug #1321382 reported by Venkat Sundaram
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Medium
Kaitlin Farr

Bug Description

The recently merged data migration file: barbican/model/migration/alembic_migrations/versions/13d127569afa_create_secret_metadata_table.py

fails flake8 test due to a missing import:

$ flake8 barbican/model/migration/alembic_migrations/versions/13d127569afa_create_secret_metadata_table.py
barbican/model/migration/alembic_migrations/versions/13d127569afa_create_secret_metadata_table.py:34:1: F821 undefined name 'rep'

The easy fix would be to include the missing import:

from barbican.model import repositories as rep

The above change is mentioned here: https://github.com/cloudkeep/barbican/wiki/Database-Migrations
If this is accepted as a bug, might need to fix the wiki too.

PS: wondering why this was not caught during testing at merge time. is flake8 testing disabled or allowed to ignore such errors ?

Revision history for this message
Paul Kehrer (paul-l-kehrer) wrote :

alembic_migrations are explicitly excluded from flake8 in tox, but I'm not sure why actually. I will inquire.

Venkat Sundaram (tsv)
Changed in barbican:
assignee: nobody → Venkat Sundaram (tsv)
Revision history for this message
John Wood (john-wood-w) wrote :

It has been a while since we put the alembic support in, but I recall that alembic had issues with a __init__.py being located in the versions folder, and the tox check's had a problem with out that file there. Worth revisiting to make sure though...

Revision history for this message
Kaitlin Farr (kaitlin-farr) wrote :

Oh. I feel responsible for fixing this because that was my migration code. Can I steal the bug assignment from you, Venkat?

Revision history for this message
Venkat Sundaram (tsv) wrote :

Sure Kaitlin. Please feel free to take over. I am working on another item and was thinking of fixing the review comments tomorrow. Thanks!

Revision history for this message
Kaitlin Farr (kaitlin-farr) wrote :

Thanks!

Changed in barbican:
assignee: Venkat Sundaram (tsv) → Kaitlin Farr (kaitlin-farr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

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

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

Reviewed: https://review.openstack.org/94983
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=e3a8dc0f75046708055ce4e6ad9c68e8bf13cba9
Submitter: Jenkins
Branch: master

commit e3a8dc0f75046708055ce4e6ad9c68e8bf13cba9
Author: Kaitlin Farr <email address hidden>
Date: Thu May 22 15:03:34 2014 -0400

    Fix flake8 errors in migration version file

    Alembic_migrations were excluded from flake8 in tox because of issues
    with alembic's issues with __init__.py being in the versions folder.

    Change-Id: I531cbf72ab909d34f993d5991c490afa6d996a22
    Closes-bug: #1321382

Changed in barbican:
status: In Progress → Fix Committed
John Wood (john-wood-w)
Changed in barbican:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in barbican:
milestone: juno-1 → 2014.2
Changed in barbican:
importance: Undecided → Medium
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.