angular-cn/scripts
George Kalpakas 9bc8864d03 ci: always track and check payload size data for angular.io (#33987)
As part of the `payload-size` npm script in `aio/package.json` (which is
run on CI), the sizes of the angular.io app bundles are checked to
ensure they do not exceed certain limits and are also uploaded to
Firebase to be available for later analysis. The uploaded data include
the type of the changes (dependencies only, application only, or both).
The type of changes is inferred by looking at the files that have
changed inside the `aio/` directory.

When the `payload-size.sh` script was first introduced, the only files
that could affect bundle sizes were inside the `aio/` directory.
Therefore, the script would skip uploading the data and checking the
sizes if no changes were detected inside the `aio/` directory.

However, this assumption stopped being valid over time. For example:
- We started tracking/checking bundle sizes when building the angular.io
  app with the locally built Angular packages (which live outside the
  `aio/` directory.
- Due to CircleCI limitations, the `CI_COMMIT_RANGE` environment
  variable (which is used for determining what files have been affected)
  stopped reflecting the whole commit range of the build and only
  included the last commit instead.

Based on the above, there were many cases were size data would not be
uploaded to Firebase, even when they may have been affected (because the
affecting changes were outside `aio/` - e.g. in framework packages).
This makes it harder to analyze size regressions, because important
data-points are missing.

Even worse, in these cases, the sizes were not even checked against the
specified limits, thus making it possible for size regressions to go
unnoticed (unless caught by other similar tests).

This commit fixes the `scripts/ci/payload-size.sh` script to always
track and check payload sizes for angular.io bundles.

NOTE: This change will result in more data being recorded (i.e.
      recording data when it is not possible for the bundle sizes to
      have been affected by the changes). This is still preferable to
      failing to record and/or check when sizes could have been
      affected.

PR Close #33987
2019-11-25 16:36:07 -05:00
..
browserstack ci: clean up CI logging, folding, add build time logging, and improve error handling (#14425) 2017-03-02 00:22:24 -08:00
ci ci: always track and check payload size data for angular.io (#33987) 2019-11-25 16:36:07 -05:00
git build: mention where to find the invalid commit message, when validation fails (#32420) 2019-08-30 13:52:54 -04:00
github build: update base SHA for rebase on merge-pr script 2019-05-21 17:07:19 -07:00
local-dev build: update setup-rbe.sh script and documentation to remove http-remote-cache config (#33907) 2019-11-21 10:45:57 -08:00
release build: ensure that version stamping is applied when the npm_package publish action is called (#33512) 2019-10-31 10:21:41 -07:00
saucelabs ci: move bazel saucelabs execution to script to be used across all Angular repos (#32141) 2019-08-16 09:57:23 -07:00
build-ivy-npm-packages.js build: fix build scripts on macOS (#33854) 2019-11-15 16:05:00 -08:00
build-packages-dist.js build: fix build scripts on macOS (#33854) 2019-11-15 16:05:00 -08:00
package-builder.js build: ensure package-builder finds bazel (#33904) 2019-11-19 11:40:19 -08:00