-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Updated openshift-tests images to utilize mapped images from external binary #30319
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -419,7 +419,7 @@ func (b *TestBinary) RunTests(ctx context.Context, timeout time.Duration, env [] | |
| return results | ||
| } | ||
|
|
||
| func (b *TestBinary) ListImages(ctx context.Context) (ImageSet, error) { | ||
| func (b *TestBinary) ListImages(ctx context.Context) ([]extension.Image, error) { | ||
| start := time.Now() | ||
| binName := filepath.Base(b.binaryPath) | ||
|
|
||
|
|
@@ -430,23 +430,14 @@ func (b *TestBinary) ListImages(ctx context.Context) (ImageSet, error) { | |
| return nil, fmt.Errorf("failed running '%s list': %w\nOutput: %s", b.binaryPath, err, output) | ||
| } | ||
|
|
||
| var images []Image | ||
| var images []extension.Image | ||
| err = json.Unmarshal(output, &images) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| result := make(ImageSet, len(images)) | ||
| for _, image := range images { | ||
| imageConfig := k8simage.Config{} | ||
| imageConfig.SetName(image.Name) | ||
| imageConfig.SetVersion(image.Version) | ||
| imageConfig.SetRegistry(image.Registry) | ||
| result[k8simage.ImageID(image.Index)] = imageConfig | ||
| } | ||
|
|
||
| logrus.Infof("Listed %d test images for %q in %v", len(images), binName, time.Since(start)) | ||
| return result, nil | ||
| return images, nil | ||
| } | ||
|
|
||
| // ExtractAllTestBinaries determines the optimal release payload to use, and extracts all the external | ||
|
|
@@ -635,9 +626,9 @@ func (binaries TestBinaries) Info(ctx context.Context, parallelism int) ([]*Exte | |
| return infos, nil | ||
| } | ||
|
|
||
| func (binaries TestBinaries) ListImages(ctx context.Context, parallelism int) ([]ImageSet, error) { | ||
| func (binaries TestBinaries) ListImages(ctx context.Context, parallelism int) ([]extension.Image, error) { | ||
| var ( | ||
| allImages []ImageSet | ||
| allImages []extension.Image | ||
| mu sync.Mutex | ||
| wg sync.WaitGroup | ||
| errCh = make(chan error, len(binaries)) | ||
|
|
@@ -673,12 +664,12 @@ func (binaries TestBinaries) ListImages(ctx context.Context, parallelism int) ([ | |
| continue // Skip self - only external binaries need to be queried for images | ||
| } | ||
|
|
||
| imageConfig, err := binary.ListImages(ctx) | ||
| image, err := binary.ListImages(ctx) | ||
| if err != nil { | ||
| errCh <- err | ||
| } | ||
| mu.Lock() | ||
| allImages = append(allImages, imageConfig) | ||
| allImages = append(allImages, image...) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this change ( If you have a chance, and if it makes sense, I'd love to see this kind of change in separate, logical commits.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can make changes to funcs in Honestly, I find this whole operation combination ( Anyway, let me make some changes on binary.go to see if those changes there will result in a simpler login on images_command.go side. |
||
| mu.Unlock() | ||
| } | ||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.