Repository navigation
[WIP]Python 3.13 でビルドした WaterButler・MFR イメージに対応し、ファイルプレビューの E2E テストを追加 - #59
Draft
miyamoto83 wants to merge 6 commits into
Draft
miyamoto83 wants to merge 6 commits into
miyamoto83 wants to merge 6 commits into
Conversation
…n_tests.py when mfr_preview_enabled is set
…them to the E2E jobs as outputs instead of resolving them in every job
…setup, detecting how the image carries them and wiring the compose override by that layout
…uilding them from a branch and rendering office documents through a Celery worker and unoserver
…y layouts, starting the unoconv listener that legacy MFR images convert office documents with
…so previews fetch files from WaterButler with the browser session
miyamoto83
force-pushed
the
feature/mfr-python313
branch
from
October 26, 2026 11:54
c82d605 to
ddb9020
Compare
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.
Purpose
RDM-waterbutler と RDM-modular-file-renderer の Python 3.13 化(それぞれ別 PR)により、両イメージは実行イメージに pip を含まず、依存ライブラリを焼き込んだ構成になる。現行の E2E は RDM-osf.io の docker-compose.yml にある
wb_requirements/mfr_requirements(Python 3.6 / 3.5 のパスでinvoke installを実行し、ボリュームへ展開する)をそのまま使うため、これらのイメージでは起動できない。また MFR は Office 系ファイルの変換を Celery ワーカー経由で unoserver に依頼する方式になるため、E2E 環境にもその 2 サービスが必要になる。本 PR では、E2E が WaterButler / MFR イメージの依存の持ち方をイメージ自身から判定して docker-compose の override を生成するようにする。公開イメージ(
:latest)が Python 3.13 版に切り替わった後も、両リポジトリのブランチを指定した検証でも、同じワークフローで実行できる。あわせて、MFR の動作を直接確認するためのファイルプレビューのテスト手順を追加する。Changes
sysconfigの purelib の親ディレクトリ(例/usr/local/lib/python3.13)、(2)python3 -m pip --versionが通るか。pip があれば legacy(現行どおりinvoke installで requirements ボリュームへ展開)、なければ bundled(イメージ内のライブラリツリーをボリュームへコピー)として扱う。Python の版はキーにしないため、3.14 以降への移行でもワークフローの変更は不要。setup_rdm.shのcreate_docker_overrideを、判定結果(WB_LAYOUT/WB_LIBDIR/MFR_LAYOUT/MFR_LIBDIR)に従って override を生成するように変更した。bundled では requirements ボリューム名にライブラリディレクトリ名を含め(例wb_requirements_3_13_vol)、旧イメージで作られたボリュームが新イメージにマウントされないようにする。legacy では、イメージのライブラリディレクトリが RDM-osf.io の compose 定義のマウント先(WaterButler/usr/local/lib/python3.6、MFR/usr/local/lib/python3.5)と一致しない場合は明示的にエラーにする。mfr_worker(Celery)とunoserverのサービスを override に追加し、MFR の env に broker と unoserver の接続先を追記する。unoconv コンテナは使わない。MFR_REPOSITORY/MFR_BRANCH。WaterButler と同じ方式)。このときDockerfile.unoserverから unoserver イメージも同時にビルドする。公開 MFR イメージが bundled でUNOSERVER_IMAGEが未指定のときは、MFR リポジトリの develop から unoserver イメージをビルドする。公開 unoserver イメージが無いための措置で、公開イメージができればUNOSERVER_IMAGEの既定値をそれに向けることもできる。EXTENSION_CONFIG_LOCAL_DEVELOPMENTを E2E では無効にした。有効のままだと PDF や動画のプレビューがファイルを localhost:7777 から取りに行き、ブラウザのセッション無しで WaterButler に当たって 401 になる。テスト手順-ストレージ共通-ファイルプレビュー.ipynb、共通アサーションscripts/mfr_preview.py、試験データtestdata/mfr-preview/(txt / png / jpg / pdf / docx / pptx / csv / xlsx / webm。個人情報・外部サービスへの参照なし)を追加した。run_tests.pyのmfr_preview_enabledで実行し、User Tests ジョブでは legacy・bundled のどちらのレイアウトでも実行する。legacy では RDM-osf.io の compose 定義にあるunoconvを起動して Office 文書の変換を行う(従来の E2E は起動していなかった)。MFR_REPOSITORY/MFR_BRANCH/UNOSERVER_IMAGE/WB_REPOSITORY/WB_BRANCHを追加した。公開イメージ(legacy)に対する既定動作は、
EXTENSION_CONFIG_LOCAL_DEVELOPMENTの無効化を除き従来と同じ override になる。Ticket
Note
setup_rdm.sh側に持つ。RDM-osf.io の docker-compose.yml の Python パス直書きが変われば、legacy の照合値もそれに合わせる。Custom Test Configuration
Python 3.13 版の WaterButler・MFR をそれぞれの作業ブランチ(miya-biz フォーク)からビルドしたイメージを対象に PR CI を実行する。