From fcd46f37cdcde139e6b35ba6c1013a4377d5b8d3 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 5 Jul 2024 16:01:39 +0200 Subject: [PATCH] Bump spec version to v0.8.0 Signed-off-by: Evan Lezar --- SPEC.md | 3 ++- go.mod | 2 +- pkg/cdi/version.go | 9 +++++++++ specs-go/config.go | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/SPEC.md b/SPEC.md index a6ebbfe..761c7b2 100644 --- a/SPEC.md +++ b/SPEC.md @@ -29,7 +29,8 @@ Released versions of the spec are available as Git tags. | v0.6.0 | | Add `Annotations` field to `Spec` and `Device` specifications | | | | Allow dots (`.`) in name segment of `Kind` field. | | v0.7.0 | | Add `IntelRdt`field. | -| v0.7.0 | | Add `AdditionalGIDs` to `ContainerEdits` | +| | | Add `AdditionalGIDs` to `ContainerEdits` | +| v0.8.0 | | Remove .ToOCI() functions from specs-go package. | *Note*: The initial release of a **spec** with version `v0.x.0` will be tagged as `v0.x.0` with subsequent changes to the API applicable to this version tagged as `v0.x.y`. diff --git a/go.mod b/go.mod index 3ddd6d2..d0e554f 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( golang.org/x/mod v0.4.2 golang.org/x/sys v0.1.0 sigs.k8s.io/yaml v1.3.0 - tags.cncf.io/container-device-interface/specs-go v0.7.0 + tags.cncf.io/container-device-interface/specs-go v0.8.0 ) require ( diff --git a/pkg/cdi/version.go b/pkg/cdi/version.go index e226694..9ca9126 100644 --- a/pkg/cdi/version.go +++ b/pkg/cdi/version.go @@ -40,6 +40,7 @@ const ( v050 version = "v0.5.0" v060 version = "v0.6.0" v070 version = "v0.7.0" + v080 version = "v0.8.0" // vEarliest is the earliest supported version of the CDI specification vEarliest version = v030 @@ -56,6 +57,7 @@ var validSpecVersions = requiredVersionMap{ v050: requiresV050, v060: requiresV060, v070: requiresV070, + v080: requiresV080, } // MinimumRequiredVersion determines the minimum spec version for the input spec. @@ -120,6 +122,13 @@ func (r requiredVersionMap) requiredVersion(spec *cdi.Spec) version { return minVersion } +// requiresV080 returns true if the spec uses v0.8.0 features. +// Since the v0.8.0 spec bump was due to the removed .ToOCI functions on the +// spec types, there are explicit spec changes. +func requiresV080(_ *cdi.Spec) bool { + return false +} + // requiresV070 returns true if the spec uses v0.7.0 features func requiresV070(spec *cdi.Spec) bool { if spec.ContainerEdits.IntelRdt != nil { diff --git a/specs-go/config.go b/specs-go/config.go index a311ffa..d6d6302 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -3,7 +3,7 @@ package specs import "os" // CurrentVersion is the current version of the Spec. -const CurrentVersion = "0.7.0" +const CurrentVersion = "0.8.0" // Spec is the base configuration for CDI type Spec struct {