REditorSupport / REditorSupport/vscode-R

Inability to Attach active R terminal on Compute Nodes in HPC Environment

Open
#1,541 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

Describe the bug
When launching an active R terminal on a compute node within an HPC environment and attempting to attach it using .vsc.attach(), the terminal remains detached with the message "R: (not attached)" displayed. Clicking to attach does not initiate the attachment process. However, on the login node, the active R terminal automatically attaches as expected, likely due to the configuration in ~/.Rprofile. I found a similar issue reported by another user (https://stackoverflow.com/questions/73087813/how-do-i-make-sure-my-r-session-attached-is-using-the-compute-node-instead-of-th), where he mentioned "my data viewer wouldn't be attached and I couldn't view my data in the 'workspace'.", and there hasn't been a solution provided yet.

To Reproduce
Steps to reproduce the behavior:

  1. Launch an interactive R on the compute node on HPC.
  2. Run .vsc.attach() in R.
  3. Observe the terminal displaying "R: (not attached)" without successfully attaching.

**Can you fix this issue by yourself? **
No

Please attach setting.json

"r.alwaysUseActiveTerminal": true,
"r.bracketedPaste": true,
"r.sessionWatcher": true,
"r.rterm.option": [],
"r.rterm.linux": "/path/to/radian",

Expected behavior
The terminal should attach successfully to the interactive R session on the compute node when .vsc.attach() is called, similar to the behavior observed on the login node where it attaches automatically.

Screenshots
Terminal showing "R: (not attached)" when attempting to attach after running .vsc.attach():

Screenshot 2024-06-28 at 23 16 16

Screenshot 2024-06-28 at 23 20 33

Terminal automatically attached on the login node due to ~/.Rprofile configuration:

Screenshot 2024-06-28 at 23 24 46

Environment (please complete the following information):

  • OS: [Linux]
  • VSCode Version: [1.90.2]
  • R Version: [4.3.1]
  • REditorSupport version: [2.8.4]

Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the attachment flow with an interactive R session on a compute node and compare it with the login-node behavior, including the ~/.Rprofile configuration and the listed VS Code R settings. Trace the .vsc.attach() entry point and session-watcher behavior; done means the compute-node terminal changes from "R: (not attached)" to an attached session.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, vscode
Domain
hpc, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.