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

Use default http transport settings to honor proxy settings #208

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

wagoodman
Copy link
Contributor

Before #174 the http.Transport was only overridden in certain circumstances. When the transport was overridden no proxy configuration would be honored. With the containerd PR, the transport is always overridden, causing proxy configurations to fail by default. This fixes the overridden proxy to always inherit all options (except for the TLS config) from the default prototype to fix the existing proxy issues reported in anchore/syft#2203 .

@wagoodman wagoodman added the bug Something isn't working label Nov 17, 2023
@wagoodman wagoodman self-assigned this Nov 17, 2023
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Copy link

github-actions bot commented Nov 17, 2023

Benchmark Test Results

Benchmark results from the latest changes vs base branch
latest: Pulling from library/ubuntu
tar: Option --mtime: Treating date 'UTC 2019-09-16' as 2019-09-16 00:00:00
goos: linux
goarch: amd64
pkg: github.com/anchore/stereoscope/pkg/file
cpu: AMD EPYC 7763 64-Core Processor                
ctr: 
           │ ./.tmp/benchmark-46b87f1.txt │
           │            sec/op            │
TarIndex-2                   35.31µ ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95

           │ ./.tmp/benchmark-46b87f1.txt │
           │             B/op             │
TarIndex-2                  5.559Ki ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95

           │ ./.tmp/benchmark-46b87f1.txt │
           │          allocs/op           │
TarIndex-2                    93.00 ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95

pkg: github.com/anchore/stereoscope/test/integration
                                      │ ./.tmp/benchmark-46b87f1.txt │
                                      │            sec/op            │
SimpleImage_GetImage/docker-archive-2                   1.303m ± ∞ ¹
SimpleImage_GetImage/podman-2                           19.02m ± ∞ ¹
geomean                                                 4.978m
¹ need >= 6 samples for confidence interval at level 0.95

                                      │ ./.tmp/benchmark-46b87f1.txt │
                                      │             B/op             │
SimpleImage_GetImage/docker-archive-2                  329.3Ki ± ∞ ¹
SimpleImage_GetImage/podman-2                          435.3Ki ± ∞ ¹
geomean                                                378.6Ki
¹ need >= 6 samples for confidence interval at level 0.95

                                      │ ./.tmp/benchmark-46b87f1.txt │
                                      │          allocs/op           │
SimpleImage_GetImage/docker-archive-2                   2.776k ± ∞ ¹
SimpleImage_GetImage/podman-2                           2.755k ± ∞ ¹
geomean                                                 2.765k
¹ need >= 6 samples for confidence interval at level 0.95

ctr: failed to dial "/run/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: permission denied"
                                                   │ ./.tmp/benchmark-46b87f1.txt │
                                                   │            sec/op            │
SimpleImage_FetchSquashedContents/docker-archive-2                   17.94µ ± ∞ ¹
SimpleImage_FetchSquashedContents/podman-2                           17.94µ ± ∞ ¹
geomean                                                              17.94µ
¹ need >= 6 samples for confidence interval at level 0.95

                                                   │ ./.tmp/benchmark-46b87f1.txt │
                                                   │             B/op             │
SimpleImage_FetchSquashedContents/docker-archive-2                  2.648Ki ± ∞ ¹
SimpleImage_FetchSquashedContents/podman-2                          2.648Ki ± ∞ ¹
geomean                                                             2.648Ki
¹ need >= 6 samples for confidence interval at level 0.95

                                                   │ ./.tmp/benchmark-46b87f1.txt │
                                                   │          allocs/op           │
SimpleImage_FetchSquashedContents/docker-archive-2                    21.00 ± ∞ ¹
SimpleImage_FetchSquashedContents/podman-2                            21.00 ± ∞ ¹
geomean                                                               21.00
¹ need >= 6 samples for confidence interval at level 0.95

@wagoodman wagoodman force-pushed the fix-proxy branch 2 times, most recently from 514f050 to eaeeed0 Compare November 17, 2023 20:29
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman enabled auto-merge (squash) November 17, 2023 20:32
@wagoodman wagoodman merged commit 3610f4e into main Nov 17, 2023
6 checks passed
@wagoodman wagoodman deleted the fix-proxy branch November 17, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants