Page MenuHomePhabricator

Improve error checking for third-party unit test engines
Closed, ResolvedPublic

Description

Harbormaster is now more strict about types, but arc isn't especially strict about them. We should be more strict; e.g. this should raise an error when whatever's passing the questionable duration passes it, not later during result upload.

upload.png (169×1 px, 56 KB)

Event Timeline

epriestley claimed this task.
epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: Arcanist.
epriestley added subscribers: epriestley, csilvers.

It looks like the culprit is likely in first-party code:

[3:16pm] csilvers: $parser = new ArcanistXUnitTestResultParser();
[3:16pm] csilvers: return $parser->parseTestResults(Filesystem::readFile($file));

We should improve error checking to pinpoint this and verify that it's the problem, then correct it.

To us, this happens only when the lint fails. If no lintable change, it seems fine no matter if a unit test gets run or not.

is the following the same or different one?

EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Parameter 'line' has invalid type. Expected type 'optional int', got type 'string'. at [<phutil>/src/conduit/ConduitFuture.php:58]
affogatolinter(), arcanist(head=master, ref.master=999eb9376568), owners(), phutil(head=master, ref.master=aa6cd8f7e5e5)

#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:2786]
#3 phlog(ConduitClientException) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2792]
#4 ArcanistDiffWorkflow::updateAutotargets(string, integer) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:530]
#5 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:382]