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(middleware/runner): handle file list rejections #3400

Conversation

nicojs
Copy link
Contributor

@nicojs nicojs commented Nov 21, 2019

This PR adds error handling for rejections on the file list methods in the runner middleware. As discussed in #3396 it does this by handling an error the same way an error in a run is handled.

Fixes #3396

@googlebot
Copy link

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.

@karmarunnerbot
Copy link
Member

Build karma 56 failed (commit 47791744fa by @)

@AppVeyorBot
Copy link

Build karma 2454 completed (commit 47791744fa by @)

@karmarunnerbot
Copy link
Member

Build karma 55 completed (commit 47791744fa by @)

@nicojs nicojs force-pushed the fix/handle-file-list-rejections-in-runner-middleware branch from 3edf9ce to 1d15e53 Compare November 21, 2019 07:49
@AppVeyorBot
Copy link

Build karma 2455 completed (commit ca587ed6ac by @)

@karmarunnerbot
Copy link
Member

Build karma 56 completed (commit b466c42e00 by @)

@karmarunnerbot
Copy link
Member

Build karma 57 completed (commit b466c42e00 by @)

@nicojs nicojs force-pushed the fix/handle-file-list-rejections-in-runner-middleware branch from 1d15e53 to 612d070 Compare November 21, 2019 08:15
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@AppVeyorBot
Copy link

Build karma 2456 completed (commit 811793be51 by @nicojs)

@karmarunnerbot
Copy link
Member

Build karma 58 completed (commit 10bf8439fe by @nicojs)

@karmarunnerbot
Copy link
Member

Build karma 57 completed (commit 10bf8439fe by @nicojs)

@nicojs
Copy link
Contributor Author

nicojs commented Nov 21, 2019

I think the failing build is unrelated. It succeeds on Node 8, but fails on Node 10, in test that I didn't impacted (I think).

Can a maintainer please take a look at it. Thanks!

Copy link
Contributor

@johnjbarton johnjbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks

lib/executor.js Show resolved Hide resolved
lib/executor.js Outdated Show resolved Hide resolved
@@ -1,3 +1,4 @@
// @ts-check
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, the @ts-check helped me to write the PR, forgot to remove it again.

@nicojs nicojs force-pushed the fix/handle-file-list-rejections-in-runner-middleware branch from 612d070 to 28bb0b0 Compare November 23, 2019 22:13
@nicojs
Copy link
Contributor Author

nicojs commented Nov 23, 2019

Thanks for your review @johnjbarton

I've implemented the requested changes. 👍

@karmarunnerbot
Copy link
Member

Build karma 60 completed (commit e2432de132 by @nicojs)

@karmarunnerbot
Copy link
Member

Build karma 59 completed (commit e2432de132 by @nicojs)

@AppVeyorBot
Copy link

Build karma 2458 completed (commit e2432de132 by @nicojs)

@johnjbarton johnjbarton merged commit 80febfb into karma-runner:master Nov 27, 2019
@nicojs nicojs deleted the fix/handle-file-list-rejections-in-runner-middleware branch December 7, 2019 17:55
karmarunnerbot pushed a commit that referenced this pull request Apr 9, 2020
# [5.0.0](v4.4.1...v5.0.0) (2020-04-09)

### Bug Fixes

* install semantic-release as a regular dev dependency ([#3455](#3455)) ([1eaf35e](1eaf35e))
* **ci:** echo travis env that gates release after_success ([#3446](#3446)) ([b8b2ed8](b8b2ed8))
* **ci:** poll every 10s to avoid rate limit. ([#3388](#3388)) ([91e7e00](91e7e00))
* **middleware/runner:** handle file list rejections ([#3400](#3400)) ([80febfb](80febfb)), closes [#3396](#3396) [#3396](#3396)
* **server:** cleanup import of the removed method ([#3439](#3439)) ([cb1bcbf](cb1bcbf))
* **server:** createPreprocessor was removed ([#3435](#3435)) ([5c334f5](5c334f5))
* **server:** detection new MS Edge Chromium ([#3440](#3440)) ([7166ce2](7166ce2))
* **server:** replace optimist on yargs lib ([#3451](#3451)) ([ec1e69a](ec1e69a)), closes [#2473](#2473)
* **server:** Report original error message ([#3415](#3415)) ([79ee331](79ee331)), closes [#3414](#3414)

### Code Refactoring

* use native Promise instead of Bluebird ([#3436](#3436)) ([33a069f](33a069f)), closes [/github.com//pull/3060#discussion_r284797390](https://github.com//github.com/karma-runner/karma/pull/3060/issues/discussion_r284797390)

### Continuous Integration

* drop node 8, adopt node 12 ([#3430](#3430)) ([a673aa8](a673aa8))

### Features

* **docs:** document `DEFAULT_LISTEN_ADDR` constant ([#3443](#3443)) ([057d527](057d527)), closes [#2479](#2479)
* **karma-server:** added log to the server.js for uncaught exception ([#3399](#3399)) ([adc6a66](adc6a66))
* **preprocessor:** obey Pattern.isBinary when set ([#3422](#3422)) ([708ae13](708ae13)), closes [#3405](#3405)

### BREAKING CHANGES

* Karma plugins which rely on the fact that Karma uses Bluebird promises may break as Bluebird-specific API is no longer available on Promises returned by the Karma core
* **server:** Deprecated createPreprocessor removed, karma-browserify < 7 version doesn't work
* no more testing on node 8.
@karmarunnerbot
Copy link
Member

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

anthony-redFox pushed a commit to anthony-redFox/karma that referenced this pull request May 16, 2023
# [5.0.0](karma-runner/karma@v4.4.1...v5.0.0) (2020-04-09)

### Bug Fixes

* install semantic-release as a regular dev dependency ([karma-runner#3455](karma-runner#3455)) ([1eaf35e](karma-runner@1eaf35e))
* **ci:** echo travis env that gates release after_success ([karma-runner#3446](karma-runner#3446)) ([b8b2ed8](karma-runner@b8b2ed8))
* **ci:** poll every 10s to avoid rate limit. ([karma-runner#3388](karma-runner#3388)) ([91e7e00](karma-runner@91e7e00))
* **middleware/runner:** handle file list rejections ([karma-runner#3400](karma-runner#3400)) ([80febfb](karma-runner@80febfb)), closes [karma-runner#3396](karma-runner#3396) [karma-runner#3396](karma-runner#3396)
* **server:** cleanup import of the removed method ([karma-runner#3439](karma-runner#3439)) ([cb1bcbf](karma-runner@cb1bcbf))
* **server:** createPreprocessor was removed ([karma-runner#3435](karma-runner#3435)) ([5c334f5](karma-runner@5c334f5))
* **server:** detection new MS Edge Chromium ([karma-runner#3440](karma-runner#3440)) ([7166ce2](karma-runner@7166ce2))
* **server:** replace optimist on yargs lib ([karma-runner#3451](karma-runner#3451)) ([ec1e69a](karma-runner@ec1e69a)), closes [karma-runner#2473](karma-runner#2473)
* **server:** Report original error message ([karma-runner#3415](karma-runner#3415)) ([79ee331](karma-runner@79ee331)), closes [karma-runner#3414](karma-runner#3414)

### Code Refactoring

* use native Promise instead of Bluebird ([karma-runner#3436](karma-runner#3436)) ([33a069f](karma-runner@33a069f)), closes [/github.com/karma-runner/pull/3060#discussion_r284797390](https://github.com//github.com/karma-runner/karma/pull/3060/issues/discussion_r284797390)

### Continuous Integration

* drop node 8, adopt node 12 ([karma-runner#3430](karma-runner#3430)) ([a673aa8](karma-runner@a673aa8))

### Features

* **docs:** document `DEFAULT_LISTEN_ADDR` constant ([karma-runner#3443](karma-runner#3443)) ([057d527](karma-runner@057d527)), closes [karma-runner#2479](karma-runner#2479)
* **karma-server:** added log to the server.js for uncaught exception ([karma-runner#3399](karma-runner#3399)) ([adc6a66](karma-runner@adc6a66))
* **preprocessor:** obey Pattern.isBinary when set ([karma-runner#3422](karma-runner#3422)) ([708ae13](karma-runner@708ae13)), closes [karma-runner#3405](karma-runner#3405)

### BREAKING CHANGES

* Karma plugins which rely on the fact that Karma uses Bluebird promises may break as Bluebird-specific API is no longer available on Promises returned by the Karma core
* **server:** Deprecated createPreprocessor removed, karma-browserify < 7 version doesn't work
* no more testing on node 8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runner middleware does not handle file-list rejections
5 participants