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

Add response HTTP status to Networking engine responses #3641

Merged
merged 5 commits into from
Sep 16, 2021

Conversation

Pavelas
Copy link
Contributor

@Pavelas Pavelas commented Sep 16, 2021

Description

This pull request fixes the issue: #3640

Basically I just added response status to response filter, it can be useful for someone who needs to check response status and based on that do some actions.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update

Checklist:

  • I have signed the Google CLA https://cla.developers.google.com
  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have verified my change on multiple browsers on different platforms
  • I have run ./build/all.py and the build passes
  • I have run ./build/test.py and all tests pass

@google-cla
Copy link

google-cla bot commented Sep 16, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

externs/shaka/net.js Outdated Show resolved Hide resolved
externs/shaka/net.js Outdated Show resolved Hide resolved
@google-cla
Copy link

google-cla bot commented Sep 16, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@shaka-bot
Copy link
Collaborator

Test Failure:

Generating Closure dependencies...
Linting JavaScript...
Linting CSS...
Linting HTML...

Config loaded: /var/lib/jenkins/workspace/Manual PR Test (local-tests)/.htmlhintrc

Config loaded: /var/lib/jenkins/workspace/Manual PR Test (local-tests)/.htmlhintrc

Config loaded: /var/lib/jenkins/workspace/Manual PR Test (local-tests)/.htmlhintrc

Scanned 3 files, no errors found (56 ms).
Checking that the build files are complete...
Checking for common misspellings...
Checking correct usage of eslint-disable...
Checking the tests for type errors...
No changes detected, skipping. Use --force to override.
/var/lib/jenkins/workspace/Manual PR Test (local-tests)/demo/common/assets.js:180:11: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
180|  * @param {shaka.extern.Response} response
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/externs/shaka/net.js:105:5: ERROR - [JSC_TYPE_PARSE_ERROR] Bad type annotation. expected closing } See https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler for more information.
105|  *   headers: !Object.<string, string>,
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/externs/shaka/net.js:147:42: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
147|  *     !shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/externs/shaka/net.js:210:23: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
210|  *                     shaka.extern.Response):
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/dash/mpd_utils.js:433:47: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
433|     /** @type {!shaka.util.AbortableOperation.<shaka.extern.Response>} */ (
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/hls/hls_parser.js:2060:24: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
2060|    * @return {!Promise.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/hls/hls_parser.js:2595:25: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
2595|    * @return {!Promise.<!shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/hls/hls_parser.js:2687:24: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
2687|    * @return {!Promise.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/data_uri_plugin.js:29:49: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
29|    * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/data_uri_plugin.js:36:17: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
36|       /** @type {shaka.extern.Response} */
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/http_fetch_plugin.js:32:49: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
32|    * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/http_fetch_plugin.js:99:24: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
99|    * @return {!Promise<!shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/http_plugin_utils.js:27:15: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
27|    * @return {!shaka.extern.Response}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/http_plugin_utils.js:32:17: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
32|       /** @type {shaka.extern.Response} */
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/http_xhr_plugin.js:29:49: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
29|    * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/networking_engine.js:695:50: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
695|  * @implements {shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/net/networking_engine.js:787:15: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
787|  *   response: shaka.extern.Response,
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/offline/offline_scheme.js:28:49: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
28|    * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/offline/offline_scheme.js:53:49: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
53|    * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/offline/offline_scheme.js:57:15: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
57|     /** @type {shaka.extern.Response} */
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/lib/offline/offline_scheme.js:71:49: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
71|    * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/test/media/streaming_engine_unit.js:3175:19: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
3175|         /** @type {shaka.extern.Response} */
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/test/net/http_plugin_unit.js:332:51: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
332|       /** @type {shaka.extern.IAbortableOperation.<shaka.extern.Response>} */
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/test/net/networking_engine_unit.js:1238:15: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
1238|   /** @return {shaka.extern.Response} */
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/test/test/util/fake_networking_engine.js:70:49: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
70|    * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/test/test/util/fake_networking_engine.js:126:17: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
126|       /** @type {shaka.extern.Response} */
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/test/test/util/test_scheme.js:90:49: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
90|    * @return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/test/test/util/test_scheme.js:95:17: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
95|       /** @type {shaka.extern.Response} */
^

/var/lib/jenkins/workspace/Manual PR Test (local-tests)/test/test/util/test_scheme.js:144:15: ERROR - [JSC_UNRECOGNIZED_TYPE_ERROR] Bad type annotation. Unknown type shaka.extern.Response
144|     /** @type {shaka.extern.Response} */
^

29 error(s), 0 warning(s), 92.9% typed
Build failed
END-BUILD: FAILURE
Build step 'Execute shell' marked build as failure

externs/shaka/net.js Outdated Show resolved Hide resolved
@shaka-bot
Copy link
Collaborator

All tests passed!

@theodab theodab merged commit 2701527 into shaka-project:master Sep 16, 2021
@theodab
Copy link
Contributor

theodab commented Sep 16, 2021

Thanks for your contributions!
Also, thanks for the code review, Alvaro.

@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
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants