peartherapeutics / bitrise-aws-device-farm-file-deploy

MIT License
6 stars 15 forks source link

Is there anyway to make the output of uploads more verbose? #13

Open brobiden opened 7 years ago

brobiden commented 7 years ago

Hey there, so trying to get this bitrise step to work in the workflow UI. However my upload fails and the output is fairly opaque.

 0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  2 5661k    0     0    2  128k      0   220k  0:00:25 --:--:--  0:00:25  220k
 40 5661k    0     0   40 2304k      0  1513k  0:00:03  0:00:01  0:00:02 1513k
100 5661k    0     0  100 5661k      0  2963k  0:00:01  0:00:01 --:--:-- 2962k
  Upload finished. Polling for status.
  Upload status: FAILED

Upload failed!

Is there any way to make this a bit more verbose to figure out where the issue is? Thanks.

fadookie commented 7 years ago

@brobiden I believe so. The GetUpload endpoint returns an Upload object. Currently, I only check the status of this object, but I checked the docs and it also contains a message field.

If you just want to debug and move on, I'd just install and configure the aws-cli locally. Then you can run a command like: aws devicefarm get-upload --arn="(Upload ARN from bitrise log)" This should dump the whole response including upload failure info.

I'd also try starting a test run manually via the device farm GUI console to make sure everything else is set up correctly.

For purposes of improving error reporting generally, it should be possible to use jq to parse both of these out of the json response instead of the --query method I'm currently using in aws-cli from a single response - there's similar code that does this in the runner step.

I don't have time to make this change myself right now and test it but I'd be open to a PR with this change.