-
Notifications
You must be signed in to change notification settings - Fork 328
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
Move the use of VerifyType
in consumer packages to unit tests
#97
Comments
Similarly the use of
is not an issue as it's a compile time check |
/kind good-first-issue |
/assign @vdemeester |
@dprotaso: GitHub didn't allow me to assign the following users: vdemeester. Note that only knative members and repo collaborators can be assigned. 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 is done. |
We're using
duck.VerifyType
to enforce that serialization formats match. These statements are being placed in packages as follows:pkg/apis/duck/v1alpha1/targetable_types.go
Line 37 in 2b6bdab
This technique means verify is invoked at runtime during package initialization.
As we add more potential types that need to be verified this package initialization technique has an affect on a program's startup.
To avoid this startup time cost, we can simply move these assertions to unit tests that invoke
VerifyType
The text was updated successfully, but these errors were encountered: