Skip to content

Don't persist workspace directory#292

Merged
pantherman594 merged 1 commit intomasterfrom
dont-persist-workspace
Jan 13, 2026
Merged

Don't persist workspace directory#292
pantherman594 merged 1 commit intomasterfrom
dont-persist-workspace

Conversation

@pantherman594
Copy link
Copy Markdown
Contributor

The workspace directory needs to be empty to remount resources. Mount a tmpfs volume over the workspace directory so it will always be empty even if the home directory is persisted with a volume.

PHP-114909

@pantherman594 pantherman594 requested review from a team as code owners January 12, 2026 22:19
volumes:
- .:/workspace:cached
- work:/home/rstudio:cached
tmpfs:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does the workspace directory needs to be empty?

Copy link
Copy Markdown
Contributor Author

@pantherman594 pantherman594 Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@june-hua
Copy link
Copy Markdown
Contributor

You mentioned in the jira item's comments that

other apps do not mount a persistent volume to the user’s home directory

Why is this not the case for r-studio?

@pantherman594
Copy link
Copy Markdown
Contributor Author

pantherman594 commented Jan 13, 2026

You mentioned in the jira item's comments that

other apps do not mount a persistent volume to the user’s home directory

Why is this not the case for r-studio?

I think the intention was to persist user files and configurations across app restarts (#93) but out of the apps changed r-studio is the only one we still have. vscode mounts a volume to /home/vscode but the home directory is actually /config so mounting isn't affected

I could change the persisted directory to /home/rstudio/work like we do with our example apps but if anyone is relying on the current behavior of files persisting in the home directory I don't want to unexpectedly change that

@june-hua
Copy link
Copy Markdown
Contributor

You mentioned in the jira item's comments that

other apps do not mount a persistent volume to the user’s home directory

Why is this not the case for r-studio?

I think the intention was to persist user files and configurations across app restarts (#93) but out of the apps changed r-studio is the only one we still have. vscode mounts a volume to /home/vscode but the home directory is actually /config so mounting isn't affected

I could change the persisted directory to /home/rstudio/work like we do with our example apps but if anyone is relying on the current behavior of files persisting in the home directory I don't want to unexpectedly change that

If I'm reading this correctly, seems like for other apps, including jupyter-template, the home directory is '/home/jupyter'.
Is it that it doesn't mount a persistent volume to the home directory?

@pantherman594
Copy link
Copy Markdown
Contributor Author

If I'm reading this correctly, seems like for other apps, including jupyter-template, the home directory is '/home/jupyter'.
Is it that it doesn't mount a persistent volume to the home directory?

Yeah rstudio is the only app that mounts a persistent volume to the home directory

Copy link
Copy Markdown
Contributor

@june-hua june-hua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the setup (i.e. whether home directory mounts persistent volume, the working directory path) differs between r-studio, vscode, and jupyterlab.

Would it be possible to make this consistent across all apps? Not sure what the rationale was behind this difference?
cc @yuhuyoyo

@pantherman594 pantherman594 merged commit 21e7647 into master Jan 13, 2026
3 checks passed
@pantherman594 pantherman594 deleted the dont-persist-workspace branch January 13, 2026 20:12
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.

3 participants