fix(build): unblock Algolia prerendering for CI and macOS local builds#1170
Merged
Conversation
CONTRIBUTING.mdの初回ビルド手順に、macOSでpnpm buildを通すための .bazelrc.userコピー手順をIMPORTANTコールアウトとして追記。 .bazelrc.user.exampleにも同等の日本語コメントを併記して コントリビューターが英語コメントを読まなくても意図を把握できるようにした。 macOSのBazel sandboxがプレレンダリング中のAlgolia API呼び出しを ブロックする問題はPR #1137で対処済みだが、CONTRIBUTING.mdに 言及がなく初回コントリビューターが踏むため、文書化する。
build-ubuntu / adev-preview-build の両 workflow で pnpm run build が Algolia の RetryError で失敗していたため、 setup-bazel の bazelrc ブロックに --sandbox_default_allow_network を追加して sandbox からの egress を許可する。 build/.bazelrc 由来の --nosandbox_default_allow_network は home-tier の bazelrc(setup-bazel が書き出す)で上書きされる。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Angular v22 アップデート (#1169) 以降、SSRプレレンダリング中に algoliasearch が Algolia API へアクセスするようになり、Bazel sandbox が network を遮断するため
pnpm buildがRetryError: Unreachable hostsで失敗するようになっていた。CI (build-ubuntu) もこれで継続的に失敗している。本PRはこの問題を以下の3点で対処する。
変更内容
1. CI (
build-ubuntu/adev-preview-build) の修正bazel-contrib/setup-bazelのbazelrc:ブロックにbuild --sandbox_default_allow_networkを追加し、CI 上で sandbox からの egress を許可する。build/.bazelrc由来の--nosandbox_default_allow_networkは home-tier の bazelrc で上書きされる。2. macOS ローカル向け CONTRIBUTING.md 追記
### 2. 初回のビルドセクションに> [!IMPORTANT]コールアウトでmacOS向けの追加手順(.bazelrc.user.example→.bazelrc.userのコピー)を追記。3.
.bazelrc.user.exampleに日本語コメント併記既存の英語コメントの下に日本語コメントを併記。
関連Issue
なし(#1137 / #1169 の続き)
備考
.bazelrc.user.exampleを.bazelrc.userにコピー後pnpm buildが完了することを実走確認済み