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
Flaky behaviour using custom slice types and listType marker #435
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@zx8: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This issues still is present in 0.6.0 /reopen |
@avorima: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@avorima: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@avorima: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/remove-lifecycle-rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/repoen The issue is still reproducible on the latest commit ( In my case I just want to add the two markers In fact, when using a custom slice type it is not even possible to add the two markers. The following variant simply get ignored by type BarSpec struct {
Foos Foos `json:"foos,omitempty"`
}
// +listType=map
// +listMapKey=id
type Foos []Foo
type Foo struct {
ID string `json:"id"`
Other string `json:"other"`
} The following variant leads to an error similar as in the first comment, when running type BarSpec struct {
// +listType=map
// +listMapKey=id
Foos Foos `json:"foos,omitempty"`
}
type Foos []Foo
type Foo struct {
ID string `json:"id"`
Other string `json:"other"`
} The error:
The only working version currently is: type BarSpec struct {
// +listType=map
// +listMapKey=id
Foos []Foo `json:"foos,omitempty"`
}
type Foo struct {
ID string `json:"id"`
Other string `json:"other"`
} |
/remove-lifecycle rotten |
/reopen |
@chrischdi: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
controller-gen
will sometimes fail to create the CRD manifests when using a custom slice type, e.g.type Foos []Foo
and thelistType
andlistMapKey
markers.To reproduce this create a sample project with kubebuilder v2.3.1:
and then add the following to the
api/v1beta1/frigate_types.go
file:Running
make manifests
will then on occasion yield the following errors:If the
+kubebuilder:validation:Type=array
marker is above the type definition it fails consistently.I have verified that this occurs with both
v0.2.5
andv0.3.0
.The issue seem to come the fact that both
listType
andkubebuilder:validation:Type
markers implementApplyFirst
to ensure they get applied before all other markers. But since applyMarkers loops over a map, the order is random.The text was updated successfully, but these errors were encountered: