Skip to content

build(bazel): run aio application e2e tests under bazel - #45952

Merged
josephperrott merged 1 commit into
angular:aio-bazel-migrationfrom
aspect-forks:aio-bazel-e2e
May 24, 2022
Merged

build(bazel): run aio application e2e tests under bazel#45952
josephperrott merged 1 commit into
angular:aio-bazel-migrationfrom
aspect-forks:aio-bazel-e2e

Conversation

@kormide

@kormide kormide commented May 11, 2022

Copy link
Copy Markdown
Contributor

@gkalpak @devversion @gregmagolan @josephperrott

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:

What is the new behavior?

The aio application e2e tests now run under bazel.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove
pullapprove Bot requested review from alxhub and devversion May 11, 2022 06:44
Comment thread aio/package.json Outdated
Comment on lines 89 to 91

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Protractor depends on 12.1.7 but that version has a bug on m1 machines where the url to download the browser isn't correct.

Comment thread WORKSPACE Outdated
Comment thread aio/scripts/bazel-puppeteer-postinstall.mjs Outdated
@jessicajaniuk jessicajaniuk added the area: build & ci Related the build and CI infrastructure of the project label May 12, 2022
@ngbot ngbot Bot added this to the Backlog milestone May 12, 2022
Comment thread aio/scripts/bazel-puppeteer-postinstall.mjs Outdated
Comment thread aio/scripts/bazel-puppeteer-postinstall.mjs Outdated
@kormide
kormide force-pushed the aio-bazel-e2e branch 3 times, most recently from 57011e0 to 3ce818c Compare May 16, 2022 22:43
@kormide

kormide commented May 16, 2022

Copy link
Copy Markdown
Contributor Author

@devversion I added a second commit that uses the bazel-provided chromium toolchain. It's dependent on this fix for rules_nodejs: bazel-contrib/rules_nodejs#3456. I'll update and squash once that lands.

@kormide
kormide requested a review from devversion May 16, 2022 22:46
Comment thread aio/BUILD.bazel 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 is great! thanks. Out of curiosity, could we avoid the .. thing? this is actually a short-path already and likely you would need to resolve the path using the runfile helpers?

@kormide kormide May 17, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The raw strings that these variables resolve to on my box are:

../org_chromium_chromedriver_linux_x64/chromedriver_linux64/chromedriver
../org_chromium_chromium_linux_x64/chrome-linux/chrome

They include a ../ which seems to already refer to a runfiles path? But they need a second ../ to counteract the chdir on this target.

Do you think I should still be using the runfile helpers?

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.

does this even work on windows? on windows the runfiles are not symlinked right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried to test this on my Windows vm but it looks like I've allowed a couple other things to regress on windows. I think I should start getting some of this running on ci, at least partially so I can check for any regressions on each PR. Are you okay with merging this as is and I'll do a Windows pass for the next PR?

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.

Sounds good to me

Comment thread aio/tests/e2e/protractor.conf.js Outdated
@kormide
kormide force-pushed the aio-bazel-e2e branch 3 times, most recently from 82b6237 to fe1d60e Compare May 18, 2022 17:21
Comment thread aio/BUILD.bazel Outdated
Comment thread aio/BUILD.bazel 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.

does this even work on windows? on windows the runfiles are not symlinked right?

Includes a postinstall fix for puppeteer so that chromium
can be run with protractor on osx under bazel

@josephperrott josephperrott 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.

LGTM

@josephperrott
josephperrott merged commit d0a7c0f into angular:aio-bazel-migration May 24, 2022
@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 Jun 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: build & ci Related the build and CI infrastructure of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants