Merged
Conversation
Use simulated test failure to test error handling
Codecov Report
@@ Coverage Diff @@
## dev #424 +/- ##
=======================================
Coverage 96.76% 96.76%
=======================================
Files 27 27
Lines 1730 1730
=======================================
Hits 1674 1674
Misses 56 56 |
addb
reviewed
Oct 19, 2023
addb
reviewed
Oct 20, 2023
addb
approved these changes
Nov 2, 2023
Contributor
addb
left a comment
There was a problem hiding this comment.
Looks good! Let's merge the downmerge PR before merging this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds more robust categorized error handling for the integration test job by making the following changes:
idvalues for each step so they can be referenced uniquelyOn failurestep to categorize failures into 3 buckets:exit 1= integration test failureexit 2= workflow setup/process failureexit 3= catchall for any unhandled failureson-failureprocessingstepsarray of step objects to get the correct step name - ORnumberfield should also be deterministic based on the yaml definitionfailure()is nottrue- that is, the job passed, the JSON will use the default value of0Example snippet of step output from API response:
{ "name": "{\"exitCode\":2}", "status": "completed", "conclusion": "success", "number": 8, "started_at": "2023-10-18T17:22:29.000-07:00", "completed_at": "2023-10-18T17:22:29.000-07:00" },run-nameproperty to use the custom ID set in the workflow inputsworkflow_namekeyrun-namecan only reference the github and inputs contexts.{ "id": 17842055225, "run_id": 6568125852, "workflow_name": "My custom ID", "head_branch": "integration-job-error-handling", ... }Example runs (using my fork)
Successful cron run: https://github.com/timkimadobe/aepsdk-edge-ios/actions/runs/6579230035
Successful run: https://github.com/timkimadobe/aepsdk-edge-ios/actions/runs/6568252546/job/17842380191
Failure with custom ID: https://github.com/timkimadobe/aepsdk-edge-ios/actions/runs/6568126782/job/17842058447
Failure with default name: https://github.com/timkimadobe/aepsdk-edge-ios/actions/runs/6568125852/job/17842055225
I've also set my fork's default branch to the one opening this PR so that the cron + this update hopefully triggers together, since these workflow changes will not be effective as the default behavior in the main repo until it is merged into
mainRelated Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: