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

When oc edit re-opens with a failure, get unfriendly protobuf message in the comments #9739

Closed
jwforres opened this issue Jul 7, 2016 · 6 comments

Comments

@jwforres
Copy link
Member

jwforres commented Jul 7, 2016

When using oc edit and causing a failure I got back this message in the comments:

The edited file had a syntax error: unable to decode "edited-file": provided data does not appear to be a protobuf message, expected prefix [107 56 115 0]

This issue may affect upstream, need to test against kube as well.

I was able to recreate it when editing a quota when I put GiB instead of Gi

@jwforres
Copy link
Member Author

jwforres commented Jul 7, 2016

cc @smarterclayton

@deads2k
Copy link
Contributor

deads2k commented Jul 7, 2016

Well did you try prefix [07 10 10 04]?

@smarterclayton
Copy link
Contributor

lol

Probably someone using codec blindly.

On Thu, Jul 7, 2016 at 2:52 PM, David Eads notifications@github.com wrote:

Well did you try prefix [07 10 10 04]?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9739 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABG_p3Ftoy2vrMlgBujqavYzfUdLc2uzks5qTUrxgaJpZM4JHWQH
.

@mfojtik
Copy link
Contributor

mfojtik commented Aug 2, 2016

just got this when editing project ;-)

@pweil-
Copy link

pweil- commented Aug 3, 2016

it looks like the interface for RecognizingDecoder changed so the protobuf decoder was being added as a skipped decoder and replacing the good error message from the json decoder with what is described above.

After adding the unknown parameter the error message of

The edited file had a syntax error: unable to decode "edited-file": quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'

shows as I'd expect. Here is the change. If this looks ok then I will submit upstream: #10191

@smarterclayton
Copy link
Contributor

Yikes. Ok, we need to assert that all the protobuf methods implement recognizing decoder, for sure.

@mfojtik mfojtik assigned pweil- and unassigned mfojtik Aug 4, 2016
k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this issue Aug 5, 2016
Automatic merge from submit-queue

add asserts for RecognizingDecoder and update protobuf serializer

Ensure that serializers are asserting that they implement the `RecognizingDecoder` interface and update the protobuf serializer to add the `unknown` parameter.

Manifested in: openshift/origin#9739

@smarterclayton @deads2k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants