Closed (fixed)
Project:
Project Issue File Review
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2010 at 21:57 UTC
Updated:
5 Nov 2011 at 05:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
xanoI have another use case that requires advisory test results. It's the integration between Text Review and Coder. It was supposed to be deployed on the testing servers, but since all it does is review stuff (and not test it), it should not be able to stop a patch from being accepted. It should instead result in a message saying "Hi there, your UI texts look a bit sloppy to me.".
Bottom line: we need a way to return advisory test results that don't block patch acceptance, but still allow QA to tell the issue queue something might be wrong.
Comment #2
jthorson commentedHere's a first crack at an untested patch ... an environment would be set as 'advisory' by setting a non-empty 'advisory' plugin_argument on the environment.
Comment #3
jthorson commentedIt's a start ... but the patch appears to interfere with the passing of the result code back to PIFR_Server.
Comment #4
jthorson commentedFresh start ...
First patch adds 'pifr_server_environments_is_advisory()', and includes an 'overall result' row in the environment status test table for tests with multiple environments (with failed advisory environments not contributing to a overall 'fail' status).
Comment #5
jthorson commentedNext step ...
Added advisory review considerations to the test page 'summary message'.
Comment #6
jthorson commentedStep three ...
Take advisory environments into account when checking/communicating the actual overall test status.
Comment #7
jthorson commentedStep four ...
Only ignore advisory results if there are multiple results in the set. If there is only one result, then treat it as before. (This ensures that client tests still receive their 'failure' results when expected.)
Comment #8
jthorson commentedAlmost worked ... ended up failing on client confirmation tests when the client runs multiple environments.
This patch should address that issue.
Comment #9
jthorson commentedNext Issue: 'Overall Result' should only show up when there are results ... two 'queued' environments does not equal a pass!
Fix included in this patch.
Comment #10
jthorson commentedAnd BOOM goes the dynamite!
http://rfay.redesign.devdrupal.org/node/1119121#comment-4315798
Comment #11
rfayThat is absolutely STUPENDOUS! (I didn't follow the link before :-)
Took me a while to find the coder tab, but finally found it.
People are going to be so happy with you!
Did you not even have to make any changes to pift? Doesn't look like it.
Comment #12
rfayWith this deployed on qa.scratch I did have some trouble.
I was testing a junk patch on qa.scratch.
Coder was enabled on qa.scratch, but not on scratchtestbot.
I couldn't ever get the patch to complete. The testbot tested it successfully and qa got the result (but still showed coder as queued). So PIFT never got the response.
It seems that perhaps "queued" prevents the correct advisory behavior.
I'm going to clean up PIFR on qa.scratch and see if I can get out of this.
Comment #13
rfayDeleting an environment (as I just did on qa.scratch) and then trying to retest gets a fatal:
It looks like the proper rows don't get deleted from the pifr_test_environment table when an environment is deleted.
In this case the environment id was 2; I cleaned up with
Comment #14
jthorson commentedYou'll need at least one testbot set up to handle an environment, if that environment is active on qa.scratch. In this case, when my local testbot went away, there was nothing left to perform the coder reviews. If scratchtestbot was set up to handle them, I think things would have been fine.
A quick way to disable the coder environment is to go to administer -> pifr -> environment -> edit -> conditions, and add branch 133700000 to the Coder environment. This is how it was initially disabled - deleting it isn't really necessary.
As for the environment deletion being broken ... I suspect that's always been there.
Comment #15
jthorson commentedI don't think the delayed test results when the coder testbot went away is cause for concern ... PIFT was designed to not send back a response until it has heard back from all test environments.
For production deployment, I would suggest that Coder would be turned on for multiple testbots so that failure of one would not delay test results ... the tests would simply be picked up by the next guy. This shouldn't cause a significant performance issue either, as the coder runs only take a couple of minutes.
And for your example, the test is 'queued' until sent to all environments ... until you enabled a testbot accepting coder tests, queued is the correct status (since not all tests have been 'sent' yet).
The only concern I've noticed is that the coder client verification tests seem to be randomly failing more often than the simpletest tests ... which probably deserves a seperate issue.
Given the above, moving back to 'needs review'.
Comment #16
jthorson commentedNotes from an IRC review (Thanks, chx!!!)
return !empty($environment['plugin_argument']['advisory']);
if ((count($results) == 1)
$advisorypass = 'pass';
$advisorypass = 'fail';
$rows[] = array(t("Overall Result"), $advisorypass);
Comment #17
jthorson commentedCode cleanup - Updated patch with changes from #16.
Comment #18
jthorson commentedCommitted to 6.x-2.x (0ae039a)