Skip to content

Bump spec version to v0.8.0 #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 cmd/cdi/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 => ../..
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