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

Enable all Angular Bazel Tests on Windows #29785

Open
3 tasks
meteorcloudy opened this issue Apr 9, 2019 · 4 comments
Open
3 tasks

Enable all Angular Bazel Tests on Windows #29785

meteorcloudy opened this issue Apr 9, 2019 · 4 comments
Labels
area: bazel Issues related to the published `@angular/bazel` build rules area: build & ci Related the build and CI infrastructure of the project freq2: medium P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix windows Issue related to Microsoft's Windows operating system
Milestone

Comments

@meteorcloudy
Copy link
Contributor

meteorcloudy commented Apr 9, 2019

🐞 bug report

Is this a regression?

Nope

Description

Angular tests are only partially enabled on Windows:

# Run tests
- yarn bazel test //tools/ts-api-guardian:all
- yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test

To have better Windows support, we should be able to run all tests on Windows, that is:

bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only
yarn test-ivy-aot //...

(IIUC, yarn test-ivy-aot //... is essentially bazel test --define=compile=aot --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot //...)

I tried to run all tests without ivy-only with Bazel 0.24.1 and got

Executed 102 out of 175 tests: 86 tests pass, 72 fail to build and 17 fail locally.

See full detail at Angular test with Bazel 0.24.1

It turned out all broken tests are because powershell.exe is not available when using --incompatible_strict_action_env. So I sent a change in Bazel to fix this problem. bazelbuild/bazel@6e75219

With Bazel@6e75219, after working around some incompatibility issues, I'm able to build and run all Angular tests on Windows. The results are:

Executed 175 out of 175 tests: 152 tests pass and 23 fail locally.
Executed 7 out of 147 tests: 140 tests pass and 7 fail locally.

Current TODO list is:

🔬 Minimal Reproduction

# Get Bazel binary built at 6e752195f0b0c6d67822368b82c990dff168a258
wget https://storage.googleapis.com/bazel-builds/artifacts/windows/6e752195f0b0c6d67822368b82c990dff168a258/bazel -O <your preferred Bazel path (with .exe extension)>

# Cherry-pick https://github.com/angular/angular/pull/29777 if it's still not merged.

# Run tests except ivy-only
bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only --incompatible_bzl_disallow_load_after_statement=false

# Run ivy-only tests 
bazel test //... --define=compile=aot --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot --incompatible_bzl_disallow_load_after_statement=false

Note that we still need --incompatible_bzl_disallow_load_after_statement=false until the incompatibility issue is fixed.

If you failed to build brotli, you can use the following in packages/bazel/package.bzl:

    http_archive(
        name = "org_brotli",
        sha256 = "44ebae3308fd1a757fdc4891e1e1e61ab964afb223ba298d2ea0c29a49564f53",
        strip_prefix = "brotli-7388ebb113f0e1dbf4ab0f2daddf036abf29b8e6",
        url = "https://github.com/meteorcloudy/brotli/archive/7388ebb113f0e1dbf4ab0f2daddf036abf29b8e6.zip",
    )

🌍 Your Environment

Angular Version:


ec5635430630fb895ddb43017f9939564824e8f8

@alexeagle @filipesilva Can you point this issue to correct people in Angular Windows team? I will also continue to help investigating.

@JoostK JoostK added the area: bazel Issues related to the published `@angular/bazel` build rules label Apr 9, 2019
@ngbot ngbot bot added this to the needsTriage milestone Apr 9, 2019
@meteorcloudy
Copy link
Contributor Author

meteorcloudy commented Apr 10, 2019

Tests to be fixed:

--build_tag_filters=-ivy-only --test_tag_filters=-ivy-only:

  • //packages/compiler-cli/ngcc/test:integration TIMEOUT in 300.2s
  • //modules/benchmarks/src/largetable/ng2:perf_chromium-local FAILED in 170.2s
  • //modules/benchmarks/src/largetable/ng2_switch:perf_chromium-local FAILED in 183.2s
  • //modules/benchmarks/src/tree/iv:perf_chromium-local FAILED in 25.1s
  • //modules/benchmarks/src/tree/ng1:perf_chromium-local FAILED in 259.2s
  • //modules/playground/e2e_test/sourcemap:protractor_tests_chromium-local FAILED in 31.4s
  • //packages/bazel/test/ngc-wrapped:ngc_test FAILED in 7.8s
  • //packages/bazel/test/protractor-2:prodserver_test_chromium-local FAILED in 11.0s
  • //packages/compiler-cli/integrationtest:integrationtest FAILED in 25.9s
  • //packages/compiler-cli/ngcc/test:test FAILED in 6.2s
  • //packages/compiler-cli/test:ngc FAILED in 183.3s
  • //packages/compiler-cli/test/ngtsc:ngtsc FAILED in 157.0s
  • //packages/compiler/test:test FAILED in 31.2s
  • //packages/language-service/test:test FAILED in 278.0s
  • //tools/public_api_guard:common_api FAILED in 7.0s
  • //tools/public_api_guard:core_api FAILED in 6.2s
  • //tools/public_api_guard:core_testing_api FAILED in 6.7s
  • //tools/public_api_guard:forms_api FAILED in 6.1s
  • //tools/public_api_guard:http_api FAILED in 4.6s
  • //tools/public_api_guard:router_api FAILED in 4.7s
  • //tools/public_api_guard:service-worker_config_api FAILED in 7.5s
  • //tools/public_api_guard:upgrade_static_api FAILED in 4.6s
  • //tools/ts-api-guardian:tests FAILED in 12.9s

--define=compile=aot --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot

  • //modules/playground/e2e_test/sourcemap:protractor_tests_chromium-local FAILED in 13.5s
  • //packages/bazel/test/ngc-wrapped:ngc_test FAILED in 4.8s
  • //packages/bazel/test/protractor-2:prodserver_test_chromium-local FAILED in 9.6s
  • //packages/compiler-cli/ngcc/test:test FAILED in 9.0s
  • //packages/compiler-cli/test/compliance:compliance FAILED in 76.0s
  • //packages/compiler-cli/test/ngtsc:ngtsc FAILED in 96.6s
  • //tools/ts-api-guardian:tests FAILED in 11.4s

@pkozlowski-opensource pkozlowski-opensource added the area: build & ci Related the build and CI infrastructure of the project label Apr 10, 2019
@alexeagle
Copy link
Contributor

note, we can publish nightly snapshots of Bazel to npm, so we don't necessarily need to wait for fixes to be released. I started this in https://github.com/alexeagle/rules_nodejs/tree/nightly_bazel but need some help to finish probably

@ngbot ngbot bot modified the milestones: needsTriage, Backlog Apr 24, 2019
AndrewKushnir pushed a commit that referenced this issue Apr 26, 2019
This change addresses several issues with ts-api-guardian and public api guards related tests in Windows

The fixes contain 3 main changes:
1) In `stripExportPattern` - replace `^` with `^^^^`  in RegExp due to a double escaping requirment under Windows. Note that under Linux this the extra character has no effect because it's still a valid RegExp in Js.

2. Force `*.patch` files to always be with a LF line sequence instead of CRLF in windows

3. When adding JSDoc comments consider the presence of a carriage return in a line new feed

Partially addresses #29785

PR Close #30105
AndrewKushnir pushed a commit that referenced this issue Apr 26, 2019
This change addresses several issues with ts-api-guardian and public api guards related tests in Windows

The fixes contain 3 main changes:
1) In `stripExportPattern` - replace `^` with `^^^^`  in RegExp due to a double escaping requirment under Windows. Note that under Linux this the extra character has no effect because it's still a valid RegExp in Js.

2. Force `*.patch` files to always be with a LF line sequence instead of CRLF in windows

3. When adding JSDoc comments consider the presence of a carriage return in a line new feed

Partially addresses #29785

PR Close #30105
AndrewKushnir pushed a commit that referenced this issue Apr 26, 2019
This PR parially addresses #29785 and fixes ` //packages/language-service/test:test`

PR Close #30113
AndrewKushnir pushed a commit that referenced this issue Apr 26, 2019
This PR parially addresses #29785 and fixes ` //packages/language-service/test:test`

PR Close #30113
AndrewKushnir pushed a commit that referenced this issue Apr 29, 2019
AndrewKushnir pushed a commit that referenced this issue Apr 29, 2019
@s-gbz
Copy link
Contributor

s-gbz commented May 7, 2019

Just to clarify: Is there a workaround to have the tests run on Windows successfully?
I faced a similiar issue in #30251 and #30252 😞

@meteorcloudy
Copy link
Contributor Author

#30252 will be fixed by bazelbuild/bazel@6e75219, which will be released with 0.26.0

I can help look into #30251, this looks like a bug instead of a real performance issue.

kara pushed a commit that referenced this issue May 7, 2019
```
//packages/compiler-cli/integrationtest:integrationtest
//packages/compiler-cli/test/compliance:compliance
```

Partially addresses #29785

PR Close #30189
kara pushed a commit that referenced this issue May 7, 2019
```
//packages/compiler-cli/integrationtest:integrationtest
//packages/compiler-cli/test/compliance:compliance
```

Partially addresses #29785

PR Close #30189
alxhub pushed a commit that referenced this issue May 9, 2019
Under Windows, the server binary has an extension of  `.exe` and the current logic is not handling that.

Partially addresses: #29785

PR Close #30346
alxhub pushed a commit that referenced this issue May 9, 2019
Under Windows, the server binary has an extension of  `.exe` and the current logic is not handling that.

Partially addresses: #29785

PR Close #30346
alxhub pushed a commit that referenced this issue May 13, 2019
```
//packages/compiler-cli/test:ngc
//packages/compiler/test:test
```

This also address `node_modules` to the ignored paths for ngc compiler as otherwise the `ready` is never fired

Partially addresses #29785

PR Close #30146
alxhub pushed a commit that referenced this issue May 13, 2019
```
//packages/compiler-cli/test:ngc
//packages/compiler/test:test
```

This also address `node_modules` to the ignored paths for ngc compiler as otherwise the `ready` is never fired

Partially addresses #29785

PR Close #30146
alxhub pushed a commit that referenced this issue May 13, 2019
```
//packages/compiler-cli/ngcc/test:test
```

Partially addresses #29785

PR Close #30297
alxhub pushed a commit that referenced this issue May 13, 2019
```
//packages/compiler-cli/ngcc/test:integration
```

Partially addresses #29785

PR Close #30297
BioPhoton pushed a commit to BioPhoton/angular that referenced this issue May 21, 2019
…30105)

This change addresses several issues with ts-api-guardian and public api guards related tests in Windows

The fixes contain 3 main changes:
1) In `stripExportPattern` - replace `^` with `^^^^`  in RegExp due to a double escaping requirment under Windows. Note that under Linux this the extra character has no effect because it's still a valid RegExp in Js.

2. Force `*.patch` files to always be with a LF line sequence instead of CRLF in windows

3. When adding JSDoc comments consider the presence of a carriage return in a line new feed

Partially addresses angular#29785

PR Close angular#30105
BioPhoton pushed a commit to BioPhoton/angular that referenced this issue May 21, 2019
This PR parially addresses angular#29785 and fixes ` //packages/language-service/test:test`

PR Close angular#30113
BioPhoton pushed a commit to BioPhoton/angular that referenced this issue May 21, 2019
BioPhoton pushed a commit to BioPhoton/angular that referenced this issue May 21, 2019
```
//packages/compiler-cli/integrationtest:integrationtest
//packages/compiler-cli/test/compliance:compliance
```

Partially addresses angular#29785

PR Close angular#30189
BioPhoton pushed a commit to BioPhoton/angular that referenced this issue May 21, 2019
…#30346)

Under Windows, the server binary has an extension of  `.exe` and the current logic is not handling that.

Partially addresses: angular#29785

PR Close angular#30346
BioPhoton pushed a commit to BioPhoton/angular that referenced this issue May 21, 2019
```
//packages/compiler-cli/test:ngc
//packages/compiler/test:test
```

This also address `node_modules` to the ignored paths for ngc compiler as otherwise the `ready` is never fired

Partially addresses angular#29785

PR Close angular#30146
BioPhoton pushed a commit to BioPhoton/angular that referenced this issue May 21, 2019
```
//packages/compiler-cli/ngcc/test:test
```

Partially addresses angular#29785

PR Close angular#30297
BioPhoton pushed a commit to BioPhoton/angular that referenced this issue May 21, 2019
```
//packages/compiler-cli/ngcc/test:integration
```

Partially addresses angular#29785

PR Close angular#30297
@AndrewKushnir AndrewKushnir added the windows Issue related to Microsoft's Windows operating system label May 18, 2020
@jelbourn jelbourn added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed severity3: broken labels Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: bazel Issues related to the published `@angular/bazel` build rules area: build & ci Related the build and CI infrastructure of the project freq2: medium P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix windows Issue related to Microsoft's Windows operating system
Projects
None yet
Development

No branches or pull requests

7 participants