-
Notifications
You must be signed in to change notification settings - Fork 4
Add Cypress e2e test for Posit Workbench #2984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b998480 to
e737281
Compare
2394956 to
572f95f
Compare
374ae2c to
643d9f1
Compare
643d9f1 to
3cbb1c2
Compare
…container readiness
.github/workflows/e2e.yaml
Outdated
| cypress: | ||
| name: e2e tests (cypress) | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-latest-8x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have strong notes indicating why this change was made, but minimally to get Workbench to start quicker. We can explore reducing this to a 4x runner or back down to the standard runner, and remove any related container debug output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed it might be worth a try to drop it down and see how it does (or if there's any negative impact).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests run fine with the standard runner, though slightly slower. Will leave it at standard so we are not needlessly consuming the larger runners.
| Runner | E2E Job Time | Difference |
|---|---|---|
| ubuntu-latest-8x (8 cores) | ~11m 38s | Baseline |
| ubuntu-latest (2 cores) | ~13m 14s | +1m 36s slower (+13.7%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And finally discovered one likely reason the 8x runner was chosen.
failed to register layer: write /usr/lib/rstudio-server/bin/quarto/share/deno_std/cache/gen/https/jsr.io/766911eda918ff2de41436f0cd1bd07e1f75dc019f40fdb27f776b8d6c7b3239.js: no space left on device
Have added a script we use in other repos that can tidy the runners to ensure adequate disk space without requiring a larger runner.
Before
Used: 54G/72G (75% full)
After
Used: 38G/72G (53% full)
And finally fixed with some retooling of setting permissions for the |
tyatposit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of a rough session startup time length, but overall looks good to me and passing locally. Just 1 issue i ran into building and that possible issue with clicking the input box selection. Plus a few minor suggestions.
.github/workflows/e2e.yaml
Outdated
| cypress: | ||
| name: e2e tests (cypress) | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-latest-8x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed it might be worth a try to drop it down and see how it does (or if there's any negative impact).
| cy.log("Installing Publisher extension in Workbench"); | ||
| cy.exec(`just install-workbench-extension release`, { | ||
| failOnNonZeroExit: false, | ||
| timeout: 30_000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: could potentially extract these out into variables with naming that helps explain the need for the waits. might also help with future updates if that ever happens though i think this is the only timeout that is repeated. 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout: 30_000 is repeated three times in this file but they're used for very different functions so I'm not confident the same value will continue to be identical in all cases forever.
| cy.log("Starting Workbench Positron session"); | ||
|
|
||
| // Start a Positron session | ||
| // TODO remove this workaround for "All types of sessions are disabled" error after Workbench 2025.12.0 is released |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there's a gh issue tracking this, would be helpful to link it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have guidance for adding links to private repos here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point with this being a public project. I wasn't thinking about that. maybe a question for @jonkeane ?
|
|
||
| /** | ||
| * Checks if an interpreter is ready without attempting to start one | ||
| * @returns {Cypress.Chainable<boolean>} - Returns a chainable boolean indicating if interpreter is ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
liking these @returns
good idea and nice to have. 👍
…Workbench extension
… ensure selection registers before clicking "OK"
…equate free space on the runner

Intent
Add initial e2e support and test for Publisher deployments on Posit Workbench using Positron.
Fixes #2911
Type of Change
Approach
test/e2e/tests/deployments.cy.js:KNOWN ISSUES
User Impact
None
Automated Tests
New Workbench-specific Cypress e2e spec.
Directions for Reviewers
just devworkflow and ensure you can run the Workbench specChecklist