Refactor provisionersdk.Tar/Untar
- Dominant language
- Go
- Stars
- 14.5k
- Forks
- 1.5k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 601
Description
# Problem:
There are some inconsistencies in how we handle tar archives:
1) `provisionersdk.Tar` adds symlinks without de-referencing them
2) `provisionersdk.Untar` does not handle symlinks at all as far as I can tell
3) `provisionerd` does not _actually_ use `provisionersdk.Untar` to extract archives; it uses a separate implementation `(*provisionersdk.Session).extractArchive()`
# Proposed solution:
* Bring the behaviour of `provisionersdk.Untar` in line with `extractArchive()`
* Replace existing usage of `extractArchive()` with `provisionersdk.Untar`
* Clarify behaviour regarding symlinks -- given that we currently do not extract them, it does not make sense to continue the existing dereferencing behaviour in `provisionersdk.Tar()`.
_Originally posted by @johnstcn in https://github.com/coder/coder/issues/16128#issuecomment-2595553583_
Contributor guide
Assessment
This issue has not been assessed yet.