Add ability to specify toxics in the config file
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 12.4k
- Forks
- 510
- PR merge metrics
- No merged PRs in 30d
Description
I would like to declaratively define the toxics configuration in the config file. However, the toxics section is explicitly excluded from deserialization here: https://github.com/Shopify/toxiproxy/blob/master/proxy.go#L32
I tried to follow the history of this code to see if I could understand why this wouldn't be allowed but could find anything.
Without this option you need an init container that waits for the service to be up and then runs a bunch of curl commands which is a lot more complicated and fiddly than just having a single JSON file which defines the state of the proxy.
Thanks for the tool!
PS - this is related to someone's question about documenting the config format. Although an example was added, the issue of toxics in the config which were assumed by the author of the issue was never resolved. https://github.com/Shopify/toxiproxy/issues/163
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
Start in proxy.go around line 32, where the toxics section is excluded from deserialization, and review the related config-format discussion in issue #163. Trace the existing configuration loading path and examples; done means a JSON config can declaratively define toxics and initialize the proxy without follow-up curl commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100