posit-dev / posit-dev/connectapi
ci: update shiny and rmd integration tests to work with newer Connect images
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 54
- Forks
- 27
- Avg merge
- 1d 3m
- Merged PRs (30d)
- 1
Description
Followup to #417. Integration tests that test setting env vars, rendering schedules, and variants use an rmarkdown example, and tests for setting run_as require an interactive app, so they use a shiny example app. These have manifest.json files checked in that enumerate packages and an R version, and these are set to an old version of R that is not included in the newer docker images for Connect. #417 skips those tests on newer versions of Connect.
To unskip them, we could
- Delete the manifest.json files and use
rsconnectto generate them at test runtime. We would associate each Connect image with an R version, and we would run the integration tests from that R version, so that the manifest that rsconnect generates at runtime would be compatible with what's in the images. Somewhat future proof, but would slow down these tests a little because we would have to resolve the package dependencies each run, and we would have the burden of maintaining the matrix of Connect version (docker tag) and R version to use. Unclear if there would be other trouble running the test suite with sufficiently old enough R to generate a manifest for older Connect. - Add alternate manifests that use newer versions of R that are found in the newer images, and switch off which manifest we used based on the Connect server version. A little annoying, and it is something we would have to do once a year or so whenever R versions roll off the docker images, but probably the least work.
- Keep a single manifest for these items, but upgrade them so that they that work on newer Connect and as many versions back that work, and skip these tests on versions older than that (i.e., flip how the skipping works now). Probably about the same work as the previous option but with less full coverage.
- Install the same version of R into all of the Connect images, and have one manifest that works with that version. Adds some overhead to spinning up the Connect images, but then keeps the complexity out of the R test suite.
#417 adds a deploy_example() helper function that could encapsulate some of the logic, depending on which direction was taken.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading #417 and the integration tests for the R Markdown and Shiny examples, then inspect their checked-in manifest.json files and the deploy_example() helper mentioned there. Decide how Connect image versions map to R versions and make the affected tests run without the current skips on newer images; done means the integration tests and dependency manifests are compatible with the supported image matrix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, r
- Domain
- ci-cd, devops, testing-qa
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100