Last modified: 2014-10-19 17:44:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71405, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69405 - Use dotenv ruby gem for configuration management
Use dotenv ruby gem for configuration management
Status: NEW
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
wmf-deployment
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-11 15:57 UTC by Željko Filipin
Modified: 2014-10-19 17:44 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Željko Filipin 2014-08-11 15:57:05 UTC
We have a lot of environment variables. It is becoming hard to document them all. Should we start using a tool like dotenv[1]? Looks like it is the most popular configuration management gem for Ruby[2].

1: https://rubygems.org/gems/dotenv
2: https://www.ruby-toolbox.com/categories/Configuration_Management
Comment 1 Dan Duvall 2014-08-11 19:08:04 UTC
I like the idea of using this in tandem with mw-vagrant since it would allow for extension-specific variables, but I'm not sure we should actually commit the .env file; it should be provisioned by puppet.
Comment 2 Željko Filipin 2014-08-13 14:05:29 UTC
If we commit the .env file, we can get rid of some ugly hacks that we have at the moment. For example, the entire url_module.rb in mediawiki/selenium[1] and MobileFrontend[2].

1: https://github.com/wikimedia/mediawiki-selenium/blob/master/lib/mediawiki_selenium/support/modules/url_module.rb

2: https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/support/modules/url_module.rb
Comment 3 Dan Duvall 2014-08-13 17:50:18 UTC
We can get rid of those hacks (and we should!) regardless of our use of an `.env` file.

As I understand it, this is more about simplifying setup outside of something like mw-vagrant where the environment variables are not set for you—i.e. it obviates the requirement to source environment variables into the current shell before executing cucumber.

While I think simplification of setup is definitely a worthwhile goal, standalone use of mediawiki_selenium outside of mw-vagrant will become increasingly marginal as adoption of the latter picks up. If we commit the `.env` file, overriding it will be problematic—it will show up in people's git status—and it's utility within mw-vagrant becomes nil.

What if we commit a `.env` to mediawiki_selenium but leave it out of extension repositories? That way we have a nice place to store global ENV defaults, but still allow for clean local overrides in mw-vagrant.
Comment 4 Željko Filipin 2014-09-02 12:21:27 UTC
Sounds good to me!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links