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

Đang mở
#550 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
74/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
docker, github-actions, python
Lĩnh vực
ci-cd, devops, testing

Hướng nghiên cứu

Đọc workbench-smoke.yml và RuntimesConfig trong src/vip/config.py:390, sau đó kiểm tra workbench/test_runtime_versions.py. Xác minh bố cục của /opt/R và /opt/python trong container Workbench đang chạy, điền block [runtimes] được tạo trong vip.toml và chọn tier dựa trên runtime đã đo. Hoàn tất khi cả ba test đều chạy thay vì bị bỏ qua và kết quả của chúng xuất hiện trong smoke-results.xml.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Python
Star
9
Fork
1
Merge trung bình
15 giờ 31 phút
Pull request đã merge (30 ngày)
44

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của posit-dev/vip

Tất cả issue của posit-dev/vip

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.