diff --git a/SPEC.md b/SPEC.md index b88922a7..42d3face 100644 --- a/SPEC.md +++ b/SPEC.md @@ -32,6 +32,7 @@ Released versions of the spec are available as Git tags. | v0.7.0 | | Add `IntelRdt`field. | | | | Add `AdditionalGIDs` to `ContainerEdits` | | v0.8.0 | | Remove .ToOCI() functions from specs-go package. | +| v1.0.0 | | Move minimum version logic to specs-go package. | *Note*: spec loading fails on unknown fields and when the minimum required version is higher than the version specified in the spec. The minimum required version is determined based on the usage of fields mentioned in the table above. For example the minimum required version is v0.6.0 if the `Annotations` field is used in the spec, but `IntelRdt` is not. `MinimumRequiredVersion` API can be used to get the minimum required version. diff --git a/cmd/cdi/go.mod b/cmd/cdi/go.mod index e7a254a5..38a80df6 100644 --- a/cmd/cdi/go.mod +++ b/cmd/cdi/go.mod @@ -22,7 +22,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/sys v0.19.0 // indirect - tags.cncf.io/container-device-interface/specs-go v0.8.0 // indirect + tags.cncf.io/container-device-interface/specs-go v1.0.0 // indirect ) replace ( diff --git a/cmd/validate/go.mod b/cmd/validate/go.mod index 14ce556d..3f194862 100644 --- a/cmd/validate/go.mod +++ b/cmd/validate/go.mod @@ -12,7 +12,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect tags.cncf.io/container-device-interface v0.0.0 // indirect - tags.cncf.io/container-device-interface/specs-go v0.8.0 // indirect + tags.cncf.io/container-device-interface/specs-go v1.0.0 // indirect ) replace ( diff --git a/go.mod b/go.mod index c91e8215..7d37238d 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( golang.org/x/sys v0.19.0 gopkg.in/yaml.v2 v2.4.0 sigs.k8s.io/yaml v1.3.0 - tags.cncf.io/container-device-interface/specs-go v0.8.0 + tags.cncf.io/container-device-interface/specs-go v1.0.0 ) require ( diff --git a/schema/go.mod b/schema/go.mod index 379f1ec4..881e04c7 100644 --- a/schema/go.mod +++ b/schema/go.mod @@ -7,7 +7,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 sigs.k8s.io/yaml v1.3.0 tags.cncf.io/container-device-interface v0.0.0 - tags.cncf.io/container-device-interface/specs-go v0.8.0 + tags.cncf.io/container-device-interface/specs-go v1.0.0 ) require ( diff --git a/specs-go/version.go b/specs-go/version.go index 7f0bbdd8..002e0350 100644 --- a/specs-go/version.go +++ b/specs-go/version.go @@ -25,7 +25,7 @@ import ( const ( // CurrentVersion is the current version of the Spec. - CurrentVersion = "0.8.0" + CurrentVersion = "1.0.0" // vCurrent is the current version as a semver-comparable type vCurrent version = "v" + CurrentVersion @@ -39,6 +39,7 @@ const ( v060 version = "v0.6.0" v070 version = "v0.7.0" v080 version = "v0.8.0" + v100 version = "v1.0.0" // vEarliest is the earliest supported version of the CDI specification vEarliest version = v030 @@ -56,6 +57,7 @@ var validSpecVersions = requiredVersionMap{ v060: requiresV060, v070: requiresV070, v080: requiresV080, + v100: requiresV100, } // ValidateVersion checks whether the specified spec version is valid. @@ -138,9 +140,16 @@ func (r requiredVersionMap) requiredVersion(spec *Spec) version { return minVersion } +// requiresV100 returns true if the spec uses v1.0.0 features. +// Since the v1.0.0 spec bump was due to moving the minimum version checks to +// the spec package, there are no explicit spec changes. +func requiresV100(_ *Spec) bool { + return false +} + // 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. +// spec types, there are no explicit spec changes. func requiresV080(_ *Spec) bool { return false }