Feat: add option to skip owner transfer of home-dir
- Dominant language
- Go
- Stars
- 300
- Forks
- 64
- Avg merge
- 20m
- Merged PRs (30d)
- 1
Description
Hey!
We see that some of our workspaces with large home-dirs uses quite a bit of time on the owner-transfer-step:
```log
#3: 🔄 Updating ownership of /home/coder...
#3: 🏡 Updated ownership of /home/coder! [2m1.175064722s]
```
This might be a somewhat extreme case, where the home-dir has a couple of `pipx`-installs, and `pyenv`-venvs. Where the home-dir has been prebuild, and comes with the image.
In our case this is already owned by the `coder`-user, and the ownership does not seem to be shifted to `root` on envbuild, so in this case, the ownership-transfer seems to be redundant.
So tested with removing the ownership-transfer (https://github.com/coder/envbuilder/blob/7eabaa4d876c3ce54f7271b6e68fea37b6719c66/envbuilder.go#L829-L842), and could not see any issues with ownership in our case. So if envbuilder had an option to disable that, that would be great
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading envbuilder.go around lines 829-842, where ownership of /home/coder is transferred. Trace how existing options are defined and passed to this step, then add an option that skips the transfer while preserving the current default behavior. Done means the option is usable and the ownership-transfer step is omitted when it is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100