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

Pass Errors over to the Create Issue Action? #701

Closed
michaelhofrichter opened this issue Apr 20, 2023 · 3 comments · Fixed by #911
Closed

Pass Errors over to the Create Issue Action? #701

michaelhofrichter opened this issue Apr 20, 2023 · 3 comments · Fixed by #911
Assignees
Labels
bite-sized Well circumscribed small task enhancement New feature or request revisit Might look into this again

Comments

@michaelhofrichter
Copy link
Collaborator

If there is an error, you can use the action step to create a Github Issue - https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/alkiln/#make-a-github-issue-when-tests-fail

Is there any way to pass more of the details about which scenarios failed to the issue?

@plocket
Copy link
Collaborator

plocket commented Apr 20, 2023

Hmm, maybe. What would you want to know about the Scenarios? Their descriptions? What if we provide the report (to put in the issue)?

Just some notes for implementation: Regular GitHub action steps can output data and subsequent steps can use that data: https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context. I'd like to assume composite actions can then pass that to the actions that used them because it seems like an obvious affordance, but... yeah, so we should do some research.

[Update: It's totally possible to pass output from the action, but I think we can only output strings and I'm not sure we can output dynamic variable names. That is, all the scenario failures would be in one long (though multiline) string. The dev would have to then parse out individual scenarios to make individual errors, or just make an issue for one error for all the scenarios.]

@plocket plocket added the enhancement New feature or request label Apr 20, 2023
@michaelhofrichter
Copy link
Collaborator Author

I'd take as much detail as I can get.

Ideally, I'd get the step by step elements to see what failed. I can find that now in the log, but it takes a while to click there and then scroll to the right place:

Failures:

1) Scenario: Testing Caller ID works # docassemble/CallerID/data/sources/caller_ID_testing.feature:9
   ✔ Before # node_modules/@suffolklitlab/alkiln/lib/steps.js:103
   ✔ Given the maximum seconds for each Step is 400 # node_modules/@suffolklitlab/alkiln/lib/steps.js:289
   ✔ Given I log in with the email "PLAYGROUND_EMAIL" and the password "PLAYGROUND_PASSWORD" # node_modules/@suffolklitlab/alkiln/lib/steps.js:254
   ✔ Then I start the interview at "CallerID" # node_modules/@suffolklitlab/alkiln/lib/steps.js:156
   ✔ Then I set the variable "phone_number" to "111-111-1111" # node_modules/@suffolklitlab/alkiln/lib/steps.js:930
   ✔ Then I tap to continue # node_modules/@suffolklitlab/alkiln/lib/steps.js:732
   ✔ Then I set the variable "site_abbreviation" to "michael" # node_modules/@suffolklitlab/alkiln/lib/steps.js:930
   ✖ Then I tap to continue # node_modules/@suffolklitlab/alkiln/lib/steps.js:732
       The test was unable to continue because the server was reloading. ALKiln will try this Scenario a total of 2 times. An error will still be printed for this attempt.
   - Then I take a screenshot # node_modules/@suffolklitlab/alkiln/lib/steps.js:446
   - Then I can't continue # node_modules/@suffolklitlab/alkiln/lib/steps.js:561
   ✔ After # node_modules/@suffolklitlab/alkiln/lib/steps.js:1096

2) Scenario: Testing Caller ID with URL Args # docassemble/CallerID/data/sources/caller_ID_testing.feature:20
   ✔ Before # node_modules/@suffolklitlab/alkiln/lib/steps.js:103
   ✔ Given the maximum seconds for each Step is 400 # node_modules/@suffolklitlab/alkiln/lib/steps.js:289
   ✔ Given I log in with the email "PLAYGROUND_EMAIL" and the password "PLAYGROUND_PASSWORD" # node_modules/@suffolklitlab/alkiln/lib/steps.js:254
   ✖ Then I start the interview at "CallerID.yml&reset=1&phone=111-111-1111&ls_site=michael" # node_modules/@suffolklitlab/alkiln/lib/steps.js:156
       AssertionError
           + expected - actual

           -Exception: 

           at Object.load (/home/runner/work/docassemble-CallerID/docassemble-CallerID/node_modules/@suffolklitlab/alkiln/lib/scope.js:790:38)
           at runMicrotasks (<anonymous>)
           at processTicksAndRejections (node:internal/process/task_queues:96:5)
           at async World.<anonymous> (/home/runner/work/docassemble-CallerID/docassemble-CallerID/node_modules/@suffolklitlab/alkiln/lib/steps.js:159:3)
   - Then I take a screenshot # node_modules/@suffolklitlab/alkiln/lib/steps.js:446
   - Then I can't continue # node_modules/@suffolklitlab/alkiln/lib/steps.js:561
   ✔ After # node_modules/@suffolklitlab/alkiln/lib/steps.js:1096

@plocket plocket added the bite-sized Well circumscribed small task label Aug 21, 2023
@plocket plocket self-assigned this May 18, 2024
plocket added a commit that referenced this issue Jun 4, 2024
Close #701, allow author to access the text of unexpected results in a portable way
@plocket
Copy link
Collaborator

plocket commented Jun 20, 2024

Note: Revisit in the future to try implementing a different syntax for outputting the actual text as a proper multiline string: https://github.com/orgs/community/discussions/26288

@plocket plocket added the revisit Might look into this again label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bite-sized Well circumscribed small task enhancement New feature or request revisit Might look into this again
Projects
None yet
2 participants