Skip to content

Conversation

wagoodman
Copy link
Contributor

This PR makes a few alterations:

  • Passes the entire auth config along into docker pull options (not just the username/password portion)
  • Some user auth configurations can lead to error messages indicating bad username/password or bad personal access token, even when pulling public images from dockerhub. The fix was to ensure that auth URLs used for index.docker.io should resolve to index.docker.io/v1/.

Huge thanks to @thaJeztah , @crazy-max, and @chris-crone on troubleshooting this and finding a fix!

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
@wagoodman wagoodman added the bug Something isn't working label Mar 30, 2022
@wagoodman wagoodman requested a review from a team March 30, 2022 16:24
@wagoodman wagoodman self-assigned this Mar 30, 2022
@github-actions
Copy link

github-actions bot commented Mar 30, 2022

Benchmark Test Results

Benchmark results from the latest changes vs base branch
name                                             old time/op    new time/op    delta
pkg:github.com/anchore/stereoscope/pkg/file goos:linux goarch:amd64
TarIndex-2                                         46.9µs ± 1%    47.0µs ± 1%     ~     (p=0.686 n=4+4)
pkg:github.com/anchore/stereoscope/test/integration goos:linux goarch:amd64
SimpleImage_GetImage/FromTarball-2                 1.59ms ± 5%    1.80ms ±10%  +13.25%  (p=0.016 n=5+5)
SimpleImage_GetImage/FromOciTarball-2              1.42ms ± 7%    1.73ms ±22%  +22.14%  (p=0.008 n=5+5)
SimpleImage_GetImage/FromOciDirectory-2             942µs ± 4%     976µs ± 9%     ~     (p=0.690 n=5+5)
SimpleImage_FetchSquashedContents/FromTarball-2    20.3µs ± 3%    19.8µs ± 1%   -2.16%  (p=0.008 n=5+5)

name                                             old alloc/op   new alloc/op   delta
pkg:github.com/anchore/stereoscope/pkg/file goos:linux goarch:amd64
TarIndex-2                                         5.69kB ± 0%    5.69kB ± 0%     ~     (p=1.000 n=4+4)
pkg:github.com/anchore/stereoscope/test/integration goos:linux goarch:amd64
SimpleImage_GetImage/FromTarball-2                  348kB ± 0%     356kB ± 0%   +2.23%  (p=0.008 n=5+5)
SimpleImage_GetImage/FromOciTarball-2               641kB ± 0%     641kB ± 0%     ~     (p=0.651 n=5+5)
SimpleImage_GetImage/FromOciDirectory-2             403kB ± 0%     403kB ± 0%     ~     (p=0.841 n=5+5)
SimpleImage_FetchSquashedContents/FromTarball-2    2.71kB ± 0%    2.71kB ± 0%     ~     (all equal)

name                                             old allocs/op  new allocs/op  delta
pkg:github.com/anchore/stereoscope/pkg/file goos:linux goarch:amd64
TarIndex-2                                           93.0 ± 0%      93.0 ± 0%     ~     (all equal)
pkg:github.com/anchore/stereoscope/test/integration goos:linux goarch:amd64
SimpleImage_GetImage/FromTarball-2                  2.40k ± 0%     2.62k ± 0%   +9.20%  (p=0.016 n=4+5)
SimpleImage_GetImage/FromOciTarball-2               1.44k ± 0%     1.44k ± 0%     ~     (all equal)
SimpleImage_GetImage/FromOciDirectory-2             1.23k ± 0%     1.23k ± 0%     ~     (all equal)
SimpleImage_FetchSquashedContents/FromTarball-2      21.0 ± 0%      21.0 ± 0%     ~     (all equal)

Copy link
Contributor

@kzantow kzantow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments 👍

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
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.

2 participants