Skip to content
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

Major rewrite / rsession simplification #37

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Major rewrite / rsession simplification #37

merged 1 commit into from
Jan 16, 2024

Conversation

mcg1969
Copy link
Collaborator

@mcg1969 mcg1969 commented Jan 16, 2024

For reasons that are not entirely clear, Posit's rsession application is now more broadly compatible with multiple versions of R. I've been able to run the RHEL 9 rsession against all major Linux versions of conda R from 3.4 onward, with only a small special treatment required for our very old legacy environment anaconda50_r. This is likely a combination of upgrades to our low-level conda libraries as well as changes Posit has made. So this now means we have much less adaptation to do to make rsession work with our binaries.

We still need the environment detection capability, however. I've refactored how we do that, though, so that if the environment already exists on start time, the (slow) activation process is done before the session comes up for the first time. This makes RStudio seem to come up more quickly and reliably. In the event that the user changes R environments on the fly, I studied RStudio's session launching behavior closely and managed to make our script more robust to timeouts.

Finally I improved our environment search capability. It looks for R environments in the following priority order:

  • named environments in anaconda-project.yml, in listed order
  • the previously selected R environment, if one had been selected before
  • other environments in the user's persistent storage, from newest R version to oldest
  • environments in admin persistent storage (/opt/continuum/envs), from newest R version to oldest
  • environments on the docker container (anaconda50_r)

The first environment with an r-base package wins.

@mcg1969 mcg1969 merged commit 52c324f into master Jan 16, 2024
1 check passed
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.

1 participant