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

fix unit test failure in ./pkg/api/testing/serialization_test.go #71370

Merged
merged 1 commit into from
Nov 30, 2018

Conversation

WanLinghao
Copy link
Contributor

@WanLinghao WanLinghao commented Nov 23, 2018

/kind failing-test

What this PR does / why we need it:
fix unit test failure in ./pkg/api/testing/serialization_test.go with error like:

--- FAIL: TestSetControllerConversion (0.00s)
    serialization_test.go:104: rs._internal.apps -> rs.v1.apps
    serialization_test.go:107: unexpected encoding error: no kind "ReplicaSet" is registered for version "apps/v1beta1" in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #71369

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 23, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 23, 2018
@WanLinghao
Copy link
Contributor Author

/retest

@neolit123
Copy link
Member

/kind failing-test
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 26, 2018
@neolit123
Copy link
Member

/retest

@liggitt
Copy link
Member

liggitt commented Nov 26, 2018

this issue is due to the unit tests that use testapi not being deterministic (they are affected by envvars set in the test environment that change API group order).

rather than shuffling order around, can we remove use of testapi from this test and pin the tested version to apps/v1?

@jennybuckley
Copy link

/cc @jpbetz

@WanLinghao
Copy link
Contributor Author

/test pull-kubernetes-integration

@WanLinghao
Copy link
Contributor Author

@liggitt comments addressed, PTAL

extGroup := testapi.Apps
defaultGroup := testapi.Default

fuzzInternalObject(t, schema.GroupVersion{Group: "apps", Version: runtime.APIVersionInternal}, rs, rand.Int63())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this dropped?

@liggitt
Copy link
Member

liggitt commented Nov 27, 2018

looks much better, but the fuzzing should be preserved, otherwise the conversion test is only checking converting an empty object, which isn't that useful

… error like:

    --- FAIL: TestSetControllerConversion (0.00s)
        serialization_test.go:104: rs._internal.apps -> rs.v1.apps
        serialization_test.go:107: unexpected encoding error: no kind "ReplicaSet" is registered for version "apps/v1beta1" in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 28, 2018
@WanLinghao
Copy link
Contributor Author

@liggitt comment addressed, PTAL

@liggitt
Copy link
Member

liggitt commented Nov 28, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2018
@liggitt
Copy link
Member

liggitt commented Nov 28, 2018

/approve

@liggitt liggitt added this to the v1.14 milestone Nov 28, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, WanLinghao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2018
@k8s-ci-robot k8s-ci-robot merged commit d8b9d9b into kubernetes:master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unit test failed in /pkg/api/testing/serialization_test.go
5 participants