fix(server): log error when file loading or preprocessing fails#3540
Merged
johnjbarton merged 1 commit intokarma-runner:masterfrom Aug 10, 2020
Merged
Conversation
Member
|
✅ Build karma 317 completed (commit 543fec5d6e by @matz3) |
|
✅ Build karma 2715 completed (commit 543fec5d6e by @matz3) |
Member
|
✅ Build karma 316 completed (commit 1f7909afa6 by @matz3) |
Contributor
Author
|
Added some comment about the background / context of this fix |
johnjbarton
approved these changes
Aug 10, 2020
Contributor
johnjbarton
left a comment
There was a problem hiding this comment.
I'm a bit worried that some "normal error" condition will result in lots of logging, but let's see.
Contributor
|
Thanks, sorry for the delay. |
karmarunnerbot
pushed a commit
that referenced
this pull request
Aug 31, 2020
# [5.2.0](v5.1.1...v5.2.0) (2020-08-31) ### Bug Fixes * **client:** avoid race between execute and clearContext ([#3452](#3452)) ([8bc5b46](8bc5b46)), closes [#3424](#3424) * **client:** check in bundled client code into version control ([#3524](#3524)) ([6cd5a3b](6cd5a3b)), closes [/github.com/karma-runner/karma/commit/f5521df7df5cd1201b5dce28dc4e326b1ffc41fd#commitcomment-38967493](https://github.com//github.com/karma-runner/karma/commit/f5521df7df5cd1201b5dce28dc4e326b1ffc41fd/issues/commitcomment-38967493) * **dependencies:** update dependencies ([#3543](#3543)) ([5db46b7](5db46b7)) * **docs:** Update 03-how-it-works.md ([#3539](#3539)) ([e7cf7b1](e7cf7b1)) * **server:** log error when file loading or preprocessing fails ([#3540](#3540)) ([fc2fd61](fc2fd61)) ### Features * **server:** allow 'exit' listeners to set exit code ([#3541](#3541)) ([7a94d33](7a94d33))
Member
|
🎉 This PR is included in version 5.2.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
anthony-redFox
pushed a commit
to anthony-redFox/karma
that referenced
this pull request
May 16, 2023
# [5.2.0](karma-runner/karma@v5.1.1...v5.2.0) (2020-08-31) ### Bug Fixes * **client:** avoid race between execute and clearContext ([karma-runner#3452](karma-runner#3452)) ([8bc5b46](karma-runner@8bc5b46)), closes [karma-runner#3424](karma-runner#3424) * **client:** check in bundled client code into version control ([karma-runner#3524](karma-runner#3524)) ([6cd5a3b](karma-runner@6cd5a3b)), closes [/github.com/karma-runner/karma/commit/f5521df7df5cd1201b5dce28dc4e326b1ffc41fd#commitcomment-38967493](https://github.com//github.com/karma-runner/karma/commit/f5521df7df5cd1201b5dce28dc4e326b1ffc41fd/issues/commitcomment-38967493) * **dependencies:** update dependencies ([karma-runner#3543](karma-runner#3543)) ([5db46b7](karma-runner@5db46b7)) * **docs:** Update 03-how-it-works.md ([karma-runner#3539](karma-runner#3539)) ([e7cf7b1](karma-runner@e7cf7b1)) * **server:** log error when file loading or preprocessing fails ([karma-runner#3540](karma-runner#3540)) ([fc2fd61](karma-runner@fc2fd61)) ### Features * **server:** allow 'exit' listeners to set exit code ([karma-runner#3541](karma-runner#3541)) ([7a94d33](karma-runner@7a94d33))
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.
Previously the error has been fully ignored.
Context / background
This has been detected within SAP/openui5 where we start a local server in parallel to karma. When upgrading to karma v5 we faced some issues mainly on Windows. It turned out that the root cause is
EMFILE, too many open files, probably because internal timings have changed by switching from bluebird to native Promises.As the actual error hasn't been logged, it took me some time to find out where the error comes from.
We solved the problem on our side by starting the server as part of an async framework plugin, instead of just
requireing it from thekarma.conf.js(see UI5/openui5@e77a49a). This ensures that it doesn't get executed while karma is preprocessing all the project files. IMO it's anyway a better approach as it is ensured that the server is up and running before karma starts.