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

Allow kurtosis to be used behind proxy #1434

Open
vanderheijden86 opened this issue Sep 29, 2023 · 3 comments
Open

Allow kurtosis to be used behind proxy #1434

vanderheijden86 opened this issue Sep 29, 2023 · 3 comments
Assignees
Labels
critical Critical bug or feature feature request

Comments

@vanderheijden86
Copy link

vanderheijden86 commented Sep 29, 2023

Background & motivation

When currently using kurtosis cli behind a corporate proxy, you run into issues with cloning git repositories (for example).

INFO[2023-09-26T16:19:41+02:00] Uploading and executing package 'github.com/gobitfly/eth2-beaconchain-explorer/local-testnet' 
There was an error interpreting Starlark code 
Evaluation error: An error occurred while loading the module 'github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star'
    Caused by: Error in cloning git repository 'https://github.com/kurtosis-tech/eth2-package.git' to '/kurtosis-data/tmp-startosis-packages/tmp-repo-dir-383024695/kurtosis-tech/eth2-package'. Make sure that 'https://github.com/kurtosis-tech/eth2-package.git' exists and is a public repository.
    at [github.com/gobitfly/eth2-beaconchain-explorer/local-testnet/main.star:1:28]: <toplevel>

Error encountered running Starlark code.

This is caused by the fact that kurtosis doesn't pick up designated proxy environment variables like http_proxy, https_proxy, ftp_proxy and no_proxy.

Desired behaviour

In order for kurtosis to work behind a proxy, it would need to pick up these variables and pass them through to the relevant commands (like git) inside of it that connect to the internet via this proxy.

At minimum these variables should be passed through to the git library used in kurtosis, but potentially also in other libraries or executables that are called via kurtosis. By doing so, users operating behind a proxy can use Kurtosis without encountering connectivity issues related to proxy restrictions.

How important is this to you?

Critical; Kurtosis is unusable for me without it.

@github-actions github-actions bot added the critical Critical bug or feature label Sep 29, 2023
@mieubrisse
Copy link
Collaborator

Hey @vanderheijden86 , thanks a ton for suggesting this! As @tedim52 mentioned in Discord, this is probably easiest to do by adding optional keys to the Kurtosis config file that then get passed in to the engine, which in turn will pass it to the Kurtosis API container when it creates enclaves (architecture reference).

@vanderheijden86
Copy link
Author

vanderheijden86 commented Oct 6, 2023

I realise that you're using a somewhat older version of go-git (v5.4.2) in which CloneOptions doesn't contain a property for ProxyOptions. This has been added afterwards --> https://pkg.go.dev/github.com/go-git/go-git/[email protected]#section-readme:~:text=type-,CloneOptions,-¶.

// ProxyOptions provides info required for connecting to a proxy.
  ProxyOptions transport.ProxyOptions

This means I would need to upgrade the go-git version you use, which might break other things that I'm not aware of. How'd you want me to proceed here. Try to upgrade to v5.9.0 of the go-git lib and see what breaks? Or will there be more collateral damage and does it require a more structured effort?

@vanderheijden86
Copy link
Author

Upgrading to latest go-git (v.5.9.0) version seemed to go smoothly, build and tests still succeeding. Will proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical Critical bug or feature feature request
Projects
None yet
Development

No branches or pull requests

2 participants