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
Ignore unexported fields in import_known_versions_test #53402
Ignore unexported fields in import_known_versions_test #53402
Conversation
Hi @dougm. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. 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. I understand the commands that are listed here. |
/sig testing |
/ok-to-test |
This seems OK, but what changed to make this start failing? |
Seems the type of an unexported field changed. The test also passes when ignoring unexported fields: modified pkg/master/import_known_versions_test.go
@@ -106,6 +106,10 @@ func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, pa
case reflect.Struct:
for i := 0; i < tp.NumField(); i++ {
f := tp.Field(i)
+ if f.PkgPath != "" {
+ continue
+ }
+
jsonTag := f.Tag.Get("json")
protoTag := f.Tag.Get("protobuf")
if len(jsonTag) > 0 || len(protoTag) > 0 { |
Is that the better fix? We don't really want people using `int` and `uint`
in API.
…On Wed, Oct 4, 2017 at 12:46 PM, Doug MacEachern ***@***.***> wrote:
Seems the type of an unexported field changed. The test also passes when
ignoring unexported fields:
modified pkg/master/import_known_versions_test.go@@ -106,6 +106,10 @@ func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, pa
case reflect.Struct:
for i := 0; i < tp.NumField(); i++ {
f := tp.Field(i)+ if f.PkgPath == "" {+ continue+ }+
jsonTag := f.Tag.Get("json")
protoTag := f.Tag.Get("protobuf")
if len(jsonTag) > 0 || len(protoTag) > 0 {
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#53402 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVPxRk5mOUFrGjDUa91HzuJgL_Popks5so-CjgaJpZM4PssNF>
.
|
ab79bf6
to
5321054
Compare
@thockin sounds good, I've updated the PR to ignore unexported fields instead. The field of type |
Also note that I tried removing
|
/retest |
This needs an associated issue and a /lgtm |
Tests currently fail with: "import_known_versions_test.go:122: Unexpected type uint in ..." Closes kubernetes#53508
5321054
to
0620569
Compare
ping me back when issue is filed and linked in first comment. |
It needs to be in the first comment of this stream. Will add it. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dougm, thockin Associated issue: 53508 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 53418, 53366, 53115, 53402, 53130). If you want to cherry-pick this change to another branch, please follow the instructions here. |
Changes 'int' to 'int32', enforced by import_known_versions_test Follow up to PR kubernetes#53402
Automatic merge from submit-queue (batch tested with PRs 54005, 55127, 53850, 55486, 53440). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Enforce use of fixed size int types in the API Changes 'int' to 'int32', enforced by import_known_versions_test Follow up to PR #53402 **What this PR does / why we need it**: This PR changes a few fields within the API from 'int' to 'int32' and is now enforced by import_known_versions_test. We need this so integer fields are the same size regardless of $GOARCH. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
Tests currently fail with:
"import_known_versions_test.go:122: Unexpected type uint in ..."
What this PR does / why we need it:
Running
make test
against the latest (f11a551) fails for me with:Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #53508Special notes for your reviewer:
Release note: