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

docs: move all bazel testing info to a single location #46084

Conversation

dario-piotrowicz
Copy link
Contributor

@dario-piotrowicz dario-piotrowicz commented May 21, 2022

instead of presenting the same (or similar information) in both the
DEVELOPER.md and the BAZEL.md files, more all the information in the
BAZEL file and refer to that section in the DEVELOPER file

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

Issue

Issue Number: N/A

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

  • basically I've been referring to the BAZEL file, but stumbled across the explanation of the ... in the DEVELOPER one, which seemed quite valuable for the BAZEL file as well, instead of copy that section I just figured that the DEVELOPER's md should just point to the BAZEL one and that one should be the only point of reference (as it also contains various information for debugging)

@pullapprove pullapprove bot requested a review from devversion May 21, 2022
- Test package in node: `yarn bazel test packages/core/test:test`
- Test package in karma: `yarn bazel test packages/core/test:test_web`
- Test all packages: `yarn bazel test packages/...`
- Test package in node: `yarn test packages/core/test:test`
- Test package in karma: `yarn test packages/core/test:test_web`
- Test all packages: `yarn test packages/...`
Copy link
Contributor Author

@dario-piotrowicz dario-piotrowicz May 21, 2022

Choose a reason for hiding this comment

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

I think that bazel is not necessary

actually the script seem to use bazelisk (I guess they are the same-ish?):
Screenshot at 2022-05-21 18-20-13

Bazel is used as the primary tool for building and testing Angular. Building and testing are
incremental with Bazel, and it's possible to only run tests for an individual package instead
of for all packages. Read more about this in the [BAZEL.md](./BAZEL.md) document.
Copy link
Contributor Author

@dario-piotrowicz dario-piotrowicz May 21, 2022

Choose a reason for hiding this comment

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

I don't think that explaining why bazel is used adds much here 🤔


**Note**: The first test run will be much slower than future runs. This is because future runs will
benefit from Bazel's capability to do incremental builds.
However the tests will be executed on our Continuous Integration infrastructure. So if you forgot to run the tests and some broke github will present you with the CI errors which you can then fix.
Copy link
Contributor Author

@dario-piotrowicz dario-piotrowicz May 21, 2022

Choose a reason for hiding this comment

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

Honestly I have never run locally all the tests, on my (dinosaur) machine it would take ages, so I think it could be valuable to suggest to do that, but provide the alternative to rely on the CI

Copy link
Member

@devversion devversion May 23, 2022

Choose a reason for hiding this comment

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

Technically if you run everything once locally, you would get the same caching benefits as CI, but in practice this is obviously still slower. Just want to avoid recommend to rely fully on CI. Ideally folks would run some tests for the parts they have changed. e.g. if I change the compiler, I run tests in the compiler/test Bazel package.

Copy link
Contributor Author

@dario-piotrowicz dario-piotrowicz May 23, 2022

Choose a reason for hiding this comment

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

Yeah the first run is definitely my issue, after that the tests do run rather quick 🙂

anyways I hope that the wording here is fine then, sort of letting developers know that CI checks will be performed but not actively recommending to rely solely on that 🙂

@dario-piotrowicz dario-piotrowicz changed the title docs: move all bazel testing into a single location docs: move all bazel testing info into a single location May 21, 2022
@dario-piotrowicz dario-piotrowicz changed the title docs: move all bazel testing info into a single location docs: move all bazel testing info to a single location May 21, 2022
Copy link
Member

@devversion devversion left a comment

LGTM overall


**Note**: The first test run will be much slower than future runs. This is because future runs will
benefit from Bazel's capability to do incremental builds.
However the tests will be executed on our Continuous Integration infrastructure. So if you forgot to run the tests and some broke github will present you with the CI errors which you can then fix.
Copy link
Member

@devversion devversion May 23, 2022

Choose a reason for hiding this comment

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

Technically if you run everything once locally, you would get the same caching benefits as CI, but in practice this is obviously still slower. Just want to avoid recommend to rely fully on CI. Ideally folks would run some tests for the parts they have changed. e.g. if I change the compiler, I run tests in the compiler/test Bazel package.

docs/DEVELOPER.md Outdated Show resolved Hide resolved
instead of presenting the same (or similar information) in both the
DEVELOPER.md and the BAZEL.md files, more all the information in the
BAZEL file and refer to that section in the DEVELOPER file
@angular-robot angular-robot bot requested a review from devversion May 23, 2022
@AndrewKushnir AndrewKushnir added action: merge target: patch action: rerun CI at HEAD comp: docs labels May 23, 2022
@ngbot ngbot bot added this to the Backlog milestone May 23, 2022
@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented May 23, 2022

Merge-assistance: the legacy-unit-tests-saucelabs CI failure is unrelated to the changes in this PR.

@AndrewKushnir AndrewKushnir added the action: merge-assistance label May 23, 2022
@alxhub
Copy link
Contributor

@alxhub alxhub commented May 23, 2022

This PR was merged into the repository by commit f04a8ea.

@alxhub alxhub closed this in f04a8ea May 23, 2022
alxhub pushed a commit that referenced this issue May 23, 2022
instead of presenting the same (or similar information) in both the
DEVELOPER.md and the BAZEL.md files, more all the information in the
BAZEL file and refer to that section in the DEVELOPER file

PR Close #46084
alxhub pushed a commit that referenced this issue May 23, 2022
instead of presenting the same (or similar information) in both the
DEVELOPER.md and the BAZEL.md files, more all the information in the
BAZEL file and refer to that section in the DEVELOPER file

PR Close #46084
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge action: merge-assistance comp: docs target: patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants