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

Remove repository name from workspace folder path #133

Closed
Jongmassey opened this issue Jun 6, 2024 · 4 comments
Closed

Remove repository name from workspace folder path #133

Jongmassey opened this issue Jun 6, 2024 · 4 comments

Comments

@Jongmassey
Copy link
Contributor

research-template ADR#3 states:

One element of the dev container configuration which cannot easily be set in the docker image build is that of setting working directories for R/RStudio to the workspace folder which is (by default) not known until container creation time.

This is because we are using the default workspace folder pattern of /workspace/{repo_name}.

The setting of the RStudio working directory in the onCreate command is known to be problematic.

It is possible to set the workspaceFolder property of devcontainer.json to a fixed value, such that it can be known at docker image build time, and those working directory preferences can be set at docker image build time.

With this, we could remove the problematic R setting lines from the postCreate.sh script.

One potential downside is that the user will no longer see the repository name in either the file explorer pane or the terminal and so will no longer have immediate visibility of which repository a given codespace pertains to.

I have tried this setting in a draft PR and it appears to work as stated.

@iaindillingham
Copy link
Member

iaindillingham commented Jun 7, 2024

We talked about this issue in today's standup. I think we agreed that from a technical perspective, using a fixed working directory is a great idea. However, from a user perspective, context is important: the repository and branch should be displayed somewhere in the UI. Whilst we would normally lean on a Git integration for this (RStudio's version control feature; VS Code's source control feature), RStudio makes this hard (opensafely-core/research-template-docker#48).

Before implementing a fixed working directory, we should identify how a user would know which repository and branch a Codespace is associated with. Users can have up to three Codespaces, and following the "Co-Piloting in Codespaces" meeting, we should assume that they will make use of them, either associated with different repositories, or different branches within the same repository.

One means by which a user would know which repository a Codespace was associated with would be to open README.md, as the repository name is the heading.

Thanks for describing the issue clearly, @Jongmassey.

@lucyb
Copy link
Contributor

lucyb commented Jun 13, 2024

We've decided not to fix this for now, but will add something into the troubleshooting guide.

@lucyb lucyb closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
@iaindillingham
Copy link
Member

Unless I've misunderstood, I don't think we need to add an entry to the troubleshooting guide, because we're not going to remove the repository name from the workspace directory name, and so the repository name will be visible in the UI.

@Jongmassey
Copy link
Contributor Author

I think it's #130 that needs to go in the troubleshooting guide, not this as we're not going to make this change

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

No branches or pull requests

3 participants