Visitar URL original
build(bazel): run aio application e2e tests under bazel by kormide · Pull Request #45952 · angular/angular · GitHub
The Wayback Machine - https://web.archive.org/web/20250522141823/https://github.com/angular/angular/pull/45952
Skip to content

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

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

Merged

Conversation

kormide
Copy link
Contributor

@kormide kormide commented May 11, 2022

@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
aio/package.json Outdated
Comment on lines 89 to 91
"resolutions": {
"**/webdriver-manager": "^12.1.8"
},
Copy link
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.

@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
@kormide kormide force-pushed the aio-bazel-e2e branch 3 times, most recently from 57011e0 to 3ce818c Compare May 16, 2022 22:43
@kormide
Copy link
Contributor Author

kormide commented May 16, 2022

@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
data = E2E_FILES + E2E_DEPS,
env = {
"CHROMEDRIVER_BIN": "../$(CHROMEDRIVER)",
"CHROME_BIN": "../$(CHROMIUM)",
Copy link
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?

Copy link
Contributor Author

@kormide kormide May 17, 2022 •

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
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
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
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

@kormide kormide force-pushed the aio-bazel-e2e branch 3 times, most recently from 82b6237 to fe1d60e Compare May 18, 2022 17:21
data = E2E_FILES + E2E_DEPS,
env = {
"CHROMEDRIVER_BIN": "../$(CHROMEDRIVER)",
"CHROME_BIN": "../$(CHROMIUM)",
Copy link
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
Copy link
Member

@josephperrott josephperrott left a comment

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

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