Build: option to skip a broken documentation artifact with a warning instead of failing
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- github-actions, javascript
調査の方向性
Start in scripts/build-vite.js and trace the existing registry, extraction, validation, checker, and installation flow through scripts/fetch-apps.js, scripts/artifacts.js, src/utils/registry.js, and scripts/check-artifact.js. Read .github/workflows/build-image.yml, CLAUDE.md, and contract/DEPLOYMENT.md for the requested flag and documentation surfaces. Done means isolated failures warn and skip cleanly, skipped entries are recorded, all-skipped builds fail, and existing default behavior remains unchanged with the requested hermetic tests.
索引モデルが issue の本文から書いたものです。
説明
Problem
One broken documentation artifact fails the whole knowledge base build. Every registry entry is all-or-nothing: if any single repo publishes a bad kb-docs.tar.gz, the deployment cannot be rebuilt at all — including for the other, perfectly healthy docs — until that repo re-publishes or someone edits the registry.
Today the only way to skip an entry is "optional": true, and that is narrow on purpose:
- it only covers a missing
prebuilt/localPathartifact (scripts/build-vite.js, theregisteredAppsfilter); - it is rejected outright by
KB_STRICT, i.e. in every production build.
Anything else wrong with an artifact still aborts the build, e.g.:
- Release / asset download fails (
scripts/fetch-apps.js: missing release, missingkb-docs.tar.gz, network/auth error) - unsafe or corrupt archive (
scripts/artifacts.js: traversal, absolute path, symlink, bad gzip) - missing or invalid
kb-docs.json(src/utils/registry.jsmanifest validation) - wrong package structure (declared app directory missing,
pagespointing at files that do not exist) - an
errorfinding from the contract checker (scripts/check-artifact.js) in a strict build - an entry that produces no apps (strict)
- a slug that collides with another artifact's (
resolveRegistry)
Proposal
Add a build parameter that turns a per-entry failure into a warning + skip instead of a build failure.
- Flag
--skip-failed/ envKB_SKIP_FAILED=trueonscripts/build-vite.js(name open to bikeshedding), plus a matchingskip-failedinput on.github/workflows/build-image.ymlso a deployment repo can opt in. - Default off — current behaviour (fail fast) is unchanged unless asked for.
- When on, each registry entry is staged, extracted, validated, checked and installed inside its own try/catch. On any error:
- log a warning naming the source (
owner/repo@version) and the reason; - remove whatever that entry already wrote to
apps/{slug}//public/{slug}/, so no half-installed app reaches Astro; - leave it out of the expansion map, so the catalog and masthead navigation never link to it;
- continue with the next entry.
- log a warning naming the source (
- Record skipped entries in
dist/kb-build.json(e.g.skipped: [{ source, version, reason }]) and in the GitHub job summary, so a skipped doc is visible rather than silently absent. - The build still fails if every entry is skipped (never publish an empty knowledge base), and on errors that are not attributable to one entry (registry file unreadable/invalid,
astro builditself failing, stylesheet alias step).
Open questions
- Interaction with
KB_STRICT. Strict currently exists so that "a registered app that cannot be fetched is a broken deployment, not something to skip with a warning". Options:KB_SKIP_FAILEDis allowed together with strict, and strict keeps only its registry-level guarantees (noprebuilt/localPath/optional, non-empty registry), while per-artifact errors become skips; or- the two are mutually exclusive and the build refuses the combination.
Leaning to the first: a production deployment is exactly where one team's broken release should not block everyone else's docs.
- Should a skip ever fail the job? e.g. exit 0 but set a GitHub Actions warning annotation, or an optional
max-skippedthreshold. - Fallback to the previous good version? Out of scope here, but worth noting: instead of dropping an entry, the build could fall back to the last release that passed. Could be a follow-up.
- Slug collisions — skip both entries, or the later one in registry order?
Acceptance criteria
- New flag/env/workflow input, off by default, documented in
CLAUDE.md(Environment Variables),contract/DEPLOYMENT.mdandbuild-image.ymlinput description. - With the flag on, each failure class listed above skips only the offending entry with a warning; the rest of the knowledge base builds and deploys.
- Skipped entries appear in
dist/kb-build.jsonand the job summary with their reason. - No leftover files from a skipped entry in
apps/,public/ordist/; no catalog card or nav link to it. - All entries skipped → build fails.
- With the flag off, behaviour is byte-for-byte unchanged (existing suites stay green).
- Tests: a hermetic registry with one good fixture plus one broken artifact per failure class (bad archive, missing manifest, invalid manifest, missing app dir, checker error) — build succeeds, only the good app is in
dist/,kb-build.jsonlists the skips.
- 主要言語
- JavaScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 20分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AbsaOSS/knowledge-base のほかの issue
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
AbsaOSS/knowledge-base#118 ·
メンテナーはふだん 1 日以内に返信
-
feat: expose knowledge-base documentation through an MCP server対応中かも @oto-macenauer-absa が 15 日前に担当しました。 オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
AbsaOSS/knowledge-base#117 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
AbsaOSS/knowledge-base#114 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Dynamic responsive masthead menu from documentation manifests対応中かも @oto-macenauer-absa が 19 日前に担当しました。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
AbsaOSS/knowledge-base#111 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
AbsaOSS/knowledge-base の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
Bug v3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
biomejs/biome#12475 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信