Unable to update toxic using prebuilt windows server
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 12.4k
- Forks
- 510
- PR merge metrics
- No merged PRs in 30d
Description
I'm fairly new to Toxiproxy and was going through some examples to understand how to utilize it. I downloaded the prebuilt binaries for 2.7.0 and ran into an issue when trying to update a toxic.
$ toxiproxy-cli-windows-amd64.exe -v
toxiproxy-cli version 2.7.0
$ toxiproxy-cli-windows-amd64.exe create --listen 127.0.0.1:9100 --upstream 127.0.0.1:9000 myProxy
Created new proxy myProxy
$ toxiproxy-cli-windows-amd64.exe toxic add -t latency -n myToxic -a latency=100 -a jitter=50 myProxy
Added downstream latency toxic 'myToxic' on proxy 'myProxy'
$ toxiproxy-cli-windows-amd64.exe toxic update -n myToxic -a jitter=25 myProxy
Failed to update toxic: failed to update toxic 'myToxic' of proxy 'myProxy': json: cannot unmarshal number into Go value of type toxiproxy.ApiError
I went to grab the source and debug what was going on, and it seems like the issue originates with the server. If I run the server from source I'm able to update the value with no issues (using commit 7abcb6f9cf95d2fb27244435e22b16bda14ab5c3)
$ go run cli.go create --listen 127.0.0.1:9100 --upstream 127.0.0.1:9000 myProxy
Created new proxy myProxy
$ go run cli.go toxic add -t latency -n myToxic -a latency=100 -a jitter=50 myProxy
Added downstream latency toxic 'myToxic' on proxy 'myProxy'
$ go run cli.go toxic update -n myToxic -a jitter=25 myProxy
Updated toxic 'myToxic' on proxy 'myProxy'
I took a look at wireshark to compare the responses (left is prebuilt server using prebuilt cli, and right is running server from source with prebuilt cli)
Is there something I'm doing wrong with the prebuilt version, or is this some sort of bug? Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the prebuilt Windows 2.7.0 server using the commands in the issue, then compare its update response with the server built from source via cli.go at commit 7abcb6f9cf95d2fb27244435e22b16bda14ab5c. Trace the toxic update request and response handling; done means the prebuilt server accepts the jitter update and the CLI reports success.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100