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

bug: chaos-tproxy-controller does not deserialize RawFile properly with RawFile.Contents #63

Open
STRRL opened this issue Mar 10, 2023 · 0 comments · May be fixed by #64
Open

bug: chaos-tproxy-controller does not deserialize RawFile properly with RawFile.Contents #63

STRRL opened this issue Mar 10, 2023 · 0 comments · May be fixed by #64

Comments

@STRRL
Copy link
Member

STRRL commented Mar 10, 2023

I am working on this PR: chaos-mesh/chaos-mesh#3956

But I still face some trouble with that chaos-tproxy does not accept the chaos. The log saied:


..
2023-03-10T10:16:44.544Z        INFO    records records/controller.go:118       iterating record        {"record": {"id":"chaos-mesh-6861/http-test-78f645fc9c-42q4d","selectorKey":".","phase":"Not Injected/Wait","injectedCount":0,"recoveredCount":0,"events":[{"type":"Failed","operation":"Apply","message":"failed to apply for pod chaos-mesh-6861/http-test-78f645fc9c-42q4d, status(400): invalid type: string \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURwVENDQW8yZ0F3SUJBZ0lVUTFuZDdweFNQTFJqOTdXYk1RZTUvNkJqVnJFd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZqRUxNQWtHQTFVRUJoTUNRVlV4RXpBUkJnTlZCQWdNQ2xOdmJXVXRVM1JoZEdVeElUQWZCZ05WQkFvTQpHRWx1ZEdWeWJtVjBJRmRwWkdkcGRITWdVSFI1SUV4MFpERVBNQTBHQTFVRUF3d0dZVzVrY21WM01CNFhEVEl6Ck1ETXhNREE1TWpNd01Gb1hEVE16TURNd056QTVNak13TUZvd1ZqRUxNQWtHQTFVRUJoTUNRVlV4RXpBUkJnTlYKQkFnTUNsTnZiV1V0VTNSaGRHVXhJVEFmQmdOVkJBb01HRWx1ZEdWeWJtVjBJRmRwWkdkcGRITWdVSFI1SUV4MApaREVQTUEwR0ExVUVBd3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RHWjgrYWpuQWZ3RklIUHZPcC9rQTVjWC9ZQlNZZnNXdWgrenVHCng0TU1sMGZVaHoyWGx0Vno2aTd5U1FyWWpTRDYwekt6a0tzUTJQemZrdjVCMGNicTU1c1RCazZ3cm5iK3YycTMKNTk4bUl5S1BNVGFyN1ZIUThIa0FpNkVFMUdzTGMrN2Uzdz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\", expected a sequence at line 1 column 1994","timestamp":"2023-03-10T09:23:04Z"},{"<....truncated>

We use json rpc to communicate between chaos-tproxy and chaos-daemon, and the JSON serialization in golang would serialize bytes as base64. But serde_json does not use base64 when it deserialize the JSON, which means it cause the problem which mentioned formerly.

@STRRL STRRL linked a pull request Mar 10, 2023 that will close this issue
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 a pull request may close this issue.

1 participant