From 76a7e462b12b2bab3393b93e6a097a64e35073fa 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 ++- cmd/cdi/go.mod | 2 +- go.mod | 2 +- pkg/cdi/version.go | 9 +++++++++ specs-go/config.go | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/SPEC.md b/SPEC.md index a6ebbfe0..761c7b2e 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/cmd/cdi/go.mod b/cmd/cdi/go.mod index 8dc72ac3..efac1501 100644 --- a/cmd/cdi/go.mod +++ b/cmd/cdi/go.mod @@ -22,7 +22,7 @@ require ( golang.org/x/mod v0.4.2 // indirect golang.org/x/sys v0.1.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - tags.cncf.io/container-device-interface/specs-go v0.7.0 // indirect + tags.cncf.io/container-device-interface/specs-go v0.8.0 // indirect ) replace tags.cncf.io/container-device-interface => ../.. diff --git a/go.mod b/go.mod index 3ddd6d29..d0e554fb 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 e2266944..9ca91267 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 a311ffa1..d6d6302f 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 {