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

fix: Allow overriding special handling of 404s #4635

Merged
merged 2 commits into from
Nov 1, 2022

Conversation

joeyparrish
Copy link
Member

In general, streaming.failureCallback is meant to give applications control over error handling at the level of streaming. However, there was a special case for HTTP 404s built into StreamingEngine in a way that applications could not override. This was in spite of the fact that the default failureCallback would already check for and retry on the error code BAD_HTTP_STATUS.

This removes the special case in StreamingEngine and refactors failureCallback and retryStreaming to preserve the special delay imposed in the old 404 handler. With this, applications can override failureCallback to have complete control over 404 handling.

Closes #4548

In general, streaming.failureCallback is meant to give applications
control over error handling at the level of streaming.  However, there
was a special case for HTTP 404s built into StreamingEngine in a way
that applications could not override.  This was in spite of the fact
that the default failureCallback would already check for and retry on
the error code BAD_HTTP_STATUS.

This removes the special case in StreamingEngine and refactors
failureCallback and retryStreaming to preserve the special delay
imposed in the old 404 handler.  With this, applications can override
failureCallback to have complete control over 404 handling.

Closes shaka-project#4548
@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2022

Incremental code coverage: 100.00%

@joeyparrish
Copy link
Member Author

Incremental code coverage: 21.05%

Adding some new test cases to cover defaultStreamingFailureCallback_ in Player.

@joeyparrish
Copy link
Member Author

Incremental code coverage: 100.00%

Much better.

@avelad avelad added type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround labels Nov 1, 2022
@avelad avelad added this to the v4.3 milestone Nov 1, 2022
@joeyparrish joeyparrish merged commit 427f126 into shaka-project:main Nov 1, 2022
@joeyparrish joeyparrish deleted the move-404-handling branch November 1, 2022 18:12
joeyparrish added a commit that referenced this pull request Nov 8, 2022
In general, streaming.failureCallback is meant to give applications
control over error handling at the level of streaming. However, there
was a special case for HTTP 404s built into StreamingEngine in a way
that applications could not override. This was in spite of the fact that
the default failureCallback would already check for and retry on the
error code BAD_HTTP_STATUS.

This removes the special case in StreamingEngine and refactors
failureCallback and retryStreaming to preserve the special delay imposed
in the old 404 handler. With this, applications can override
failureCallback to have complete control over 404 handling.

Closes #4548
joeyparrish added a commit that referenced this pull request Nov 8, 2022
In general, streaming.failureCallback is meant to give applications
control over error handling at the level of streaming. However, there
was a special case for HTTP 404s built into StreamingEngine in a way
that applications could not override. This was in spite of the fact that
the default failureCallback would already check for and retry on the
error code BAD_HTTP_STATUS.

This removes the special case in StreamingEngine and refactors
failureCallback and retryStreaming to preserve the special delay imposed
in the old 404 handler. With this, applications can override
failureCallback to have complete control over 404 handling.

Closes #4548
joeyparrish added a commit that referenced this pull request Nov 8, 2022
In general, streaming.failureCallback is meant to give applications
control over error handling at the level of streaming. However, there
was a special case for HTTP 404s built into StreamingEngine in a way
that applications could not override. This was in spite of the fact that
the default failureCallback would already check for and retry on the
error code BAD_HTTP_STATUS.

This removes the special case in StreamingEngine and refactors
failureCallback and retryStreaming to preserve the special delay imposed
in the old 404 handler. With this, applications can override
failureCallback to have complete control over 404 handling.

Closes #4548
joeyparrish added a commit that referenced this pull request Nov 8, 2022
In general, streaming.failureCallback is meant to give applications
control over error handling at the level of streaming. However, there
was a special case for HTTP 404s built into StreamingEngine in a way
that applications could not override. This was in spite of the fact that
the default failureCallback would already check for and retry on the
error code BAD_HTTP_STATUS.

This removes the special case in StreamingEngine and refactors
failureCallback and retryStreaming to preserve the special delay imposed
in the old 404 handler. With this, applications can override
failureCallback to have complete control over 404 handling.

Closes #4548
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

404'ing segments retry forever and do not respect maxRetries setting
3 participants