[Feature] Populate [runtimes] in the CI Workbench config so test_runtime_versions runs

オープン
#550 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
74/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
docker, github-actions, python
領域
ci-cd, devops, testing

調査の方向性

workbench-smoke.yml と src/vip/config.py:390 の RuntimesConfig を読み、その後 workbench/test_runtime_versions.py を調べます。実行中の Workbench コンテナ内で /opt/R と /opt/python のレイアウトを確認し、生成された vip.toml の [runtimes] ブロックを設定して、測定した runtime から tier を選択します。3 つすべてのテストが skip されずに実行され、その結果が smoke-results.xml に現れれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Child of #409. Found while measuring the Workbench suite for #539.

workbench/test_runtime_versions.py contributes three tests, and all three skip on every run — not because a Docker Workbench cannot support them, but because the generated config omits one section:

test_r_versions          SKIPPED — No expected R versions specified in vip.toml [runtimes]
test_r_version_in_session SKIPPED — No expected R versions specified in vip.toml [runtimes]
test_python_versions     SKIPPED — No expected Python versions specified in vip.toml [runtimes]

This is free coverage. workbench-smoke.yml writes vip.toml from scratch, so it can populate [runtimes] with whatever the container actually ships.

Scope

RuntimesConfig (src/vip/config.py:390) takes r_versions and python_versions as lists of version strings. The Workbench image installs runtimes under /opt/R and /opt/python, so the workflow can enumerate them from the running container and write them into the config before pytest starts.

Sketch, to be verified against the real image layout:

R_VERSIONS=$(docker exec "$CID" ls /opt/R 2>/dev/null | jq -R . | jq -sc .)
PY_VERSIONS=$(docker exec "$CID" ls /opt/python 2>/dev/null | jq -R . | jq -sc .)

Then emit a [runtimes] block into the generated vip.toml.

Watch out

Populating [runtimes] from the same container the tests then assert against makes the check partly tautological — it proves the versions Workbench reports in-session match what is installed on disk, which is a real check (test_r_version_in_session runs R and compares), but it cannot catch "the wrong runtimes were installed". That is the correct scope for a container smoke test; pinning expected versions is a customer-deployment concern.

These belong in the full tier at minimum. Whether they are fast enough for the PR gate depends on whether each spawns a session — test_r_version_in_session does, so budget roughly 30s for it.

Acceptance

  • workbench-smoke.yml writes a [runtimes] block derived from the running container.
  • The three test_runtime_versions tests execute rather than skip, verified in the smoke-results.xml artifact.
  • The tier placement (gate vs full) is chosen from the measured runtime, and recorded in the workflow.
主要言語
Python
スター
9
フォーク
1
平均マージ
15時間 31分
マージ済み PR(30日)
44

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/vip のほかの issue

posit-dev/vip の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。