angular-docs-cn/dev-infra
Paul Gschwendtner 9456eca7c5 feat(dev-infra): better caching for browser archive contents (#42814)
Adds better caching for browser archives and their extraction.
This is done because the archives are currently extracted as a build
action and these are actions are invalidated frequently, causing
flakiness on the CI and slow-down in local development.

Here is an example flaky error on the CI (that surfaces often
with RBE execution):

```
ERROR:
/home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/external/npm/@angular/dev-infra-private/bazel/browsers/chromium/BUILD.bazel:22:17:
Extracting ../org_chromium_chromium_amd64/file/chrome-linux.zip failed:
(Exit 34): extract.sh failed: error executing command
external/io_bazel_rules_webtesting/web/internal/extract.sh
external/org_chromium_chromium_amd64/file/chrome-linux.zip ...
(remaining 2 argument(s) skipped). Note: Remote connection/protocol
failed with: execution failed
```

We fix this by introducing a new rule that downloads a browser
archive and unpacks it directly into a Bazel repository. Before
this change, the archive would just be downloaded but extracted
later as part of a build action. This is unnecessary and results
in less efficient caching as build actions are invalidated more
often, especially if developers run `bazel clean` in between.

The root cause on why the extraction often fails in RBE containers
is unclear. It's unclear why the extacted archive is not cached
properly as part of a build action (most likely some hermeticity
issue within `rules_webtesting`, but it seems more Bazel-idiomatic
to unpack the archives as part of the repository anyway, and this solves
the flakiness issue.

PR Close #42814
2021-07-12 14:37:10 -07:00
..
bazel feat(dev-infra): better caching for browser archive contents (#42814) 2021-07-12 14:37:10 -07:00
benchmark build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
caretaker refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
commit-message build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
format refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
misc build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
ngbot build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
pr refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
pullapprove build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
release refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
ts-circular-dependencies build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
tslint-rules feat(dev-infra): add lint rule to enforce no-implicit-override abstract members (#42512) 2021-07-12 13:11:16 -07:00
utils refactor(dev-infra): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:14 -07:00
BUILD.bazel feat(dev-infra): better caching for browser archive contents (#42814) 2021-07-12 14:37:10 -07:00
build-worker.js refactor(dev-infra): update octokit to latest version v18 (#42666) 2021-06-29 10:33:54 -07:00
cli.ts feat(dev-infra): add `ng-dev build-and-link` command (#42319) 2021-05-25 22:11:03 +00:00
commit-message-filter.js refactor(dev-infra): create ng-dev executable locally in the repo (#39089) 2020-10-22 13:36:14 -07:00
defaults.bzl build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
index.bzl build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
ng-dev.js fix(dev-infra): convert commit SHAs and PR numbers to links when generating changelog (#42732) 2021-07-02 09:23:45 -07:00
tmpl-package.json feat(dev-infra): introduce shared tool for validating API signature (#42688) 2021-06-30 11:43:48 -07:00
tsconfig.json build: enable noImplicitOverride in project (#42512) 2021-07-12 13:11:14 -07:00