-
Notifications
You must be signed in to change notification settings - Fork 11.9k
fix(@angular/build): reverts the test output location to its original #31184
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/build): reverts the test output location to its original #31184
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Ahh I had the @angular/cli repository for so long, it's still on my old work email... I'll take a look at if I can fix that and repush the commit, or create a new one...
You should be able to use --reset-author
on git amend
to use your new author info IIRC.
68f622a
to
ae99687
Compare
... and removes unique UUID folders. closes angular#30713
ae99687
to
602a31f
Compare
The test output files were previously kept in memory when using Karma with Webpack.
As of v21, the Vitest runner will use in-memory files via the unit-test
system.
When using the test runners that do still write to disk, the unique identifiers are critical for concurrent test runs.
For v20, an option to address the linked issue may be to implement automatic cleanup similar to what was previously in the Vitest runner: b554bd7
The test output files were previously kept in memory when using Karma with Webpack. As of v21, the Vitest runner will use in-memory files via the
unit-test
system.When using the test runners that do still write to disk, the unique identifiers are critical for concurrent test runs. For v20, an option to address the linked issue may be to implement automatic cleanup similar to what was previously in the Vitest runner: b554bd7
Good point! I think for the main one (karma), this was already in there (but did very little in the previous iteration of course, UUIDs are supposed to be unique) over here:
For web-test-runner:
angular-cli/packages/angular_devkit/build_angular/src/builders/web-test-runner/index.ts
Line 55 in 602a31f
It seems that for Jest this is either sorted differently or is currently not being handled, so that might an improvement to make?
Closes #30713
Reverts the test output location to its original and removes unique UUID folders. This reverts it back to
.angular/cache/test-out/
and does not append theuuid()
to the folder. In the future this could be made optional and perhaps we could introduce aoutput
override for the test options.PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The default (migrated) @angular/build:karma package would output test artifacts into
dist/test-out/<uuid>
, which would quickly build up folders and make it confusing as test results usually aren't a distributable.Issue Number: #30713
What is the new behavior?
The default output directory has been reverted to
.angular/cache/test-out
. Comments have been put in place to prepare the idea to extend it to later allow for custom output directories. It was not clarified if Google itself are depending on this and might require this, so if this is the case let's quickly revisit it and see how we can expand the current solution.Does this PR introduce a breaking change?
Although I'm not certain if it "breaks". The new @angular/build:karma seemed to have changed the default output and that was not considered a breaking change it seems? I have marked it as a breaking change for now.
Other information