Merge lp://qastaging/~bac/launchpad/db-bug-613442 into lp://qastaging/launchpad/db-devel

Proposed by Brad Crittenden
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: 9641
Proposed branch: lp://qastaging/~bac/launchpad/db-bug-613442
Merge into: lp://qastaging/launchpad/db-devel
Diff against target: 915 lines (+377/-161)
17 files modified
database/sampledata/current-dev.sql (+50/-50)
database/sampledata/current.sql (+47/-47)
database/schema/comments.sql (+0/-1)
database/schema/patch-2207-81-0.sql (+17/-0)
lib/canonical/launchpad/interfaces/launchpad.py (+0/-24)
lib/lp/app/enums.py (+44/-0)
lib/lp/app/interfaces/launchpad.py (+80/-0)
lib/lp/bugs/browser/bugtarget.py (+2/-1)
lib/lp/bugs/doc/bugtracker.txt (+8/-7)
lib/lp/registry/adapters.py (+0/-1)
lib/lp/registry/configure.zcml (+2/-2)
lib/lp/registry/doc/distribution.txt (+17/-0)
lib/lp/registry/doc/product.txt (+14/-1)
lib/lp/registry/interfaces/distribution.py (+4/-2)
lib/lp/registry/interfaces/product.py (+4/-6)
lib/lp/registry/model/distribution.py (+41/-12)
lib/lp/registry/model/product.py (+47/-7)
To merge this branch: bzr merge lp://qastaging/~bac/launchpad/db-bug-613442
Reviewer Review Type Date Requested Status
Julian Edwards (community) release-critical Approve
Abel Deuring (community) code Approve
Jonathan Lange (community) db Approve
Review via email: mp+31955@code.qastaging.launchpad.net

Commit message

Add db and interface support for official_* replacements

Description of the change

= Summary =

This branch adds db and interface support for eventually replacing the
boolean official_answers, etc, indicators with an enum-based approach.

== Proposed fix ==

Add new columns to the db where needed and provide derived properties
for the two that do not need db support.

== Pre-implementation notes ==

Talks with Curtis.

== Implementation details ==

This branch adds the new columns but does not replace the old ones.
That work will be done next cycle and will be easier once the new
columns are in place.

== Tests ==

Tests have not been updated yet as the first instance of this MP is for
db review only, due to time constraints. The tests will be updated
prior to requesting a code review.

== Demo and Q/A ==

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/app/enums.py
  database/schema/patch-2207-99-0.sql
  lib/canonical/launchpad/interfaces/launchpad.py
  lib/lp/registry/interfaces/product.py
  lib/lp/app/interfaces/launchpad.py
  lib/lp/bugs/doc/bugtracker.txt
  lib/lp/registry/interfaces/distribution.py
  lib/lp/registry/model/product.py
  lib/lp/registry/model/distribution.py

== Schema ==

The new sampledata has been generated but is not yet attached to keep
the size of the reviewed branch reasonable.

database/sampledata/current.sql
    database/sampledata/lintdata.sql differs from
database/sampledata/current.sql.
    Patches to the schema, or manual edits to
database/sampledata/current.sql
    do not match the dump of the launchpad_ftest_template database.
    If database/sampledata/lintdata.sql is correct, copy it to
    database/sampledata/current.sql.
    Otherwise update database/sampledata/current.sql and run:
        make schema
        make newsampledata
        cd database/sampledata
        cp newsampledata.sql database/sampledata/current.sql
    Run make schema again to update the test/dev database.

database/sampledata/current.sql
    database/sampledata/lintdata-dev.sql differs from
database/sampledata/current-dev.sql.
    Patches to the schema, or manual edits to
database/sampledata/current-dev.sql
    do not match the dump of the launchpad_dev_template database.
    If database/sampledata/lintdata-dev.sql is correct, copy it to
    database/sampledata/current-dev.sql.
    Otherwise update database/sampledata/current-dev.sql and run:
        make schema
        make newsampledata
        cd database/sampledata
        cp newsampledata-dev.sql database/sampledata/current-dev.sql
    Run make schema again to update the test/dev database.

These lint issues will be addressed before landing.

./lib/canonical/launchpad/interfaces/launchpad.py
      24: 'UnsafeFormGetSubmissionError' imported but unused
      24: 'IBasicLaunchpadRequest' imported but unused
      24: 'IOpenLaunchBag' imported but unused
      24: 'ILaunchpadRoot' imported but unused
      24: 'ILaunchBag' imported but unused
     525: E301 expected 1 blank line, found 0
     467: Line exceeds 78 characters.
./lib/lp/registry/interfaces/product.py
      58: redefinition of unused 'ILaunchpadUsage' from line 55
     897: E301 expected 1 blank line, found 2
./lib/lp/app/interfaces/launchpad.py
      77: E231 missing whitespace after ','
./lib/lp/bugs/doc/bugtracker.txt
     205: narrative uses a moin header.
     295: narrative uses a moin header.
     359: narrative exceeds 78 characters.
     475: want exceeds 78 characters.
     532: narrative exceeds 78 characters.
./lib/lp/registry/model/product.py
      88: redefinition of unused 'ILaunchpadUsage' from line 35
     265: E301 expected 1 blank line, found 0
     283: E301 expected 1 blank line, found 0
     292: E301 expected 1 blank line, found 0
     300: E301 expected 1 blank line, found 0
./lib/lp/registry/model/distribution.py
     202: E301 expected 1 blank line, found 2
     250: E301 expected 1 blank line, found 0
     253: E301 expected 1 blank line, found 0
     479: E203 whitespace before ':'
     694: E222 multiple spaces after operator
    1019: E202 whitespace before ')'
    1027: E202 whitespace before ']'
    1068: E202 whitespace before ')'
    1088: E202 whitespace before ')'
    1121: E231 missing whitespace after ','
    1125: E231 missing whitespace after ','
    1137: E231 missing whitespace after ','
    1153: E202 whitespace before ')'
    1401: E203 whitespace before ':'

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

I'm happy with the database patch. This looks like a really good refactoring. Thanks Brad!

review: Approve (db)
Revision history for this message
Jonathan Lange (jml) wrote :

I'm happy with the database patch. This looks like a really good refactoring. Thanks Brad!

review: Approve (db)
Revision history for this message
Brad Crittenden (bac) wrote :

The testing deficiencies mentioned in the cover letter have been addressed. The MP is ready for a code review.

Revision history for this message
Abel Deuring (adeuring) wrote :

nice work!

review: Approve (code)
Revision history for this message
Julian Edwards (julian-edwards) wrote :

This missed the PQM closure, Brad asked me for an RC.

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: