Page MenuHomePhabricator

Normalize environment variables and usage
Closed, InvalidPublic

Description

Goal: We want to make the upgrade process easier for users. As part of that we want to improve clarity in configuration of our distributions (Suite and individual Docker images), as well as code readability and maintainability.

  • Rework the configuration so that it's on one place and editable by users
  • Clarify and normalize use of default.env, template.env, local.env, and .env in both the distribution and build pipeline/test contexts
  • Consolidate configuration values in example and in tests suites to rely upon values from env vars vs in scripts or in the the compose override files
  • ⚠️ If there are two Environment Variable names in two places that are set to the same value anywhere in the code, and have the same purpose, decide on one naming and apply that throughout
  • 🚨 Rename all*_SCHEME_AND_HOST env vars to be *_URL (and *_SERVER when protocol is not expected to be at the beginning):
    • Remove hard coded “http” anywhere but in environment files in preparation for HTTPS options
  • 🚨 Clarify *_PUBLIC_URL vs internal *_URL and carefully consider naming:
    • If a full server URL or server name+port is particular to the Docker network, vs what must be public. In the distribution this should be further clarified.
    • Consider optional *_PUBLIC_URLs and standard *_URLs (e.g. WIKIBASE_URL and WIKIBASE_PUBLIC_URL, with only WIKIBASE_URL required)
  • 🚨 Rename QS_* to QUICKSTATEMENTS_* to match naming used in Docker files, and reduce confusion with WDQS_* variables
  • 🚨 Rename WB_PROPERTY_NAMESPACE to QUICKSTATEMENTS_PROPERTY_NAMESPACE, etc. These variables are specific to Quickstatements which is only a Wikibase service (vs Elastic Search, etc).
  • 🚨 Make all MW_WG_ variables to be simply MW_, unless there is a compelling case for keeping the WG
  • 🚨 Create an “Upgrading from X to Y version” in example/README.md and relavent Docker/*/README.mds detailing the environment variable name changes
  • 🚨 Note the change of some public-facing env var names under a “BREAKING CHANGE” note in CHANGELOG for this version, either pointing to the related READMEs for details or directly documenting there