Skip to content

build(docs-infra): use local version of Zone.js when testing against local packages#35858

Closed
gkalpak wants to merge 2 commits intoangular:masterfrom
gkalpak:build-aio-local-zones
Closed

build(docs-infra): use local version of Zone.js when testing against local packages#35858
gkalpak wants to merge 2 commits intoangular:masterfrom
gkalpak:build-aio-local-zones

Conversation

@gkalpak
Copy link
Copy Markdown
Member

@gkalpak gkalpak commented Mar 4, 2020

This PR re-applies commit 7d832ae (see commit message for details), which was initially introduced in #35780 and then reverted in #35857, because it was causing the publish-artifacts CI job to fail (example failure).

This PR contains commit 7d832ae as is, plus a fixup commit to prevent the pusblish-artifacts failure.

@gkalpak gkalpak added area: build & ci Related the build and CI infrastructure of the project comp: docs-infra action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Mar 4, 2020
@ngbot ngbot Bot modified the milestone: needsTriage Mar 4, 2020
@gkalpak gkalpak added state: WIP and removed action: merge The PR is ready for merge by the caretaker labels Mar 4, 2020
@mary-poppins
Copy link
Copy Markdown

@gkalpak gkalpak force-pushed the build-aio-local-zones branch from 1692227 to 40e7dc0 Compare March 4, 2020 19:19
@mary-poppins
Copy link
Copy Markdown

@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed state: WIP labels Mar 4, 2020
gkalpak added 2 commits March 6, 2020 19:53
…local packages

In some cases, we want to test the AIO app or docs examples against the
locally built Angular packages (for example to ensure that the changes
in a commit do not introduce a breaking change). In order to achieve
this, we have the `ng-packages-installer` script that handles updating
a project's `package.json` file to use the locally built Angular
packages (and appropriate versions for their (dev-/peer-)dependencies).

Previously, `ng-packages-installer` would only consider the locally
built Angular packages (from `dist/packages-dist/`). However, given that
Zone.js is now part of the `angular/angular` repo, it makes sense to
also use the locally built Zone.js package (from `dist/zone.js-dist/`).
Otherwise, the tests might fail for commits that update both the Angular
packages (and related docs examples) and the Zone.js package. An example
of such a simultaneous change (that would have broken tests) is angular#33838.

This commit updates the script to install the locally built Zone.js
package (in addition to the Angular ones). The commit ensures that the
Zone.js package will always be available alongside the Angular packages
(i.e. that the Zone.js package will be built by the same script that
builds the Angular packages and that the `dist/zone.js-dist/` directory
will be cached on CI).

Note: This problem was discovered while enabling docs examples unit
tests in angular#34374.
@gkalpak gkalpak force-pushed the build-aio-local-zones branch from 40e7dc0 to ab32bbf Compare March 6, 2020 17:53
@gkalpak
Copy link
Copy Markdown
Member Author

gkalpak commented Mar 6, 2020

(Rebased on master to resolve merge conflict.)

@mary-poppins
Copy link
Copy Markdown

@IgorMinar
Copy link
Copy Markdown
Contributor

lgtm - global approval

@IgorMinar IgorMinar removed the request for review from petebacondarwin March 6, 2020 18:16
@matsko matsko closed this in 82a6fc5 Mar 6, 2020
matsko pushed a commit that referenced this pull request Mar 6, 2020
…local packages (#35858)

In some cases, we want to test the AIO app or docs examples against the
locally built Angular packages (for example to ensure that the changes
in a commit do not introduce a breaking change). In order to achieve
this, we have the `ng-packages-installer` script that handles updating
a project's `package.json` file to use the locally built Angular
packages (and appropriate versions for their (dev-/peer-)dependencies).

Previously, `ng-packages-installer` would only consider the locally
built Angular packages (from `dist/packages-dist/`). However, given that
Zone.js is now part of the `angular/angular` repo, it makes sense to
also use the locally built Zone.js package (from `dist/zone.js-dist/`).
Otherwise, the tests might fail for commits that update both the Angular
packages (and related docs examples) and the Zone.js package. An example
of such a simultaneous change (that would have broken tests) is #33838.

This commit updates the script to install the locally built Zone.js
package (in addition to the Angular ones). The commit ensures that the
Zone.js package will always be available alongside the Angular packages
(i.e. that the Zone.js package will be built by the same script that
builds the Angular packages and that the `dist/zone.js-dist/` directory
will be cached on CI).

Note: This problem was discovered while enabling docs examples unit
tests in #34374.

PR Close #35858
@gkalpak gkalpak deleted the build-aio-local-zones branch March 9, 2020 14:53
@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 Apr 9, 2020
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 area: build & ci Related the build and CI infrastructure of the project cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants