Merge lp:~ursinha/launchpad/add-ec2land-rules-orphaned-branches-no-conflicts into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ursula Junque | ||||
Approved revision: | not available | ||||
Merge reported by: | Ursula Junque | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~ursinha/launchpad/add-ec2land-rules-orphaned-branches-no-conflicts | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
387 lines (+284/-13) 3 files modified
lib/devscripts/autoland.py (+51/-8) lib/devscripts/ec2test/builtins.py (+26/-4) lib/devscripts/tests/test_autoland.py (+207/-1) |
||||
To merge this branch: | bzr merge lp:~ursinha/launchpad/add-ec2land-rules-orphaned-branches-no-conflicts | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Henning Eggers (community) | code | Approve | |
Review via email: mp+31386@code.launchpad.net |
Commit message
[r=henninge]
Description of the change
This is the same set of changes as approved in https:/
= Summary =
This branch is a fix for bug 601995, adding to ec2 land two options: --no-qa and --incr. --no-qa option should add the [no-qa] tag to the commit message, and --incr option should add the [incr] tag. This enforces the QA policy of now allowing fixes to be committed without bugs unless explicitely pointed.
== Proposed fix ==
The implementation is pretty simple. A method checks if the --no-qa or the --incr options are passed to ec2 land, and combined with the bugs found in the mp decides if the merge can continue based on the QA policy:
* If the mp has no linked bugs and no no-qa tag, ec2 land should fail because without bugs and no-qa tag that commit would be an orphaned one.
* If the mp has bugs and the no-qa commit tag, that's ok. The bug #s and the no-qa tag will be added to the commit message. This will be properly parsed and handled by qa-tagger script after the branch landed.
* If the mp has no linked bugs but has the no-qa commit tag, that's ok. The commit will be qa-untestable, therefore not orphaned.
* If the mp has no linked bugs but has the incr commit tag, ec2 land should fail, because bugs are needed when the fix is incremental.
* A commit cannot be no-qa and incr at the same time.
== Tests ==
I've tested the newly created method by adding more tests to test_autoland.py.
./bin/test -vvt devscripts.*
It's not possible to test get_commit_message directly because it all depends on launchpadlib.
== Demo and Q/A ==
I've tested by running the command in a real merge proposal in Launchpad, using the --dry-run option, to check if the commit message is correctly parsed and tagged by ec2 land.
Considering staging is down for some time now, I've tested with this mp: https:/
$ ec2 land https:/
Results should be as following:
* Both --incr and --no-qa at the same time: should error.
* without --no-qa and nor linked bugs: should error.
* with --incr and no linked bugs: should error.
* with --incr and linked bugs: should work.
* with --no-qa and no linked bugs: should work.
* with --no-qa and linked bugs: should work.
I compared the diffs and they are essentially identical. ;-)