tofuutils / tenv

OpenTofu / Terraform / Terragrunt and Atmos version manager
https://tofuutils.github.io/tenv/
Apache License 2.0
662 stars 32 forks source link

Technical improvement "lightweight proxy" #183

Closed dvaumoron closed 3 months ago

dvaumoron commented 3 months ago

Is your feature request related to a problem? Please describe.

tenv proxy command (tofu, terraform, terragrunt, atmos, tf) are standalone, however they are almost identical and most of the behaviour are already in tenv command. I wonder if this is really necessary, is there users copying only one of the proxy without keeping tenv with it ? If no, installed version of tenv use more disk space than necessary

Describe the solution you'd like

We could reduce proxy command binaries size, making them redirecting to a tenv call <tool> [args ...] wich will have the same functionnality than actual proxy (version detection, optionnal auto installation, etc. and the redirection to the appropriate version), and the tenv binary will not be significantly bigger.

Additional context

If there is indenpendant binary usage, that will no longer work (i.e. proxy will fail without tenv binary on path of the same system)

What do you think ?

kvendingoldo commented 3 months ago

First of all, I agree, that proxies took a lot of space: 41mb (7.3+8.5+8.1+8.5+8.5). Also, I agree that we can move login into tenv. I don't think that any of our users will work with proxy (e.g. tofu) without tenv. So, it's a good idea in general.

@Nmishin @anastasiiakozlova245 wdyt?

dvaumoron commented 3 months ago

The new proxies are 1.6mb each (on linux)

dvaumoron commented 3 months ago

I think there is an issue, there is two proxy level, and both will try to write to GITHUB_OUTPUT when called from github action...