-
Notifications
You must be signed in to change notification settings - Fork 41
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
validating responses? #252
Comments
Hello! I think this is smth that should be included in default installation. I made some steps to this direction and currently you can implement it by your own using middleware (as it has access to both request and response variables). |
Where can I see this? |
See this section https://github.com/buger/gor#middleware Also, it will be really helpful if you help imagine how this built-in functionality may look like. Some fields probably should be ignored. Should it just generate a file with all differences, or somehow output it to the console. What would you like it to do? Thank you! |
Hello, or mod_dup+mod_compare in C++: We currently use mod_compare at Orange for making sure new code versions of our API are strictly identical to the one we are trying to replicate. If someone implemented that kind of functionality in gor, we might be tempted to switch to it and perhaps contribute. Regards, Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc This message and its attachments may contain confidential or privileged information that may be protected by law; |
@buger, re how i would want it to look like:
@buger to be clear are you saying you want to build this as a middleware? you mention "built-in" but not sure if that means as middleware or not. do you have concrete plans to work on this? hopefully i can find some time to help out but can't promise anything. |
Hello Dieter, This page explains briefly the filters : And following your question, I have started this page to explain the output formats: Regards, De : Dieter Plaetinck [mailto:[email protected]]
@bugerhttps://github.com/buger, re how i would want it to look like:
@bugerhttps://github.com/buger to be clear are you saying you want to build this as a middleware? you mention "built-in" but not sure if that means as middleware or not. do you have concrete plans to work on this? hopefully i can find some time to help out but can't promise anything. — Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc This message and its attachments may contain confidential or privileged information that may be protected by law; |
Thank you all for such detailed feedback! I need some time to read all this stuff :) @ecourreges-orange not middleware, i want it to be built in. @ecourreges-orange one more question, using |
o The question remains for duplicating to staging, I don’t know how to solve this without compromising security => staging probably needs to have auth disabled, in that case you’ll have differences only when there is an auth error on prod? o We duplicate to hidden production so that the APIs hit the exact same backends. If you hit your staging server, your databases are probably not fully in sync, so you will have a lot of false positive differences. o Of course, to make sure our new code doesn’t break our production database, we first test it in pre-production/bench/development.
De : Leonid Bugaev [mailto:[email protected]] Thank you all for such detailed feedback! I need some time to read all this stuff :) @ecourreges-orangehttps://github.com/ecourreges-orange not middleware, i want it to be built in. @ecourreges-orangehttps://github.com/ecourreges-orange one more question, using mod_dup how do you handle dynamic variables like user session ids or auth tokens, which generated randomly on "production", and will not be same on staging? — Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc This message and its attachments may contain confidential or privileged information that may be protected by law; |
also relevant: https://github.com/dnaeon/go-vcr |
I generally used the elasticsearch results to validate responses as it includes the response code. I also recently updated the tool to fix it with ES 2.x #333 |
Hey, I wrote a gor middleware in java to do this. It's fairly untested. But I will be running it against our website in the coming weeks. Code is at https://github.com/HuygensING/gor-tester cheers. Jauco |
Terrific! Thank you so much for sharing it! |
@jauco were you able to validate response across your staging/test server @buger - pretty exited to know if you have built something around this can you share something on this ... |
@mayank-unbxd this doc explains how to access response and validate it https://github.com/buger/goreplay/tree/master/middleware |
Hi, been using gor for a bit and it proved really helpful in determining why some code changed crashed our apps with production traffic (while everything was great with fake stress test traffic).
but is there a way to also validate that when sending the duplicated traffic to test setup, that the test setup also responds the same responses as what prod is doing? (or maybe "near-identical", by allowing a regex or something to determine a field that could be different)
this is my biggest hurdle with the tool now. it's great for sending the traffic, but i really want to validate the responses as well. (or a sampled subset of responses)
am i missing something obvious? couldn't find any references to this.
thanks!
The text was updated successfully, but these errors were encountered: