-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Burn YAML with fire (kind of) #5533
Burn YAML with fire (kind of) #5533
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits. Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name. |
150a7e2
to
0123f1b
Compare
} | ||
|
||
// yamlCodec implements Codec | ||
var _ Codec = yamlCodec{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To prove that yamlCodec implements Codec. We started doing that in other places where there's a type that should implement a named interface.
----- Original Message -----
// CodecFor returns a Codec that invokes Encode with the provided version.
func CodecFor(scheme *Scheme, version string) Codec {
return &codecWrapper{scheme, version}
}+// yamlCodec converts YAML passed to the Decoder methods to JSON.
+type yamlCodec struct {
- // a Codec for JSON
- Codec
+}
+// yamlCodec implements Codec
+var _ Codec = yamlCodec{}What's the point of this line?
Reply to this email directly or view it on GitHub:
https://github.com/GoogleCloudPlatform/kubernetes/pull/5533/files#r26594752
lgtm, pending e2e run (in progress). |
Great, thanks. FYI/FWIW, Kubelet already explicitly calls yaml.Unmarshal: |
AFAICT, we're still not setting Content-Type in the client, and we're not documenting the accepted Content-Type in apiserver: |
Remove last usage of ResourceFromFile
Enables clients to optionally handle YAML
Base codecs no longer automically handle YAML. Instead, clients must convert to JSON first via yaml.ToJSON and runtime.YAMLDecoder.
0123f1b
to
6918a4d
Compare
rebased |
Did we get results of the e2e run? |
Doing an e2e run now |
e2e passing this morning (locally). This lgtm to merge. |
Merge away - don't wait for my tests (saves me a few hours) |
Burn YAML with fire (kind of)
This seems to have broken tests for pkg/kubelet/config |
Fixing that |
Crossed merges |
Also seems to have broken integration On Mon, Mar 23, 2015 at 11:40 AM, Clayton Coleman notifications@github.com
|
Integration is fixed in #5775 ----- Original Message -----
|
Remove automatic decoding of YAML via core Codec and replace with opt-in decoding.
Partially addresses #1004
Needs an e2e run in case there's a missed spot.