Skip to content

feat(workbench): verify expected R/Python runtime versions (closes #303)#327

Merged
ian-flores merged 1 commit into
mainfrom
bot-implement-issue-303-fa4d547ae8a5c2a2
Jun 11, 2026
Merged

feat(workbench): verify expected R/Python runtime versions (closes #303)#327
ian-flores merged 1 commit into
mainfrom
bot-implement-issue-303-fa4d547ae8a5c2a2

Conversation

@posit-vip-triage

Copy link
Copy Markdown
Contributor

Closes #303
Implements the plan from #314

What changed and why

This PR implements runtime version verification for Workbench, mirroring the existing Connect tests in src/vip_tests/connect/test_runtime_versions.feature.

Config (src/vip/config.py)

Added r_excluded_versions and python_excluded_versions to RuntimesConfig so administrators can assert that EOL (end-of-life) versions are absent from the Workbench session dialog — complementing the existing allow-list check.

[runtimes]
r_versions = ["4.3.1", "4.4.0"]
python_versions = ["3.11.0", "3.12.0"]
r_excluded_versions = ["3.6.3"]       # must NOT appear in dialog
python_excluded_versions = ["2.7.18"] # must NOT appear in dialog

Page object (src/vip_tests/workbench/pages/homepage.py)

Added R_VERSION_DROPDOWN and PYTHON_VERSION_DROPDOWN selectors to NewSessionDialog. These use the #rstudio_label_* ID pattern consistent with other dialog dropdowns.

Tests (src/vip_tests/workbench/test_runtime_versions.{feature,py})

Three new BDD scenarios:

  1. Expected R versions are available — opens the New Session dialog, reads the R version dropdown options (handles both native <select> and custom ARIA listbox), asserts all configured versions are present and no excluded versions appear. Skips gracefully if the dropdown is absent.
  2. Expected Python versions are available — same as above for Python.
  3. Launched RStudio session uses expected R version — launches an RStudio session selecting the first expected R version, waits for Active state, navigates in, runs R.version$major in the console, and verifies the output matches.

All three skip when the relevant expected_r_versions / expected_python_versions lists are empty.

Selftests (selftests/test_workbench_runtime_versions.py)

Unit tests covering:

  • RuntimesConfig new fields default to []
  • load_config reads r_excluded_versions / python_excluded_versions from TOML
  • NewSessionDialog exposes the two new CSS selectors
  • Feature file exists, has @workbench tag, has exactly 3 scenarios covering R, Python, and session

Demo

⚠️ The execution environment used by this bot does not have uv or Python available on PATH, so the interactive showboat demo could not be generated. CI will exercise the selftests and dry-run collection on merge.

The implementation follows the four-layer architecture:

  • Feature file: business language only, @workbench tag for auto-skip
  • Step definitions: thin orchestration using page objects and session_context fixture (consistent with all other workbench step files)
  • Page object: NewSessionDialog holds all selectors
  • Playwright: adapts to both <select> and custom ARIA listbox dropdowns

Generated by Implement an approved plan PR for issue #314 · ● 66.3M ·

- Add r_excluded_versions and python_excluded_versions to RuntimesConfig
  so admins can assert that EOL versions are absent from the dialog
- Add R_VERSION_DROPDOWN and PYTHON_VERSION_DROPDOWN selectors to
  NewSessionDialog page object
- New feature file and step definitions under src/vip_tests/workbench/:
  * Scenario 1: all expected R versions present in New Session dialog
  * Scenario 2: all expected Python versions present in New Session dialog
  * Scenario 3: launched RStudio session reports the expected R version
- Selftests cover RuntimesConfig fields, selector presence, and feature
  file structure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@posit-vip-triage

Copy link
Copy Markdown
Contributor Author

📸 Preview Screenshots for PR #327

Successfully captured 7 out of 8 preview pages. Full-page screenshots are shown below.

Website Preview Screenshots

Home Page

website home
URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/


Getting Started

website getting started
URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/getting-started/


Feature Matrix

website feature matrix
URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/feature-matrix/


Test Inventory

website tests
URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/tests/


Example Report (Website)

website report
URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/report/


Shiny App

website shiny app
URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/shiny-app/


Report Preview Screenshots

Detailed Results

report details
URL: https://posit-dev.github.io/vip/pr-preview/pr-327/details.html


⚠️ Failed Pages

The following page failed to capture due to a font-loading timeout (exceeded 5s):


Summary

  • Total screenshots captured: 7
  • Website preview pages: 6/6 ✅
  • Report preview pages: 1/2 ⚠️
  • Failed pages: 1 (report home - font loading timeout)

All screenshots are full-page captures and have been uploaded to the assets/preview-screenshot-gallery branch.

Warning

Firewall blocked 7 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • cdn.jsdelivr.net
  • clients2.google.com
  • fonts.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "cdn.jsdelivr.net"
    - "clients2.google.com"
    - "fonts.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

Generated by Capture preview screenshots for PRs · ● 13.1M ·

@posit-vip-triage

Copy link
Copy Markdown
Contributor Author

📸 Preview Screenshots

This PR's preview deployments have been captured. All 8 pages were successfully rendered and screenshotted.

Website Preview

Base URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/

🏠 Home Page

URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/

website-home

📊 Feature Matrix

URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/feature-matrix/

website-feature-matrix

🚀 Getting Started

URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/getting-started/

website-getting-started

📄 Report Example

URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/report/

website-report

✨ Shiny App

URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/shiny-app/

website-shiny-app

🧪 Test Inventory

URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/tests/

website-tests


Report Preview

Base URL: https://posit-dev.github.io/vip/pr-preview/pr-327/

📊 Report Summary

URL: https://posit-dev.github.io/vip/pr-preview/pr-327/

report-home

📝 Detailed Results

URL: https://posit-dev.github.io/vip/pr-preview/pr-327/details.html

report-details


Summary

  • 8 screenshots captured successfully
  • 6 website pages from pr-preview-site
  • 2 report pages from pr-preview
  • 0 failures

All pages rendered without critical issues. Some console errors were noted (likely from third-party resources), but all pages loaded and displayed correctly.

Warning

Firewall blocked 7 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • cdn.jsdelivr.net
  • clients2.google.com
  • fonts.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "cdn.jsdelivr.net"
    - "clients2.google.com"
    - "fonts.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

Generated by Capture preview screenshots for PRs · ● 8.3M ·

@ian-flores ian-flores merged commit 2cfed3b into main Jun 11, 2026
28 checks passed
@ian-flores ian-flores deleted the bot-implement-issue-303-fa4d547ae8a5c2a2 branch June 11, 2026 16:26
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-11 16:26 UTC

@posit-vip-triage posit-vip-triage Bot mentioned this pull request Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(workbench): verify expected R/Python versions on the Workbench side

1 participant