-
Notifications
You must be signed in to change notification settings - Fork 12k
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(@angular-devkit/build-angular): remove double-watch in karma #28794
Conversation
b05aaed
to
b327c3b
Compare
Boo. Need to look more into this, it still doesn't appear to be passing consistently on CI. |
b327c3b
to
6cd65b1
Compare
The Karma file watching was racing with the file writes done by the application builder. Since we already tell Karma when to reun via `.refeshFiles()`, disabling Karma's own file watcher should make things more reliable. This allows removing a weird special-case in the test case and removes the noisy "File chaned" logs generated by Karma. Fixes angular#28755
6cd65b1
to
e230d47
Compare
The end result is a bit more complex now, mostly to remove a race condition that caused the test instability:
This is likely not a super common case for real users but correctness-wise, it's likely better to set up the file watching at the very beginning. Doing so requires reusing the same P.S.: Looks like the tests are passing now. Requested re-review because the majority of changed lines is now different than what was originally reviewed. |
packages/angular_devkit/build_angular/src/builders/karma/application_builder.ts
Show resolved
Hide resolved
The changes were merged into the following branches: main, 19.0.x |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The Karma file watching was racing with the file writes done by the application builder. Since we already tell Karma when to reun via
.refeshFiles()
, disabling Karma's own file watcher should make things more reliable.This allows removing a weird special-case in the test case and removes the noisy "File chaned" logs generated by Karma.
Fixes #28755