Skip to content

Commit

Permalink
Use CreateExternalDefaultClient rather than CreateDefaultClient for
Browse files Browse the repository at this point in the history
the tarballProvider http client

This was probably fine before on accident. The internal client only
has a few ciphers enabled and now that bionic stemcells are hosted
on storage.googleapis.com this was causing the following error:

remote error: tls: handshake failure
  • Loading branch information
jpalermo committed Jun 11, 2021
1 parent 5a9abb4 commit 3c1a893
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/env_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func NewEnvFactory(
{
tarballCacheBasePath := filepath.Join(workspaceRootPath, "downloads")
tarballCache := bitarball.NewCache(tarballCacheBasePath, deps.FS, deps.Logger)
httpClient := httpclient.NewHTTPClient(httpclient.CreateDefaultClient(nil), deps.Logger)
httpClient := httpclient.NewHTTPClient(httpclient.CreateExternalDefaultClient(nil), deps.Logger)
tarballProvider := bitarball.NewProvider(
tarballCache, deps.FS, httpClient, 3, 500*time.Millisecond, deps.Logger)

Expand Down
2 changes: 1 addition & 1 deletion installation/tarball/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var _ = Describe("Provider", func() {
fs = fakesys.NewFakeFileSystem()
logger := boshlog.NewLogger(boshlog.LevelNone)
cache = NewCache(filepath.Join("/", "fake-base-path"), fs, logger)
httpClient := httpclient.NewHTTPClient(httpclient.DefaultClient, logger)
httpClient := httpclient.NewHTTPClient(httpclient.CreateExternalDefaultClient(nil), logger)
provider = NewProvider(cache, fs, httpClient, 3, 0, logger)
fakeStage = fakebiui.NewFakeStage()
})
Expand Down

0 comments on commit 3c1a893

Please sign in to comment.