Skip to content

build: use bazel version from node modules - #26691

Closed
devversion wants to merge 2 commits into
angular:masterfrom
devversion:build/use-bazel-from-node-modules
Closed

devversion wants to merge 2 commits into
angular:masterfrom
devversion:build/use-bazel-from-node-modules

Conversation

@devversion

@devversion devversion commented Oct 23, 2018 •

Copy link
Copy Markdown
Member
  • No longer depends on a custom CircleCI docker image that comes with Bazel pre-installed. Since Bazel is now available through NPM, we should be able to use the version from @bazel/bazel in order to enforce a consistent environment on CI and locally.
  • This also reduces the amount of packages that need to be published (ngcontainer is removed)

@devversion
devversion force-pushed the build/use-bazel-from-node-modules branch 2 times, most recently from 787cb0b to b916a55 Compare October 23, 2018 18:25
@devversion

Copy link
Copy Markdown
Member Author

This is blocked on bazel-contrib/rules_nodejs#390. Need to wait for the fix being available in @bazel/bazel.

Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd rather it was more parallel and less clever.

Both docker vars should just be the image, then below when you need to override do the whole

docker:
  - image: *browsers_docker_image

Also put the two docker images next to each other in the file so it's more clear they should be updated together

Comment thread BUILD.bazel Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

actually, please remove this whole alias

Bazel no longer depends on the node_modules directory so users should never manually install

Comment thread docs/BAZEL.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove the sections above about installing things

@devversion
devversion force-pushed the build/use-bazel-from-node-modules branch 4 times, most recently from 35200c0 to 14294e7 Compare October 24, 2018 08:06
@devversion devversion changed the title WIP build: use bazel version from node modules build: use bazel version from node modules Oct 24, 2018
@devversion
devversion force-pushed the build/use-bazel-from-node-modules branch from 14294e7 to c0682b8 Compare October 24, 2018 08:23
@devversion

Copy link
Copy Markdown
Member Author

@alexeagle Addressed your feedback. Thanks. This should be ready for another review.

@alexeagle alexeagle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't delete the tools/ngcontainer yet - a bunch of other repos still depend on it

thanks for working on this! looks great

Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0.7.0 should be changed (to 10.12 I think) - out of caution we like the cache key to change whenever the container does, because we had a cache corruption once

and keep the comment about "if you change the docker_image version"
but no longer need "and the version of com_github... in the /WORKSPACE"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done. I've used node-10.12 in order to make it clear that the 10.12 stands for the NodeJS version.

Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no point running bazel info release anymore, we know it's the one in yarn.lock

Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated
Comment thread docs/BAZEL.md Outdated
@devversion
devversion force-pushed the build/use-bazel-from-node-modules branch from c0682b8 to f1dd3d6 Compare October 24, 2018 14:21
@alexeagle alexeagle added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Oct 24, 2018

@gkalpak gkalpak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This also needs rebasing on latest master, because config.yml has changed (e.g. f8741c0).

Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the the --> the

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch.

Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👌

Comment thread package.json Outdated
@gkalpak gkalpak added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Oct 26, 2018
@devversion
devversion force-pushed the build/use-bazel-from-node-modules branch from f1dd3d6 to 6327372 Compare October 26, 2018 17:55
Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Inconsistent (although arguably more reasonable) indentation.

Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's keep the comments consistent between test_docs_examples_0 and test_docs_examples_1 🙏

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure 😄

Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This was running yarn install with the --cwd aio option.

Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: It is not only the PWA score tests that require Chrome. (We run some minimal e2e tests as well now.)

@devversion
devversion force-pushed the build/use-bazel-from-node-modules branch from 6327372 to 20d37e2 Compare October 26, 2018 21:03
@devversion

devversion commented Oct 26, 2018 •

Copy link
Copy Markdown
Member Author

Addressed all comments and rebased multiple times (with the recent changes to config.yml)

Closing and re-opening in favor of triggering CircleCI.

@devversion devversion closed this Oct 26, 2018
@devversion devversion reopened this Oct 26, 2018
@devversion
devversion force-pushed the build/use-bazel-from-node-modules branch from 20d37e2 to 2d96449 Compare October 26, 2018 21:13
@googlebot

Copy link
Copy Markdown

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@mary-poppins

Copy link
Copy Markdown

You can preview f69489f at https://pr26691-f69489f.ngbuilds.io/.

alexeagle and others added 2 commits October 30, 2018 16:53
This makes yarn_install of ngdeps under Bazel faster, since we don't need many of the large dependencies.
It's important because downstream angular/bazel users will observe the same install time.
* No longer depends on a custom CircleCI docker image that comes with Bazel pre-installed. Since Bazel is now available through NPM, we should be able to use the version from `@bazel/bazel` in order to enforce a consistent environment on CI and locally.
* This also reduces the amount of packages that need to be published (ngcontainer is removed)
@devversion
devversion force-pushed the build/use-bazel-from-node-modules branch from f69489f to 3d48fac Compare October 30, 2018 15:54
@devversion devversion closed this Oct 30, 2018
@devversion devversion reopened this Oct 30, 2018
@mary-poppins

Copy link
Copy Markdown

You can preview 3d48fac at https://pr26691-3d48fac.ngbuilds.io/.

@devversion

Copy link
Copy Markdown
Member Author

This is finally green (after soo much closing and reopening; CI still doesn't run properly).

There was a failing test within the compiler-cli that unintentionally ran because initially we locked the NodeJS rules to v0.15.2 which doesn't include: bazel-contrib/rules_nodejs@b576f1e

@alexeagle

Copy link
Copy Markdown
Contributor

Caretaker: this was approved but pullapprove is stale, merge-assistance please

matsko pushed a commit that referenced this pull request Oct 30, 2018
This makes yarn_install of ngdeps under Bazel faster, since we don't need many of the large dependencies.
It's important because downstream angular/bazel users will observe the same install time.

PR Close #26691
matsko pushed a commit that referenced this pull request Oct 30, 2018
* No longer depends on a custom CircleCI docker image that comes with Bazel pre-installed. Since Bazel is now available through NPM, we should be able to use the version from `@bazel/bazel` in order to enforce a consistent environment on CI and locally.
* This also reduces the amount of packages that need to be published (ngcontainer is removed)

PR Close #26691
@matsko matsko closed this in 66be3c9 Oct 30, 2018
matsko pushed a commit that referenced this pull request Oct 30, 2018
* No longer depends on a custom CircleCI docker image that comes with Bazel pre-installed. Since Bazel is now available through NPM, we should be able to use the version from `@bazel/bazel` in order to enforce a consistent environment on CI and locally.
* This also reduces the amount of packages that need to be published (ngcontainer is removed)

PR Close #26691
gkalpak added a commit to gkalpak/angular that referenced this pull request Feb 2, 2019
By default, `webdriver-manager update` will download the latest
ChromeDriver version, which might not be compatible with the Chrome
version included in the [docker image used on CI], causing CI failures.
Previously, we used to pin the ChromeDriver version on CI in
[ngcontainer's Dockerfile][2]. This was accidentally broken in angular#26691,
while moving from ngcontainer to default CircleCI docker images.

This commit fixes the issue by pinning ChromeDriver to a known
compatible version.

[1]: https://github.com/angular/angular/blob/bfd48d156d5663cc49d1ec40c2d73ff76a2fe62f/.circleci/config.yml#L16
[2]: https://github.com/angular/angular/blob/bfd48d156d5663cc49d1ec40c2d73ff76a2fe62f/tools/ngcontainer/Dockerfile#L63
matsko pushed a commit that referenced this pull request Feb 2, 2019
…me (#28494)

By default, `webdriver-manager update` will download the latest
ChromeDriver version, which might not be compatible with the Chrome
version included in the [docker image used on CI], causing CI failures.
Previously, we used to pin the ChromeDriver version on CI in
[ngcontainer's Dockerfile][2]. This was accidentally broken in #26691,
while moving from ngcontainer to default CircleCI docker images.

This commit fixes the issue by pinning ChromeDriver to a known
compatible version.

[1]: https://github.com/angular/angular/blob/bfd48d156d5663cc49d1ec40c2d73ff76a2fe62f/.circleci/config.yml#L16
[2]: https://github.com/angular/angular/blob/bfd48d156d5663cc49d1ec40c2d73ff76a2fe62f/tools/ngcontainer/Dockerfile#L63

PR Close #28494
matsko pushed a commit that referenced this pull request Feb 2, 2019
…me (#28494)

By default, `webdriver-manager update` will download the latest
ChromeDriver version, which might not be compatible with the Chrome
version included in the [docker image used on CI], causing CI failures.
Previously, we used to pin the ChromeDriver version on CI in
[ngcontainer's Dockerfile][2]. This was accidentally broken in #26691,
while moving from ngcontainer to default CircleCI docker images.

This commit fixes the issue by pinning ChromeDriver to a known
compatible version.

[1]: https://github.com/angular/angular/blob/bfd48d156d5663cc49d1ec40c2d73ff76a2fe62f/.circleci/config.yml#L16
[2]: https://github.com/angular/angular/blob/bfd48d156d5663cc49d1ec40c2d73ff76a2fe62f/tools/ngcontainer/Dockerfile#L63

PR Close #28494
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants