[GRDM-60339] CIの健全化#27
Merged
Merged
Conversation
import from public api, not implementation module
software is a valid category this is fragile and other categories can also fail
devtools::install_local has been deprecated
can't seem to _prevent_ writing cache
it leaves files in /tmp/ and ~/.cache/R/pkgcache/
pak doesn't work if caches are cleaned
… limits Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
CIを健全化するPRです。環境の経年変化に起因するテスト失敗を、upstream (jupyterhub/repo2docker) で解消済みの問題のcherry-pickおよびfork固有処理の修正により解消します。
1. chardet 6.x の非互換 (unit / venv / external の失敗)
2026年3月頃にリリースされた chardet 6.x で
chardet.universaldetectorという小文字モジュール経由のアクセスが廃止され、utils.pyのopen_guess_encodingがAttributeErrorで失敗するようになりました。fix import of universaldetectoractually, let's avoid chardet altogether(chardet を charset-normalizer に置換)後者は upstream では
pyproject.tomlの依存変更を含みますが、本forkはsetup.pyで依存を管理しているため、その部分のみsetup.pyへの変更として解決しています。なお、同趣旨のPRとして #24 がありましたが、upstreamコミットのcherry-pickで対応する方針としたため、本PRで置き換えます。2. figshare のURL正規表現 (unit の失敗)
fix figshare url regex3. DESCRIPTION型リポジトリのビルド失敗 (r の失敗)
DESCRIPTIONファイルを持つリポジトリのインストールは
devtools::install_local(getwd())で行われていますが、devtoolsは依存パッケージが多く、デフォルトのR (4.2.1) と最新のCRANスナップショットの組み合わせではPositのバイナリ提供が終了しているためソースビルドに落ち、依存のcurlパッケージ等のビルド失敗によりdevtools自体がインストールされず、ビルドが失敗します(tests/r/r-rspm-description-file)。upstreamは
devtools::install_localの廃止(deprecated)対応としてこの経路を依存ゼロのremotesベースに変更済みのため、該当コミットをcherry-pickします。Add --vanilla to R callReplace --vanilla with --no-init-fileR: install with pakclear cache after pak installmanually cleanup after pakremotes doesn't leave a mess(pakをやめてremotesに変更した最終形)途中でpakを経由しているのはupstreamの試行の経緯をそのまま保持しているためで、最終状態は「基本インストールに
remotesを追加し、DESCRIPTIONのインストールをremotes::install_local()で行う」となります。upstreamのCIでは同一のテストfixtureがこの構成でpassしています。4. CS-rstudio-grdm インストールの GitHub API 依存の除去 (r の失敗・fork固有)
CS-rstudio-grdmのインストールに使用しているremotes::install_githubは api.github.com を無認証で参照するため、レートリミットによりビルドが確率的に失敗します(CIランナーの共有IPでは高頻度)。API を参照しない GitHub アーカイブ tarball からの取得 (remotes::install_url) に変更し、あわせてインストール結果の検証 (stopifnot) を追加してインストール失敗が確実にビルドエラーとして顕在化するようにしました。これは #25 でremotes::install_github化した処理の改善です。動作確認
tests/unit/test_utils.py37件、tests/unit/contentproviders/test_figshare.py14件、tests/unit/test_r.py9件のパスを確認済みtests/r/r-rspm-description-fileに対する生成Dockerfileが upstream と同一のインストールコマンドになることを確認済みrdmaddinsのインストールまでを実行し、RStudio の Addins メニューに「Sync to RDM」が表示される(Addinが有効化される)ことをブラウザ上で確認済み🤖 Generated with Claude Code