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

Add support for HTTP_PROXY #738

Merged
merged 17 commits into from
Apr 11, 2023
Merged

Conversation

FriggaHel
Copy link
Contributor

Proposed changes

This PR adds support for HTTP_PROXY (including proxies with authentication).
Also checks HTTP_PROXY right at startup to ensure sanity

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have updated the json schema (if appropriate)

Further comments

@FriggaHel FriggaHel requested a review from a team as a code owner April 6, 2023 16:13
internal/http/github.go Outdated Show resolved Hide resolved
@mhan83
Copy link
Contributor

mhan83 commented Apr 6, 2023

Validation needs another look?

🍖 HTTP_PROXY=lkadsjfadsklf ./saucectl run -c .sauce/espresso.yml
10:32:28 INF Using proxy: ://:
Running version 0.0.0+unknown
10:32:28 INF Running Espresso in Sauce Labs
10:32:28 INF Checking if ./tests/e2e/espresso/calc.apk has already been uploaded previously
10:32:28 INF Checksum: b4f9b07ac7f35639620c4a0f54605aedcb18a2ae70af1c45ea14ffaffb856618
⠋ Uploading application /Users/michaelhan/code/saucelabs/saucectl/tests/e2e/espresso/calc.apk panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1489b85]

goroutine 1 [running]:
github.com/saucelabs/saucectl/internal/http.(*AppStore).UploadStream(0x1f88500, {0xc00092170d?, 0x3e?}, {0x0?, 0x0?}, {0x1a5b960?, 0xc0000102a0?})
        /Users/michaelhan/code/saucelabs/saucectl/internal/http/appstore.go:135 +0x245
github.com/saucelabs/saucectl/internal/saucecloud.(*CloudRunner).uploadProject(0xc00009b800, {0xc00003f560, 0x1d}, {0x0, 0x0}, {0x190f53c, 0xb}, 0x0?)
        /Users/michaelhan/code/saucelabs/saucectl/internal/saucecloud/cloud.go:711 +0x60c
github.com/saucelabs/saucectl/internal/saucecloud.(*EspressoRunner).RunProject(0xc00009b800)
        /Users/michaelhan/code/saucelabs/saucectl/internal/saucecloud/espresso.go:43 +0xb3
github.com/saucelabs/saucectl/internal/cmd/run.runEspressoInCloud({{{0xc000381d90, 0x7}, {0xc000381da8, 0x8}}, {{0x0, 0x0}, 0x45d964b800}, 0x0, 0x0, {0x7ffeefbfef82, ...}, ...}, ...)
        /Users/michaelhan/code/saucelabs/saucectl/internal/cmd/run/espresso.go:183 +0x51e
github.com/saucelabs/saucectl/internal/cmd/run.runEspresso(0xc000831900, {{{{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0, 0x0}}, ...}, ...}, ...)
        /Users/michaelhan/code/saucelabs/saucectl/internal/cmd/run/espresso.go:143 +0x805
github.com/saucelabs/saucectl/internal/cmd/run.Run(0x104b672?)
        /Users/michaelhan/code/saucelabs/saucectl/internal/cmd/run/run.go:236 +0x365
github.com/saucelabs/saucectl/internal/cmd/run.Command.func2(0xc000831900?, {0x190a863?, 0x2?, 0x2?})
        /Users/michaelhan/code/saucelabs/saucectl/internal/cmd/run/run.go:101 +0x2e
github.com/spf13/cobra.(*Command).execute(0xc000831900, {0xc000138020, 0x2, 0x2})
        /Users/michaelhan/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xc000831400)
        /Users/michaelhan/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/michaelhan/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
main.main()
        /Users/michaelhan/code/saucelabs/saucectl/cmd/saucectl/saucectl.go:78 +0x5dc

internal/http/proxy.go Outdated Show resolved Hide resolved
internal/http/proxy.go Outdated Show resolved Hide resolved
@FriggaHel
Copy link
Contributor Author

@mhan83: This is fixed, this was a bug in AppStorage code !

internal/http/appstore.go Outdated Show resolved Hide resolved
internal/http/github.go Outdated Show resolved Hide resolved
@FriggaHel FriggaHel force-pushed the DEVX-2239-add-support-for-proxies branch from e50972e to c821c1d Compare April 7, 2023 17:57
@alexplischke alexplischke added the enhancement New feature or request label Apr 7, 2023
@FriggaHel FriggaHel merged commit 45ec0ad into main Apr 11, 2023
@FriggaHel FriggaHel deleted the DEVX-2239-add-support-for-proxies branch April 11, 2023 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants