Skip to content

Commit 82494b8

Browse files
committed
ci: force dev server host to IPv4 to resolve RBE resolution issues
This is needed to get around an RBE issue
1 parent 39c7d2b commit 82494b8

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Disable NG CLI TTY mode
22
build --action_env=NG_FORCE_TTY=false
3+
build --action_env=NG_FORCE_TTY2=false
34

45
# Required by `rules_ts`.
56
common --@aspect_rules_ts//ts:skipLibCheck=always

packages/angular/build/src/builders/dev-server/tests/setup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export const BASE_OPTIONS = Object.freeze<Schema>({
6262
buildTarget: 'test:build',
6363
port: 0,
6464

65+
// Force an IPv4 address as with RBE there are currently resolution issues with IPv6 addresses.
66+
// http://localhost is resolved to IPv6 address with vite and webpack but to IPv4 with node fetch.
67+
host: '127.0.0.1',
68+
6569
// Watch is not supported for testing in vite as currently there is no teardown logic to stop the watchers.
6670
watch: false,
6771
});

packages/angular_devkit/build_angular/src/builders/dev-server/tests/setup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ export const BASE_OPTIONS = Object.freeze<Schema>({
6363
buildTarget: 'test:build',
6464
port: 0,
6565

66+
// Force an IPv4 address as with RBE there are currently resolution issues with IPv6 addresses.
67+
// http://localhost is resolved to IPv6 address with vite and webpack but to IPv4 with node fetch.
68+
host: '127.0.0.1',
69+
6670
// Watch is not supported for testing in vite as currently there is no teardown logic to stop the watchers.
6771
watch: false,
6872
});

packages/angular_devkit/build_webpack/test/basic-app/webpack.config.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ const path = require('path');
33
module.exports = {
44
mode: 'development',
55
entry: path.resolve(__dirname, './src/main.js'),
6+
devServer: {
7+
// Force an IPv4 address as with RBE there are currently resolution issues with IPv6 addresses.
8+
// http://localhost is resolved to IPv6 address with vite and webpack but to IPv4 with node fetch.
9+
host: '127.0.0.1',
10+
},
611
module: {
712
rules: [
813
// rxjs 6 requires directory imports which are not support in ES modules.

packages/angular_devkit/build_webpack/test/basic-app/webpack.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import { fileURLToPath } from 'url';
44
export default {
55
mode: 'development',
66
entry: resolve(fileURLToPath(import.meta.url), '../src/main.js'),
7+
devServer: {
8+
// Force an IPv4 address as with RBE there are currently resolution issues with IPv6 addresses.
9+
// http://localhost is resolved to IPv6 address with vite and webpack but to IPv4 with node fetch.
10+
host: '127.0.0.1',
11+
},
712
module: {
813
rules: [
914
// rxjs 6 requires directory imports which are not support in ES modules.

0 commit comments

Comments
 (0)