Skip to content

chore: update information about VM persistence #251

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

Merged
merged 2 commits into from
May 10, 2024

Conversation

filipelima18
Copy link
Contributor

Preview here. Needs a review of the technical accuracy of the changes, as I picked them up from a Slack thread.

@filipelima18 filipelima18 requested review from CompuIves and mojojoji May 9, 2024 10:07
Copy link

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

codesandbox bot commented May 9, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented May 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
projects-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 10:02am


Everything in `/workspaces/workspace` is guaranteed to be persisted between reboots, hibernations and forks. We persist the workspace folder and the Docker engine state, like images, volumes, etc.

Every file change outside of `/workspaces/workspace` will usually be persisted, but there is a chance that those changes will be cleared.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the other way round. Outside the workspace the changes are not usually persisted. It might be persisted between restarts but there is no guarantee. So maybe we can remove this line.

@@ -38,25 +36,36 @@ Note that, the first time you import a project to CodeSandbox, it can take longe

## Persistence

Everything you save in `/project` is guaranteed to be persisted between reboots, hibernations and forks. Every file change outside of `/project` will usually be persisted, but there is a chance that those changes will be cleared.
We use [Dev Containers](https://codesandbox.io/docs/learn/environment/devcontainers) by default for all repositories and Devboxes. Your project is under `/workspaces/workspace`, and your home folder is under `/root`. Under the hood, the paths are in `/project`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can define workspace as the directory where the code is stored and it defaults to /workspaces/workspace. Then we do not have to repeat /workspaces/workspace in the next few lines (Those references might confuse users whose workspace is not in /workspaces/workspace).


Every file change outside of `/workspaces/workspace` will usually be persisted, but there is a chance that those changes will be cleared.

Your project folder lives in `/workspaces/workspace/<repo-name>`; your home folder lives in `/workspaces/workspace/home/<username>`; your home folder is inaccessible to other users.
Copy link
Contributor

Choose a reason for hiding this comment

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

The project folder is the workspace folder (which defaults to /workspaces/workspace). And the user folder is /root. This line is no longer relevant for persistence as we already mention that workspace folder is persisted.


Your project folder lives in `/workspaces/workspace/<repo-name>`; your home folder lives in `/workspaces/workspace/home/<username>`; your home folder is inaccessible to other users.

If your branch or Devbox has not been accessed for a certain period (explained below), we delete the contents of `/workspaces/workspace`. This means that the next time you start this branch again, we will reinitialize `/workspaces/workspace` by doing a fresh clone.
Copy link
Contributor

Choose a reason for hiding this comment

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

We delete the contents of the workspace, but take a backup of uncommitted changes for repos and all code in devboxes (other than the ones in .gitignore). Maybe we can merge this line and the next one.

@filipelima18 filipelima18 requested a review from mojojoji May 10, 2024 10:02
@filipelima18
Copy link
Contributor Author

Updated based on Joji's suggestions

@filipelima18 filipelima18 merged commit bb0e927 into main May 10, 2024
4 checks 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.

2 participants