User:YuviPanda/Realm branches
Appearance
(Redirected from User:Yuvipanda/Realm branches)
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:
- Using
if $::realm == 'labs'or$::realm == 'production' - Having a separate
'::labs'class (such asrole::parsoidandrole::parsoid::labs) with entirely different code - 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.