Skip to content

Draft: hooks: Refactor tar archive extraction

Justin Tobler requested to merge jt-transactional-restore-custom-hooks into master

The RestoreCustomHooks RPC recieves a tar archive as input that gets extracted to the repository. Currently this is accomplished by utilizing an external tar process to perform the extraction operation. This results in differences in behavior between the version of tar present on the host system have to accounted for in code and handled accordingly. To avoid this the archive/tar package in go can be used to natively handle extraction of the tar archive.

This change refactors the RestoreCustomHooks RPC to use the newly created extractHooks() function to perform the hooks extraction from the tar archive.

Edited by Justin Tobler

Merge request reports