Actions
Bug #11213
closedNon normalize hooks env var names for node info
Pull Request:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
32
Name check:
Fix check:
Regression:
Description
This is awful.
We are using for the same info different names in different hooks: RUDDER_POLICIES_DIRECTORY_CURRENT, RUDDER_POLICIES_DIRECTORY and RUDDER_POLICIES_DIRECTORY_NEW, RUDDER_NEXT_POLICIES_DIRECTORY.
This must stop ASAP (error prone, maintenance nightmare, extremely surprising, etc).
In 4.1, support both but undocument the one that will be removed, in 4.2 and up stop supporting the redondant name.
Also, we need to provide a common set of var names, and node hostname must be on them.
So, to sum up, node related hooks must have at least:
# - RUDDER_NODE_ID: the nodeId # - RUDDER_NODE_HOSTNAME: the fully qualified hostname of the node # - RUDDER_NODE_POLICY_SERVER_ID: the node policy server id # - RUDDER_POLICIES_DIRECTORY_CURRENT: the full path of the base directory containing policies for that node # - RUDDER_POLICIES_DIRECTORY_NEW: the full path of the base directory containing next policies for that node (during a generation) # - RUDDER_POLICIES_DIRECTORY_ARCHIVE: the full path of the base directory containing previous policies for that node
That means migrating:
- RUDDER_NODEID => RUDDER_NODE_ID - RUDDER_NODE_POLICY_SERVER => RUDDER_NODE_POLICY_SERVER_ID - RUDDER_POLICIES_DIRECTORY => RUDDER_POLICIES_DIRECTORY_CURRENT - RUDDER_NEXT_POLICIES_DIRECTORY => RUDDER_POLICIES_DIRECTORY_NEW
Actions