Commit Graph

155 Commits

Author SHA1 Message Date
k8s-merge-robot
5cc7c9565f Merge pull request #24059 from caesarxuchao/client-gen-dotted-group
Automatic merge from submit-queue

Client-gen: handle dotted group name, e.g., "authentication.k8s.io"

The client-gen used to assume the group name doesn't include dot, but it's not true, e.g., we have group `authentication.k8s.io`.

With this PR, Client-gen will use the full group name when creating directory (e.g., the client for the authentication group will be generated at pkg/client/clientset_generated/release_1_3/typed/`authentication.k8s.io`/v1/). However, because golang doesn't allow dot in variable/function names, so when the group name is used as part of variable/function name, client-gen extracts the part before the first dot (e.g., authentication).

This PR also changes the group name of the test group from `testgroup` to `testgroup.k8s.io` to verify if client-gen generates sane code.

cc @deads2k for #20573
2016-04-14 13:13:32 -07:00
Daniel Smith
490c68dbe3 Merge pull request #23768 from wojtek-t/conversions_with_framework_6
Migrate to new conversions generator - part 2
2016-04-14 11:30:21 -07:00
Chao Xu
bc0662b3e9 generated changes 2016-04-14 10:04:59 -07:00
Chao Xu
08fc35018a Client-gen: handle dotted package name 2016-04-14 10:04:58 -07:00
goltermann
a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
k8s-merge-robot
f5e8e7453b Merge pull request #23806 from smarterclayton/streaming_watch
Automatic merge from submit-queue

Implement a streaming serializer for watch

Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).

@wojtek-t @lavalamp
2016-04-13 05:18:17 -07:00
k8s-merge-robot
acf9492cb1 Merge pull request #23660 from goltermann/vetclean
Automatic merge from submit-queue

Additional go vet fixes

Mostly:
- pass lock by value
- bad syntax for struct tag value
- example functions not formatted properly
2016-04-12 06:22:16 -07:00
Clayton Coleman
3474911736 Implement a streaming serializer for watch
Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).
2016-04-11 11:22:05 -04:00
Wojciech Tyczynski
7448cc04e1 Switch to new generator 2016-04-11 08:04:45 +02:00
Wojciech Tyczynski
cd2de7d4cd Merge pull request #23741 from wojtek-t/conversions_with_framework_5
Small improvements in conversion generator
2016-04-10 22:51:26 -07:00
Wojciech Tyczynski
6d954a1490 Merge pull request #23871 from smarterclayton/proto_timestamp
Implement a simpler unversioned.Time serialization
2016-04-10 22:47:49 -07:00
goltermann
696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
Chao Xu
db518cf4ff Generated code 2016-04-06 10:17:48 -07:00
Chao Xu
027710baf5 client-gen now generates the "generated by" comment in doc.go 2016-04-05 15:24:31 -07:00
Clayton Coleman
529bd2bf98 Support protobuf.as=Message for aliasing
In order to allow a Go type to have a different internal representation,
provide the comment `// +protobuf.as=MESSAGENAME` which substitutes the
current message's members with the named message's members. Used by the
unversioned.Time type to have the same fields as unversioned.Timestamp
and to have an alternate serialization.
2016-04-04 23:00:35 -04:00
Wojciech Tyczynski
49d3c3962c Small improvements in conversion generator 2016-04-05 02:10:23 +02:00
k8s-merge-robot
7d7ca5ab72 Merge pull request #23608 from caesarxuchao/mv-typed-clients
Automatic merge from submit-queue

Move typed clients into clientset folder

Move typed clients from `pkg/client/typed/` to `pkg/client/clientset_generated/${clientset_name}/typed`.

The first commit changes the client-gen, the last commit updates the doc, other commits are just moving things around.

@lavalamp @krousey
2016-04-02 19:31:40 -07:00
k8s-merge-robot
f8ea3fab53 Merge pull request #23427 from wojtek-t/conversions_with_framework_4
Automatic merge from submit-queue

Migrate to the new conversion generator - part1

This PR contains two commits:
- few more fixes to the generator
- migration of the pkg/api/v1 to use the new generator

The second commit is big, but I reviewed the changes and they contain:
- conversions between types that we didn't even generating conversion between
- changes in how we handle maps/pointers/slices - previously we were explicitly referencing fields, now we are using "shadowing in, out" to make the code more generic
- lack of auto-generated method for ReplicationControllerSpec (because these types are different (*int vs int for Replicas) and a preexisting conversion already exists

Most of issues in the first commit (e.g. adding references to "in" and "out" for slices/maps/points) were discovered by our tests. So I'm pretty confident that this change is correct now.
2016-03-31 17:28:36 -07:00
Chao Xu
49559a3332 Generate the typed clients under the clientset folder 2016-03-31 15:28:45 -07:00
Clayton Coleman
f2139b186c Add an experimental protobuf serializer
Provide a core protobuf serializer that can either write objects with
an envelope (a 4 byte prefix and a runtime.Object) or raw to a byte
array.
2016-03-31 10:41:11 -04:00
Chao Xu
0d37fbdff9 changes in client-gen 2016-03-29 14:49:12 -07:00
Wojciech Tyczynski
9ee8278e4a Fix remaining issues with conversion generator. 2016-03-29 09:49:27 +02:00
k8s-merge-robot
95e09e303f Merge pull request #22965 from caesarxuchao/delete-UID-precondition
Auto commit by PR queue bot
2016-03-26 09:36:28 -07:00
k8s-merge-robot
f6fac0e4de Merge pull request #23443 from goltermann/vet2
Auto commit by PR queue bot
2016-03-25 23:43:44 -07:00
Chao Xu
3aa26565fc move fake discovery client to pkg/client/typed/discovery/fake 2016-03-25 16:02:08 -07:00
goltermann
32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
Chao Xu
31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
Wojciech Tyczynski
42e7ecda5a Fix bunch of issues with conversion generator. 2016-03-24 08:26:51 +01:00
Wojciech Tyczynski
7394721d5f Use preexisting conversions in generator 2016-03-23 08:40:54 +01:00
Wojciech Tyczynski
f1248b9c82 Migrate to new conversion generator 2016-03-22 08:43:02 +01:00
Wojciech Tyczynski
04eb0d40bb Migrate everything to new deep-copy generator. 2016-03-17 15:22:18 +01:00
Wojciech Tyczynski
74d005f1cf Generate DeepCopies per directory. 2016-03-17 09:28:11 +01:00
k8s-merge-robot
76984d969e Merge pull request #22982 from wojtek-t/protobuf_cleanups
Auto commit by PR queue bot
2016-03-16 09:25:33 -07:00
k8s-merge-robot
460ece34d5 Merge pull request #22928 from caesarxuchao/print-client-gen-command
Auto commit by PR queue bot
2016-03-16 00:38:39 -07:00
Wojciech Tyczynski
fe2287d0a2 Small cleanups in protobuf generator 2016-03-16 08:16:04 +01:00
k8s-merge-robot
2bb7960b61 Merge pull request #22738 from wojtek-t/build_protobufs_in_docker
Auto commit by PR queue bot
2016-03-15 16:56:26 -07:00
Wojciech Tyczynski
919afadbe7 Refactor import tracker 2016-03-15 16:02:18 +01:00
Chao Xu
f5ed9b3cd9 ignore verify-only flag 2016-03-14 10:28:20 -07:00
Chao Xu
ec02dfc9f0 generated changes 2016-03-14 10:28:20 -07:00
Chao Xu
d83175571d include the client-gen arguments in the generated files 2016-03-14 10:28:20 -07:00
Jordan Liggitt
d008283942 Tolerate multiple registered versions in a single group 2016-03-12 12:49:41 -05:00
Wojciech Tyczynski
0db2012039 Refactor assmebling proto files to avoid code duplication 2016-03-11 15:54:10 +01:00
Wojciech Tyczynski
62dc80c9a2 Fix package 2016-03-10 08:21:01 +01:00
Wojciech Tyczynski
454468f5c2 Remove dead code 2016-03-09 12:19:02 +01:00
Wojciech Tyczynski
dcf292174e Refactor Rewrite functions 2016-03-09 12:19:02 +01:00
Wojciech Tyczynski
52798beef2 Generate protobuf-related files in Docker 2016-03-09 10:45:24 +01:00
Wojciech Tyczynski
525d14e0bc Fix gofmt errors 2016-03-08 09:46:47 +01:00
Kris
dbde4fd798 Move the discovery client to its own package 2016-03-04 13:44:52 -08:00
Abhi Shah
b25a48d605 Revert "Move discovery client to its own package" 2016-03-04 09:24:54 -08:00
Abhi Shah
627edd2588 Merge pull request #22016 from krousey/discbreak
Move discovery client to its own package
2016-03-04 09:17:46 -08:00