Page MenuHomePhabricator

When calling arc diff with unit test result, I receive a ConduitClientException: Missing required parameters: result
Closed, ResolvedPublic

Description

The full stack trace:

[2016-02-12 05:45:40] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Missing required parameters: result at [<phutil>/src/conduit/ConduitFuture.php:58]
arcanist(head=master, ref.master=fcc11b3a2781, custom=1), phutil(head=master, ref.master=f43291e99d36)
  #0 <#2> ConduitFuture::didReceiveResult(array) called at [<phutil>/src/future/FutureProxy.php:58]
  #1 <#2> FutureProxy::getResult() called at [<phutil>/src/future/FutureProxy.php:35]
  #2 <#2> FutureProxy::resolve() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2822]
  #3 phlog(ConduitClientException) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2828]
  #4 ArcanistDiffWorkflow::updateAutotargets(string, integer) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:528]
  #5 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:392]

On the server side I am running:

phabricator 99af097ff613512d0065abb9e93c1ce7744e46ac (Thu, Feb 11)
arcanist fcc11b3a278199fa15b90692aba65f54fef5d7f7 (Wed, Feb 10)
phutil f43291e99d36045bc459e5133454c0d8fd8768ea (Thu, Jan 21)

This did not occur before I setup unit testing capability with arc. On my computer console, the unit testing works, displays all the passing, skipped and (2 failed tests) just fine. It then asks for an explanation. After that it pushes to the staging area, I get the "STAGING PUSHED" message and then the above exception. It does finish and give me a Differential revision URL and states what changes it included.

When looking in Phabricator, it shows on the Differential page the two failing tasks. Clicking on the View Results brings up a page with no test data. The Harbormaster build thinks it is still running, and it never completes.

Event Timeline

I have solved the problem. A unit test was outputting a status that was not understood by my XojoUnitTestEngine class. It therefore was not setting the Result of a single unit test. I changed my XojoUnitTestEngine to read:

if ($result->{'Failed'}) {
  $tr->setResult(ArcanistUnitTestResult::RESULT_FAIL);
} elseif ($result->{'Passed'}) {
  $tr->setResult(ArcanistUnitTestResult::RESULT_PASS);
} elseif ($result->{'Skipped'}) {
  $tr->setResult(ArcanistUnitTestResult::RESULT_SKIP);
} else {
  $tr->setResult(ArcanistUnitTestREsult::RESULT_UNSOUND);
}

and this causes everything to work fine.

I can not close this task and I am unsure if this error should be handled in a different way if other TestEngine's may do the same thing, i.e. have some missing piece of key information.

avivey claimed this task.
avivey added a subscriber: avivey.

Yeah, that's the right way; result is a required parameter for unit object.