From a4ca6f6ef413b9c181060f60a3563568f3f620cf Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 29 Jan 2020 15:11:40 -0800 Subject: [PATCH] fix(examples): fix karma config in examples/angular_bazel_architect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ChromeHeadess as base instead of passing —headless. This fixes the CI failure on CircleCI and fixes it locally for me on OSX. buildkite macos still fails with ``` # ==================== Test output for //:test: # 29 01 2020 23:31:42.804:INFO [karma-server]: Karma v4.1.0 server started at http://0.0.0.0:9876/ # 29 01 2020 23:31:42.806:INFO [launcher]: Launching browsers ChromeHeadlessNoSandbox with concurrency unlimited # 29 01 2020 23:31:42.808:INFO [launcher]: Starting browser ChromeHeadless # 29 01 2020 23:32:42.815:WARN [launcher]: ChromeHeadless have not captured in 60000 ms, killing. # 29 01 2020 23:32:44.818:WARN [launcher]: ChromeHeadless was not killed in 2000 ms, sending SIGKILL. # 29 01 2020 23:32:46.822:WARN [launcher]: ChromeHeadless was not killed by SIGKILL in 2000 ms, continuing. ``` but this seems to be something to do with the buildkite machine chrome version/configuration as it does work locally on mac for me with Chrome 79. Disabled the test on using `no-bazelci-mac` tag. --- examples/angular_bazel_architect/BUILD.bazel | 15 ++++++++++++++- examples/angular_bazel_architect/WORKSPACE | 6 +++--- examples/angular_bazel_architect/karma.conf.js | 4 ++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/examples/angular_bazel_architect/BUILD.bazel b/examples/angular_bazel_architect/BUILD.bazel index 99accddedf..eb3aeda0cc 100644 --- a/examples/angular_bazel_architect/BUILD.bazel +++ b/examples/angular_bazel_architect/BUILD.bazel @@ -57,7 +57,20 @@ architect_test( "@npm//karma-jasmine", "@npm//karma-jasmine-html-reporter", ], - tags = ["browser:chromium-local"], + tags = [ + "browser:chromium-local", + # This fails locally on macos buildkite trying to capture Chrome. + # Tested locally on OSX and it works so it is something to do with the + # buildkite osx machine chrome version/configuration. + # ==================== Test output for //:test: + # 29 01 2020 23:31:42.804:INFO [karma-server]: Karma v4.1.0 server started at http://0.0.0.0:9876/ + # 29 01 2020 23:31:42.806:INFO [launcher]: Launching browsers ChromeHeadlessNoSandbox with concurrency unlimited + # 29 01 2020 23:31:42.808:INFO [launcher]: Starting browser ChromeHeadless + # 29 01 2020 23:32:42.815:WARN [launcher]: ChromeHeadless have not captured in 60000 ms, killing. + # 29 01 2020 23:32:44.818:WARN [launcher]: ChromeHeadless was not killed in 2000 ms, sending SIGKILL. + # 29 01 2020 23:32:46.822:WARN [launcher]: ChromeHeadless was not killed by SIGKILL in 2000 ms, continuing. + "no-bazelci-mac", + ], ) # Just a dummy test so that we have a test target for //... on certain bazelci platforms with bazel_integration_test diff --git a/examples/angular_bazel_architect/WORKSPACE b/examples/angular_bazel_architect/WORKSPACE index ce94b32d01..bdc28783b8 100644 --- a/examples/angular_bazel_architect/WORKSPACE +++ b/examples/angular_bazel_architect/WORKSPACE @@ -3,7 +3,7 @@ # See https://docs.bazel.build/versions/master/build-ref.html#workspace workspace( # How this workspace would be referenced with absolute labels from another workspace - name = "angular_cli_demo", + name = "angular_bazel_architect", ) # Install the nodejs "bootstrap" package @@ -12,8 +12,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_nodejs", - sha256 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc53ec1d9b0a6cabd2b", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.2.0/rules_nodejs-1.2.0.tar.gz"], + sha256 = "ecaa54955b314b5e33948bd8f39e35c35ee89e905d8de1c03868100293510573", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.2.1/rules_nodejs-1.2.1.tar.gz"], ) # The yarn_install rule runs yarn anytime the package.json or yarn.lock file changes. diff --git a/examples/angular_bazel_architect/karma.conf.js b/examples/angular_bazel_architect/karma.conf.js index 5501e2ff8e..d78d222795 100644 --- a/examples/angular_bazel_architect/karma.conf.js +++ b/examples/angular_bazel_architect/karma.conf.js @@ -25,8 +25,8 @@ module.exports = function(config) { autoWatch: true, customLaunchers: { ChromeHeadlessNoSandbox: { - base: 'Chrome', - flags: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage'] + base: 'ChromeHeadless', + flags: ['--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage'] } }, browsers: ['ChromeHeadlessNoSandbox'],