Skip to content

Run serialization tests against upstream types and update v1beta3 - #5485

Merged
openshift-bot merged 2 commits into
openshift:masterfrom
0xmichalis:serialization-test
Oct 30, 2015
Merged

openshift-bot merged 2 commits into
openshift:masterfrom
0xmichalis:serialization-test

Conversation

@0xmichalis

Copy link
Copy Markdown
Contributor

@0xmichalis

Copy link
Copy Markdown
Contributor Author

[test]

@0xmichalis 0xmichalis changed the title UPSTREAM: <carry>: Add v1beta3 Kube serialization test [WIP] UPSTREAM: <carry>: Add v1beta3 Kube serialization test Oct 29, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Given the way that UPSTREAM likes to test by re-running the whole bucket with a different version, I don't think we'll be able to get the structure of this changed moved up.

What about updating the serialization_test.go in our pkg/api to not exclude kube types?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What about updating the serialization_test.go in our pkg/api to not exclude kube types?

I think this is plausible. Will try it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@deads2k how about now?

@0xmichalis

Copy link
Copy Markdown
Contributor Author

Btw, I see that all TypeMeta in v1beta3 need to be updated to unversioned.TypeMeta:)

@0xmichalis 0xmichalis changed the title [WIP] UPSTREAM: <carry>: Add v1beta3 Kube serialization test [WIP] Run serialization tests against upstream types and update v1beta3 Oct 29, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, this isn't obvious to me. These are somehow broken? Also, anything that needs to stay in sync should have a unit test to make sure it stays in sync.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It isn't obvious to me either, so I located the PRs which added those upstream:
PodAttachOptions: kubernetes/kubernetes#12119
PodExecOptions: kubernetes/kubernetes#6869
ListOptions: kubernetes/kubernetes#5763
List: kubernetes/kubernetes#2786

@smarterclayton may have a word here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we have test for each of these in compatibility_test.go?

@0xmichalis

Copy link
Copy Markdown
Contributor Author

I have removed Status which now is an unversioned object and added PodAttachOptions to v1beta3.

Objects that still need to be updated in v1beta3:

Based on the massive error returned from the serialization test. We need to make it more readable.

@0xmichalis

Copy link
Copy Markdown
Contributor Author

Have boiled down serialization failures to Pods

@0xmichalis 0xmichalis changed the title [WIP] Run serialization tests against upstream types and update v1beta3 Run serialization tests against upstream types and update v1beta3 Oct 30, 2015
Comment thread pkg/api/serialization_test.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is this needed? if the pkg path does equal "k8s.io/kubernetes/pkg/api", the first condition would already skip it...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is AND not OR...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah. Can we update the name of this test if the intent is to test serialized k8s types?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I like the present name. How about adding godoc?

On Fri, Oct 30, 2015 at 3:10 PM, Jordan Liggitt [email protected]
wrote:

In pkg/api/serialization_test.go
#5485 (comment):

func TestTypes(t *testing.T) {
for kind, reflectType := range api.Scheme.KnownTypes("") {

  •   if !strings.Contains(reflectType.PkgPath(), "/origin/") {
    
  •   if !strings.Contains(reflectType.PkgPath(), "/origin/") && reflectType.PkgPath() != "k8s.io/kubernetes/pkg/api" {
    

ah. Can we update the name of this test if the intent is to test
serialized k8s types?

—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/5485/files#r43505303.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nevermind, I apparently can't interpret boolean statements today

@liggitt

liggitt commented Oct 30, 2015

Copy link
Copy Markdown
Contributor

can we get a hand crafted test specifically around pod spec in pkg/api/compatibility_test.go to make sure an old v1beta3 serialization decodes to what we expect? @pmorie might have a good one

@0xmichalis

Copy link
Copy Markdown
Contributor Author

I finally got a clean run locally

@deads2k

deads2k commented Oct 30, 2015

Copy link
Copy Markdown
Contributor

I think I'm willing to take an issue to figure out this: https://github.com/openshift/origin/pull/5485/files#diff-394377845c8dfd9eec363c059cdde354R420, squash the UPSTREAM: <carry>'s down to one and merge to unstick @pmorie's pull.

@0xmichalis

Copy link
Copy Markdown
Contributor Author

@0xmichalis

Copy link
Copy Markdown
Contributor Author

I think I'm willing to take an issue to figure out this: https://github.com/openshift/origin/pull/5485/files#diff-394377845c8dfd9eec363c059cdde354R420, squash the UPSTREAM: 's down to one and merge to unstick @pmorie's pull.

Opened #5529

@deads2k

deads2k commented Oct 30, 2015

Copy link
Copy Markdown
Contributor

@pmorie I think the last sign off is yours:

We still need @pmorie to review kargakis@9a3bcf6

@pmorie

pmorie commented Oct 30, 2015

Copy link
Copy Markdown
Contributor

@deads2k I have one comment on the conversion, LGTM otherwise.

@0xmichalis

Copy link
Copy Markdown
Contributor Author

re[test]

@0xmichalis

Copy link
Copy Markdown
Contributor Author

new-app flake

I1030 13:09:54.265383   17553 newapp.go:647] Using "some/location.git" as the source for build
panic: test timed out after 1m0s

goroutine 50 [running]:
testing.func·008()
    /usr/lib/golang/src/testing/testing.go:681 +0x168
created by time.goFunc
    /usr/lib/golang/src/time/sleep.go:129 +0x59

goroutine 1 [chan receive]:
testing.RunTests(0x1922eb8, 0x1f62860, 0xc, 0xc, 0xc2080c8001)
    /usr/lib/golang/src/testing/testing.go:556 +0xdc3
testing.(*M).Run(0xc208055810, 0x2911ce0)
    /usr/lib/golang/src/testing/testing.go:485 +0xe1
main.main()
    github.com/openshift/origin/pkg/generate/app/cmd/_test/_testmain.go:122 +0x382

goroutine 7 [chan receive]:
github.com/golang/glog.(*loggingT).flushDaemon(0x29067a0)
    /data/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/golang/glog/glog.go:879 +0x99
created by github.com/golang/glog.init·1
    /data/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/golang/glog/glog.go:410 +0x2ca

goroutine 17 [syscall, 1 minutes, locked to thread]:
runtime.goexit()
    /usr/lib/golang/src/runtime/asm_amd64.s:2232 +0x1

goroutine 21 [syscall]:
os/signal.loop()
    /usr/lib/golang/src/os/signal/signal_unix.go:21 +0x2d
created by os/signal.init·1
    /usr/lib/golang/src/os/signal/signal_unix.go:27 +0x43

goroutine 47 [syscall]:
syscall.Syscall6(0x3d, 0x4496, 0xc20823f424, 0x0, 0xc20803ae10, 0x0, 0x0, 0x4620ae, 0xc20823f3d8, 0x9f1721)
    /usr/lib/golang/src/syscall/asm_linux_amd64.s:46 +0x5
syscall.wait4(0x4496, 0xc20823f424, 0x0, 0xc20803ae10, 0x90, 0x0, 0x0)
    /usr/lib/golang/src/syscall/zsyscall_linux_amd64.go:124 +0x87
syscall.Wait4(0x4496, 0xc20823f46c, 0x0, 0xc20803ae10, 0x3, 0x0, 0x0)
    /usr/lib/golang/src/syscall/syscall_linux.go:224 +0x6e
os.(*Process).wait(0xc208424880, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/os/exec_unix.go:22 +0x162
os.(*Process).Wait(0xc208424880, 0x5, 0x0, 0x0)
    /usr/lib/golang/src/os/doc.go:45 +0x48
os/exec.(*Cmd).Wait(0xc208436b40, 0x0, 0x0)
    /usr/lib/golang/src/os/exec/exec.go:364 +0x30f
os/exec.(*Cmd).Run(0xc208436b40, 0x0, 0x0)
    /usr/lib/golang/src/os/exec/exec.go:246 +0x84
github.com/openshift/origin/pkg/generate/git.command(0x0, 0x0, 0x15ab170, 0x3, 0x0, 0x0, 0xc2083f1f80, 0x4, 0x4, 0x0, ...)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/generate/git/repository.go:209 +0x294
github.com/openshift/origin/pkg/generate/git.func·001(0x0, 0x0, 0x0, 0x0, 0xc2083f1f80, 0x4, 0x4, 0x0, 0x0, 0x0, ...)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/generate/git/repository.go:44 +0xed
github.com/openshift/origin/pkg/generate/git.(*repository).Clone(0xc208052360, 0xc2084243a0, 0x11, 0xc2083f1f40, 0x31, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/generate/git/repository.go:146 +0x1d5
github.com/openshift/origin/pkg/generate/app.(*SourceRepository).LocalPath(0xc208256dd0, 0x0, 0x0, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/generate/app/sourcelookup.go:200 +0x5ac
github.com/openshift/origin/pkg/generate/app.(*SourceRepository).Detect(0xc208256dd0, 0x7feeba5b3840, 0xc2083faa50, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/generate/app/sourcelookup.go:162 +0x88
github.com/openshift/origin/pkg/generate/app/cmd.(*AppConfig).detectSource(0xc20847fb00, 0xc208052358, 0x1, 0x1, 0x0, 0x0)
    github.com/openshift/origin/pkg/generate/app/cmd/_test/_obj_test/newapp.go:699 +0x17b
github.com/openshift/origin/pkg/generate/app/cmd.TestDetectSource(0xc20803a870)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/generate/app/cmd/newapp_test.go:443 +0x6a5
testing.tRunner(0xc20803a870, 0x1f628d8)
    /usr/lib/golang/src/testing/testing.go:447 +0x134
created by testing.RunTests
    /usr/lib/golang/src/testing/testing.go:555 +0xd4e

goroutine 48 [syscall]:
syscall.Syscall(0x0, 0x8, 0xc208384c24, 0x5dc, 0xc208384c00, 0x43ac99, 0xc20839aea0)
    /usr/lib/golang/src/syscall/asm_linux_amd64.s:21 +0x5
syscall.read(0x8, 0xc208384c24, 0x5dc, 0x5dc, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/syscall/zsyscall_linux_amd64.go:867 +0x7c
syscall.Read(0x8, 0xc208384c24, 0x5dc, 0x5dc, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/syscall/syscall_unix.go:136 +0x66
os.(*File).read(0xc2080523c0, 0xc208384c24, 0x5dc, 0x5dc, 0xc2080d8c00, 0x0, 0x0)
    /usr/lib/golang/src/os/file_unix.go:191 +0x91
os.(*File).Read(0xc2080523c0, 0xc208384c24, 0x5dc, 0x5dc, 0x24, 0x0, 0x0)
    /usr/lib/golang/src/os/file.go:95 +0xc4
bytes.(*Buffer).ReadFrom(0xc2080d3500, 0x7feeba5a2078, 0xc2080523c0, 0x24, 0x0, 0x0)
    /usr/lib/golang/src/bytes/buffer.go:169 +0x463
io.Copy(0x7feeba5a9e70, 0xc2080d3500, 0x7feeba5a2078, 0xc2080523c0, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/io/io.go:358 +0x163
os/exec.func·003(0x0, 0x0)
    /usr/lib/golang/src/os/exec/exec.go:221 +0xbc
os/exec.func·004(0xc208424400)
    /usr/lib/golang/src/os/exec/exec.go:328 +0x3b
created by os/exec.(*Cmd).Start
    /usr/lib/golang/src/os/exec/exec.go:329 +0x1271

goroutine 40 [IO wait]:
net.(*pollDesc).Wait(0xc20826aed0, 0x72, 0x0, 0x0)
    /usr/lib/golang/src/net/fd_poll_runtime.go:84 +0x63
net.(*pollDesc).WaitRead(0xc20826aed0, 0x0, 0x0)
    /usr/lib/golang/src/net/fd_poll_runtime.go:89 +0x51
net.(*netFD).Read(0xc20826ae70, 0xc2083af800, 0x800, 0x800, 0x0, 0x7feeba5a20c8, 0xc208455e98)
    /usr/lib/golang/src/net/fd_unix.go:242 +0x4b3
net.(*conn).Read(0xc208052280, 0xc2083af800, 0x800, 0x800, 0x43672b, 0x0, 0x0)
    /usr/lib/golang/src/net/net.go:121 +0x125
net.(*TCPConn).Read(0xc208052280, 0xc2083af800, 0x800, 0x800, 0xc2084202d0, 0x0, 0x0)
    <autogenerated>:36 +0x86
crypto/tls.(*block).readFromUntil(0xc2084202d0, 0x7feeba5ae8a8, 0xc208052280, 0x5, 0x0, 0x0)
    /usr/lib/golang/src/crypto/tls/conn.go:454 +0x16e
crypto/tls.(*Conn).readRecord(0xc2080dd600, 0x17, 0x0, 0x0)
    /usr/lib/golang/src/crypto/tls/conn.go:539 +0x3c6
crypto/tls.(*Conn).Read(0xc2080dd600, 0xc2083ea000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/crypto/tls/conn.go:904 +0x1bf
net/http.noteEOFReader.Read(0x7feeba5b3470, 0xc2080dd600, 0xc20841d5a8, 0xc2083ea000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/net/http/transport.go:1270 +0x7c
net/http.(*noteEOFReader).Read(0xc208438660, 0xc2083ea000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    <autogenerated>:125 +0xfc
bufio.(*Reader).fill(0xc208286a20)
    /usr/lib/golang/src/bufio/bufio.go:97 +0x382
bufio.(*Reader).Peek(0xc208286a20, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/bufio/bufio.go:132 +0x199
net/http.(*persistConn).readLoop(0xc20841d550)
    /usr/lib/golang/src/net/http/transport.go:842 +0xff
created by net/http.(*Transport).dialConn
    /usr/lib/golang/src/net/http/transport.go:660 +0x10d4

goroutine 41 [select]:
net/http.(*persistConn).writeLoop(0xc20841d550)
    /usr/lib/golang/src/net/http/transport.go:945 +0x4ff
created by net/http.(*Transport).dialConn
    /usr/lib/golang/src/net/http/transport.go:661 +0x10f1

goroutine 49 [syscall]:
syscall.Syscall(0x0, 0xa, 0xc2080d8e00, 0x200, 0xc2080d8e00, 0x43ac99, 0xc20839aea0)
    /usr/lib/golang/src/syscall/asm_linux_amd64.s:21 +0x5
syscall.read(0xa, 0xc2080d8e00, 0x200, 0x200, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/syscall/zsyscall_linux_amd64.go:867 +0x7c
syscall.Read(0xa, 0xc2080d8e00, 0x200, 0x200, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/syscall/syscall_unix.go:136 +0x66
os.(*File).read(0xc2080523e0, 0xc2080d8e00, 0x200, 0x200, 0x200, 0x0, 0x0)
    /usr/lib/golang/src/os/file_unix.go:191 +0x91
os.(*File).Read(0xc2080523e0, 0xc2080d8e00, 0x200, 0x200, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/os/file.go:95 +0xc4
bytes.(*Buffer).ReadFrom(0xc2080d35e0, 0x7feeba5a2078, 0xc2080523e0, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/bytes/buffer.go:169 +0x463
io.Copy(0x7feeba5a9e70, 0xc2080d35e0, 0x7feeba5a2078, 0xc2080523e0, 0x0, 0x0, 0x0)
    /usr/lib/golang/src/io/io.go:358 +0x163
os/exec.func·003(0x0, 0x0)
    /usr/lib/golang/src/os/exec/exec.go:221 +0xbc
os/exec.func·004(0xc208424460)
    /usr/lib/golang/src/os/exec/exec.go:328 +0x3b
created by os/exec.(*Cmd).Start
    /usr/lib/golang/src/os/exec/exec.go:329 +0x1271
FAIL    github.com/openshift/origin/pkg/generate/app/cmd    60.062s

[test] again

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 308f910

@openshift-bot

Copy link
Copy Markdown
Contributor

@deads2k

deads2k commented Oct 30, 2015

Copy link
Copy Markdown
Contributor

lgtm [merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/3867/) (Image: devenv-rhel7_2607)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 308f910

openshift-bot pushed a commit that referenced this pull request Oct 30, 2015
@openshift-bot
openshift-bot merged commit 61403f6 into openshift:master Oct 30, 2015
@0xmichalis
0xmichalis deleted the serialization-test branch October 30, 2015 21:25
@pmorie

pmorie commented Oct 31, 2015

Copy link
Copy Markdown
Contributor

Also LGTM, thanks for the clarification on the conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants