-
Notifications
You must be signed in to change notification settings - Fork 499
CNTRLPLANE-3027: Decouple all platform boot image resolvers for dual-stream support #8709
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 |
|---|---|---|
|
|
@@ -168,7 +168,11 @@ func resolveGCPImage(nodePool *hyperv1.NodePool, releaseImage *releaseinfo.Relea | |
| } | ||
|
|
||
| // Resolve image from release metadata | ||
| image, err := defaultNodePoolGCPImage(nodePool.Spec.Arch, releaseImage) | ||
| streamMeta, err := releaseImage.StreamForName("") | ||
| if err != nil { | ||
| return "", fmt.Errorf("couldn't resolve stream metadata: %w", err) | ||
| } | ||
| image, err := DefaultNodePoolGCPImage(nodePool.Spec.Arch, streamMeta) | ||
|
Comment on lines
+171
to
+175
Contributor
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. Guard Line 171 calls a method on Suggested fix func resolveGCPImage(nodePool *hyperv1.NodePool, releaseImage *releaseinfo.ReleaseImage) (string, error) {
gcpPlatform := nodePool.Spec.Platform.GCP
// If user specified a custom image, use it
if gcpPlatform.Image != "" {
return gcpPlatform.Image, nil
}
// Resolve image from release metadata
+ if releaseImage == nil {
+ return "", fmt.Errorf("release image is nil")
+ }
streamMeta, err := releaseImage.StreamForName("")
if err != nil {
return "", fmt.Errorf("couldn't resolve stream metadata: %w", err)
}🤖 Prompt for AI Agents |
||
| if err != nil { | ||
| return "", fmt.Errorf("couldn't discover a GCP image for release image: %w", err) | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.