Skip to content

Commit

Permalink
Bump spec version to v0.8.0
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <elezar@nvidia.com>
  • Loading branch information
elezar committed Jul 5, 2024
1 parent ff280d6 commit fcd46f3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
9 changes: 9 additions & 0 deletions pkg/cdi/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fcd46f3

Please sign in to comment.