Merge lp:~allenap/maas/fix-image-imports into lp:~maas-committers/maas/trunk
Proposed by
Gavin Panella
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Gavin Panella | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 4295 | ||||
Proposed branch: | lp:~allenap/maas/fix-image-imports | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
268 lines (+82/-35) 8 files modified
src/maasserver/bootresources.py (+9/-4) src/maasserver/testing/dblocks.py (+45/-0) src/maasserver/tests/test_bootresources.py (+3/-3) src/maasserver/utils/orm.py (+2/-1) src/maasserver/utils/tests/test_dblocks.py (+1/-25) src/maasserver/utils/tests/test_orm.py (+19/-0) src/maasserver/utils/tests/test_threads.py (+2/-0) src/maasserver/utils/threads.py (+1/-2) |
||||
To merge this branch: | bzr merge lp:~allenap/maas/fix-image-imports | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andres Rodriguez (community) | Approve | ||
Mike Pontillo (community) | Approve | ||
Review via email: mp+272079@code.launchpad.net |
Commit message
Ensure that _import_resources() is never called within a transaction.
Previously this requirement was not asserted, tested, or documented so it was only a matter of time before a regression was introduced.
To post a comment you must log in.
This alone is the fix:
return deferToThreadPool( threadpoolForDa tabase, func), *args, **kwargs)
reactor, reactor.
- transactional(
+ func, *args, **kwargs)
The rest is tests, docs, and preventing _import_resources() from causing
a regression again.