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

Error Handling controller and LoadPolicies #5241

Merged

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Feb 18, 2023

This PR will...

Implement an ErrorController to handle error events before and after other controllers. On ERROR, ErrorController is responsible for level switching, falling back to redundant streams, and escalating errors to fatal when there is no action to take.

  • Handle missed probe transmux probe with with FRAG_PARSING_ERROR
  • Handle encrypted init segment and subtitle decryption failure with FRAG_DECRYPT_ERROR
  • Remove delay when retrying after timeout
  • Trigger FRAG_LOADING after request is made
  • All ERROR event data type must include an error property
  • Add stats to network loader error callbacks to allow error handling to use request timing
  • Remove use of console.warn from mp4-tools
  • Add missing TypeScript type exports
  • Switch Pathways after all fallback options are exhausted
  • Failed Pathways go into a penalty box for 5 minutes

Why is this Pull Request needed?

Improve error handling and consolidate error handling logic so that it is easier to follow, and so that it can be replaced with a custom controller.

Completes Content Steering by implementing Pathway penalty and switching on error.

Are there any points in the code the reviewer needs to double check?

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch added this to the 1.4.0 milestone Feb 18, 2023
@robwalch robwalch mentioned this pull request Feb 18, 2023
3 tasks
@robwalch robwalch force-pushed the feature/error-controller-pathway-penalty-network-policy branch from e49ff5c to 1116105 Compare February 18, 2023 20:18
Base automatically changed from feature/content-steering to master February 18, 2023 20:20
@robwalch robwalch force-pushed the feature/error-controller-pathway-penalty-network-policy branch 4 times, most recently from 8d1b80e to bba791b Compare February 22, 2023 01:08
@robwalch robwalch marked this pull request as ready for review February 22, 2023 01:09
Add Error Handling Integration Tests
Handle missed probe transmux probe with with FRAG_PARSING_ERROR
Handle encrypted init segment and subtitle decryption failure with FRAG_DECRYPT_ERROR
Remove delay when retrying after timeout
Trigger FRAG_LOADING after request is made
ERROR event data type must include an error property
Add stats to network loader error callbacks to allow error handling to use request timing
Remove use of console.warn from mp4-tools
Add missing TypeScript type exports
Warn on currentFrag context reference change and use currentFrag to maintain correct stats ref
Fixes #5230
src/utils/error-helper.ts Outdated Show resolved Hide resolved
@robwalch robwalch force-pushed the feature/error-controller-pathway-penalty-network-policy branch from 33224cf to d23e53a Compare February 24, 2023 21:39
@robwalch robwalch force-pushed the feature/error-controller-pathway-penalty-network-policy branch from d23e53a to 90984f9 Compare February 25, 2023 00:14
@robwalch robwalch force-pushed the feature/error-controller-pathway-penalty-network-policy branch from e629562 to 981875c Compare February 25, 2023 03:32
@robwalch robwalch merged commit 8063580 into master Feb 27, 2023
@robwalch robwalch deleted the feature/error-controller-pathway-penalty-network-policy branch February 27, 2023 19:31
@robwalch robwalch mentioned this pull request Mar 9, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant