reconcilerio / dies

immutable, fluent, builders for Kubernetes resources
Apache License 2.0
8 stars 4 forks source link

Referring to a Die in corev1 Breaks Tests #121

Closed nebhale closed 8 months ago

nebhale commented 10 months ago

Currently, when referring to a Die in corev1 (in this case Namespace), inconsistencies in the package will cause tests in the referring package to fail:

➜ go test ./...                                                                                        
# dies.dev/apis/core/v1
../../../../go/pkg/mod/dies.dev@v0.9.0/apis/core/v1/persistantvolumeclaim.go:41:62: cannot use r.Resources (variable of type "k8s.io/api/core/v1".VolumeResourceRequirements) as "k8s.io/api/core/v1".ResourceRequirements value in argument to ResourceRequirementsBlank.DieImmutable(false).DieFeed
../../../../go/pkg/mod/dies.dev@v0.9.0/apis/core/v1/persistantvolumeclaim.go:43:17: cannot use d.DieRelease() (value of type "k8s.io/api/core/v1".ResourceRequirements) as "k8s.io/api/core/v1".VolumeResourceRequirements value in assignment
../../../../go/pkg/mod/dies.dev@v0.9.0/apis/core/v1/zz_generated.die.go:19894:17: cannot use v (variable of type "k8s.io/api/core/v1".ResourceRequirements) as "k8s.io/api/core/v1".VolumeResourceRequirements value in assignment
?       github.com/nebhale/test/api/test/v1alpha1   [no test files]
FAIL
nebhale commented 10 months ago

Looks to be related to apimachinery breaking change between 0.28.3 and 0.29.0.

mamachanko commented 10 months ago

Related https://github.com/scothis/dies/pull/120

rashedkvm commented 8 months ago

@scothis is there any update for this issue? Thanks!

scothis commented 8 months ago

Fixed in https://github.com/scothis/dies/releases/tag/v0.10.0