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

Setting is_development_mode allows request to the API #6

Open
sogamoso opened this issue May 27, 2022 · 0 comments
Open

Setting is_development_mode allows request to the API #6

sogamoso opened this issue May 27, 2022 · 0 comments

Comments

@sogamoso
Copy link

sogamoso commented May 27, 2022

I recently started using VWO at work. We were pointed to this gem to do A/B Fullstack testing.

We are relying on the is_development_mode parameter to ensure we were not polluting our experiments with data from development and staging environments. Unfortunately, that doesn't seem to be the case. We noticed it when we started getting errors from VWO's API when running the web application in our development environments.

vwo-ruby-sdk/lib/vwo.rb

Lines 58 to 59 in 1d897ad

# @param[Boolean] :is_development_mode To specify whether the request
# to our server should be sent or not.

We got several errors when, for example, using the VWO client to activate a campaign. Even instantiating the VWO class will fire up a request to get the settings. This is understandable, but not ideal. It makes running automated tests where this class is instantiated more complicated than necessary; we are seeing errors being logged even if the client doesn't raise an error.

In this case, following the code, starting here:

unless valid_settings_file?(get_settings(settings_file))

Which takes us here:

settings_file || @settings_file_manager.get_settings_file

Which leads us to the client making a GET request:

settings_file_response = ::VWO::Utils::Request.get(vwo_server_url, params)

Would it be possible for this behavior to be changed to as advertised? We would expect no requests to be made when is_development_mode is set to true.

@sogamoso sogamoso changed the title Setting is_development_mode is ignored Setting is_development_mode allows request to the API May 28, 2022
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

No branches or pull requests

1 participant