Merge lp:~bac/launchpad/bug-488762-snapshot into lp:launchpad
Proposed by
Brad Crittenden
Status: | Merged |
---|---|
Approved by: | Paul Hummer |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~bac/launchpad/bug-488762-snapshot |
Merge into: | lp:launchpad |
Diff against target: |
240 lines (+80/-52) 6 files modified
lib/canonical/launchpad/webapp/snapshot.py (+1/-1) lib/lp/registry/doc/person.txt (+1/-3) lib/lp/registry/interfaces/person.py (+62/-45) lib/lp/registry/model/product.py (+0/-2) lib/lp/registry/tests/test_person.py (+15/-0) versions.cfg (+1/-1) |
To merge this branch: | bzr merge lp:~bac/launchpad/bug-488762-snapshot |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | Approve | ||
Review via email: mp+15628@code.launchpad.net |
Commit message
Remove large collections from IPerson snapshots.
To post a comment you must log in.
= Summary =
Editing large teams fails because taking a snapshot of the team includes all of the
collections for that team, big stuff like all of the members. There is no reason for
those collections to be part of the snapshot.
== Proposed fix ==
lazr.lifecycle has a new method 'doNotSnapshot' that can encapuslate a Field and make
it not be included in the snapshot. On IPerson all of the collections have been
wrapped in that method to prevent their inclusion.
== Pre-implementation notes ==
Chats with Curtis.
== Implementation details ==
As above.
== Tests ==
I've added a test to show that the fields I currently expect to be omitted from the
snapshot are in fact omitted. It's not a very interesting test but there to prevent
regression.
bin/test -vvm lp.registry -t test_person_ snapshot
== Demo and Q/A ==
On staging become an admin and try to edit the team in the bug report. It should
succeed.
= Launchpad lint =
Bah!
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /launchpad/ webapp/ snapshot. py registry/ doc/person. txt registry/ interfaces/ person. py registry/ model/product. py registry/ tests/test_ person. py
lib/canonical
versions.cfg
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/canonical/ launchpad/ webapp/ snapshot. py .interfaces' (No module named lifecycle)
11: [F0401] Unable to import 'lazr.lifecycle
lib/lp/ registry/ interfaces/ person. py .snapshot' (No module named lifecycle) interface' (No module named restful) declarations' (No module named restful) fields' (No module named restful) ._validate] Use super on an old style class ricted. addMember] Operator not preceded by a space copy_field( ITeamMembership ['status' ]), Text(required= False)) write_operation () TeamMembershipS tatus.APPROVED, add=False, subscribe_ to_list= True): ricted. acceptInvitatio nToBeMemberOf] Operator not write_operation () nToBeMemberOf( team, comment): ricted. declineInvitati onToBeMemberOf] Operator not write_operation () onToBeMemberOf( team, comment): ershipperiod= 'default_ membership_ period' , walperiod= 'default_ renewal_ period' ) parameters( npolicy= Choice( _('Subscription policy'), vocabulary= TeamSubscriptio nPolicy, TeamSubscriptio nPolicy. MODERATED) ) factory_ operation(
52: [F0401] Unable to import 'lazr.enum' (No module named enum)
53: [F0401] Unable to import 'lazr.lifecycle
54: [F0401] Unable to import 'lazr.restful.
55: [F0401] Unable to import 'lazr.restful.
62: [F0401] Unable to import 'lazr.restful.
406: [E1002, PersonNameField
1401: [C0322, IPersonEditRest
status=
^
comment=
@export_
def addMember(person, reviewer, status=
comment=None, force_team_
may_
1433: [C0322, IPersonEditRest
preceded by a space
comment=Text())
^
@export_
def acceptInvitatio
1445: [C0322, IPersonEditRest
preceded by a space
comment=Text())
^
@export_
def declineInvitati
1737: [C0322, IPersonSet.newTeam] Operator not preceded by a space
defaultmemb
^
defaultrene
@operation_
subscriptio
title=
required=False, default=
@export_
ITeam, ['name', 'displayname'...