Skip to content

Commit

Permalink
chore: alias i915/amdgpu extensions to new name
Browse files Browse the repository at this point in the history
Alias i915/amdgpu extensions to new name.

Ref: siderolabs/extensions#526
Part of: siderolabs/talos#9728

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Nov 19, 2024
1 parent b7b4c71 commit c102c95
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/profile/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ func extensionNameAlias(extensionName string) (string, bool) {
return "siderolabs/nonfree-kmod-nvidia-lts", true
case "siderolabs/nvidia-fabricmanager": // extension got renamed
return "siderolabs/nvidia-fabric-manager-lts", true
case "siderolabs/i915-ucode": // extension got renamed
return "siderolabs/i915", true
case "siderolabs/amdgpu-firmware": // extension got renamed
return "siderolabs/amdgpu", true
default:
return "", false
}
Expand Down
51 changes: 51 additions & 0 deletions internal/profile/profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@ func (mockArtifactProducer) GetOfficialExtensions(context.Context, string) ([]ar
TaggedReference: ensure.Value(name.NewTag("ghcr.io/siderolabs/nvidia-fabricmanager:v535.0.0")),
Digest: "sha256:nvidia-fabric",
},
{
TaggedReference: ensure.Value(name.NewTag("ghcr.io/siderolabs/i915-ucode:2023048")),
Digest: "sha256:i915-ucode",
},
{
TaggedReference: ensure.Value(name.NewTag("ghcr.io/siderolabs/amdgpu-firmware:2023048")),
Digest: "sha256:amdgpu-firmware",
},
}, nil
}

Expand Down Expand Up @@ -554,6 +562,49 @@ func TestEnhanceFromSchematic(t *testing.T) {
},
},
},
{
name: "aliased i915 and amdgpu extensions",
baseProfile: baseProfile,
schematic: schematic.Schematic{
Customization: schematic.Customization{
SystemExtensions: schematic.SystemExtensions{
OfficialExtensions: []string{
"siderolabs/i915-ucode",
"siderolabs/amdgpu-firmware",
},
},
},
},
versionString: "v1.9.0",
expectedProfile: profile.Profile{
Platform: constants.PlatformMetal,
SecureBoot: pointer.To(false),
Arch: "amd64",
Version: "v1.9.0",
Customization: profile.CustomizationProfile{},
Input: profile.Input{
SystemExtensions: []profile.ContainerAsset{
{
OCIPath: "amd64-sha256:i915-ucode.oci",
},
{
OCIPath: "amd64-sha256:amdgpu-firmware.oci",
},
{
TarballPath: "838b9b4504a5600db14dbbb2abc128c32b3fc3c145781adf8ce23b2d79e4246e.tar",
},
},
},
Output: profile.Output{
Kind: profile.OutKindImage,
OutFormat: profile.OutFormatZSTD,
ImageOptions: &profile.ImageOptions{
DiskSize: profile.MinRAWDiskSize,
DiskFormat: profile.DiskFormatRaw,
},
},
},
},
{
name: "aliased extensions",
baseProfile: baseProfile,
Expand Down

0 comments on commit c102c95

Please sign in to comment.