Uh oh!
There was an error while loading. Please reload this page.
feat: clone できなかったリポジトリを up と workspace へ反映する (PLAN37) - #115
Merged
Conversation
複数リポジトリ構成で一部のリポジトリに権限が無い場合、clone の失敗は entrypoint が warning に留めてコンテナ起動を続ける。この方針自体は維持したうえで、失敗の見せ方を直す。 - `devbase up` が ready 待ちの後に `/work` の実体を確認し、`project.yml` に書いたのに 無いリポジトリを clone URL 付きで警告する。揃っているときは何も出さない。 ログを grep せず実体を見るのは、ログが再起動をまたいで積み上がり「いつの失敗か」を 判別できないため。 - multi-root ワークスペースに clone できたリポジトリだけを載せる。ホストは folder ごとに 直列化した `DEVBASE_WORKSPACE_FOLDERS` を渡し、entrypoint は存在する dir の JSON だけを 連結する。シェルで JSON をエスケープしないので dir に引用符が入っても壊れない。 - `DEVBASE_WORKSPACE_B64` は残し、新 wire format を知らない古いイメージでは従来どおり 全フォルダ入りの workspace が書かれるようにする (silent に機能を失わせない)。 entrypoint の変更を反映するにはイメージの再ビルドが要る。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wqvdj79BJRWxhUMR9D9kts
イメージを再ビルドしたうえで、権限のないリポジトリを一時的に足した nyle-dx で devbase up を実行し、AC1〜AC5 を実機で確認した結果に差し替える。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wqvdj79BJRWxhUMR9D9kts
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Summary
複数リポジトリ構成で「primary には権限があるがサブリポジトリには権限がない」場合、clone の失敗は entrypoint が warning に留めてコンテナ起動を続ける(PLAN32 の方針)。この方針は維持したまま、失敗が利用者から見えない 2 点を直す。
docker logsにしか出ず、upは=== Deploy completed successfully ===で終わるupが/workの実体を確認し、project.ymlに書いたのに無いリポジトリを clone URL 付きで警告する*.code-workspaceに載り、VS Code に「開けないフォルダ」が並ぶfoldersに載る設計上の判断
/workの実体を見る。 ログはコンテナ再起動をまたいで積み上がるため「いつの失敗か」を判別できず、既存 clone を引き継いだケースでも誤判定する。「今/workに有るか」の方が真実に近い。問い合わせは instance あたりls -A1 /workの 1 回。DEVBASE_WORKSPACE_FOLDERS(<dir><US><folder の JSON>の行)を渡し、entrypoint は存在する dir の JSON を連結するだけにした。dirに引用符やバックスラッシュが入ってもシェルでエスケープを考えずに済み、jq/python3への依存も増やさない(PLAN32 の方針を踏襲)。DEVBASE_WORKSPACE_B64は残す。 新 wire format を知らない古いイメージでは、これまでどおり全フォルダ入りの workspace が書かれる。ホストだけ更新した状態で workspace が黙って消えるのを避けるため。upを失敗させない点は従来どおり(終了コード 0)。プラン:
issues/PLAN37_clone-failure-visibility.mdTest plan
イメージを再ビルドし、
nyle-dxに権限のないリポジトリvolareinc/no-such-repo-xyz123を一時的に足してdevbase upを実行して確認済み。upの出力に欠落リポジトリが clone URL 付きで出るexit=0。/work/nyle-dxと/work/ideabaseは通常どおり使えるRepositories missingは 0 件、exit=0/work/nyle-dx.code-workspaceは clone できた 2 件のみdocker logsにWarning: Skipping workspace folder (not cloned): no-such-repo-xyz123/entrypoint.shに新旧両方の環境変数を渡し、fallback で 3 フォルダすべてが書き出されることを確認pytest1445 passed追加したテスト:
tests/commands/test_up_missing_repos.py(5 件)、tests/containers/test_entrypoint_repos.py(+7 件)、tests/project/test_runtime.py(+3 件)注意
entrypoint の変更を含むため、workspace 側の挙動を反映するにはイメージの再ビルドが要る(
devbase build <project>。devbase-baseから焼き直す必要があるため base の再ビルドも含める)。再ビルドしていないイメージでは fallback 経路で従来どおり動くため、機能が黙って失われることはない。欠落リポジトリの報告はホスト側なので再ビルド不要で効く。やらないこと
upを失敗させること(1 本落ちただけで開発環境ごと止めない方針は維持)Repository not found(404) を返すため、クライアント側では判別できない