Jump to content

User:YuviPanda/Realm branches

From Wikitech

What is a realm branch?

Any puppet code that does different things in prod and labs explicitly based on where it is, rather than particular features of these environments. This includes, but is not limited to:

  1. Using if $::realm == 'labs' or $::realm == 'production'
  2. Having a separate '::labs' class (such as role::parsoid and role::parsoid::labs) with entirely different code
  3. Parameters to classes that are purely based on realm, such as is_labs

Analogies in other ares of code

These are very similar to browser detection in client side JS - identifying the environment you are in by name rather than feature. It is super convenient in the short term, but causes maintainability issues in the long term.