Skip to content
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

Bump spec version to v0.9.0 #252

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
| v0.9.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.
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 (
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 v0.9.0 // indirect
)

replace (
Expand Down
2 changes: 1 addition & 1 deletion cmd/validate/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 v0.9.0 // indirect
)

replace (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 v0.9.0
)

require (
Expand Down
2 changes: 1 addition & 1 deletion schema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 v0.9.0
)

require (
Expand Down
11 changes: 10 additions & 1 deletion specs-go/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const (
v060 version = "v0.6.0"
v070 version = "v0.7.0"
v080 version = "v0.8.0"
v090 version = "v0.9.0"

// vEarliest is the earliest supported version of the CDI specification
vEarliest version = v030
Expand All @@ -56,6 +57,7 @@ var validSpecVersions = requiredVersionMap{
v060: requiresV060,
v070: requiresV070,
v080: requiresV080,
v090: requiresV090,
}

// ValidateVersion checks whether the specified spec version is valid.
Expand Down Expand Up @@ -138,9 +140,16 @@ func (r requiredVersionMap) requiredVersion(spec *Spec) version {
return minVersion
}

// requiresV090 returns true if the spec uses v0.9.0 features.
// Since the v0.9.0 spec bump was due to moving the minimum version checks to
// the spec package, there are no explicit spec changes.
func requiresV090(_ *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 explicit no spec changes.
func requiresV080(_ *Spec) bool {
return false
}
Expand Down
Loading