Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-application does not set output.arn is not set if fails #16

Open
gmazzo opened this issue Jul 20, 2023 · 5 comments
Open

test-application does not set output.arn is not set if fails #16

gmazzo opened this issue Jul 20, 2023 · 5 comments

Comments

@gmazzo
Copy link

gmazzo commented Jul 20, 2023

I'm currently using ${{ steps.adf.outputs.arn }} with

      - id: adf
        name: Amazon Device Farm
        uses: realm/aws-devicefarm/test-application@v1
        with:
            ...

to reconstruct the test run URL to provide feedback to the users. But it seems when the step fails, all outputs are empty

@mina-kleid-mobile
Copy link

mina-kleid-mobile commented Oct 2, 2023

I am currently facing the same issue with test-application. Whenever there is a failing test the steps errors and all the outputs are null.

I can see here that you throw an error without setting any outputs.

if (run_status.run.result != "PASSED") {
        throw("Test run failed after " + i*wait_interval + " seconds with: " + run_status.run.resultCode + ". Timeout is set to " + max_wait*wait_interval);
    }

@bwachter
Copy link
Collaborator

bwachter commented Oct 2, 2023

I can see here that you throw an error without setting any outputs.

I'll revisit this soon - at the time of writing this I didn't get any meaningful reply to be returned here from the devicefarm API, and therefore just had it fail without any outputs.

@mina-kleid-mobile
Copy link

I can see here that you throw an error without setting any outputs.

I'll revisit this soon - at the time of writing this I didn't get any meaningful reply to be returned here from the devicefarm API, and therefore just had it fail without any outputs.

@bwachter Thanks for your reply.
In our case the run arn would be very useful. It is already available straight after the schedule run is called. In this case when using the test-application and the run fails we can show a link to the run

@bwachter
Copy link
Collaborator

bwachter commented Oct 2, 2023

In our case the run arn would be very useful. It is already available straight after the schedule run is called. In this case when using the test-application and the run fails we can show a link to the run

That's a good point - and at minimum I'll add that when I work on this again.

Assumption when building this was that developers calling this typically don't have access to the device farm - so the focus was on pulling enough information to debug errors from the API and output them. Now with more 3rd parties using this action I might have to revisit some of those initial assumptions.

@mina-kleid
Copy link

I have added the proposed change here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants