scylladb / scylla-ccm

Cassandra Cluster Manager, modified for Scylla
Apache License 2.0
20 stars 62 forks source link

scylla_node: add a helper for accessing environ variables #503

Closed tchaikov closed 9 months ago

tchaikov commented 10 months ago

scylla_node: add a helper for accessing environ variables

before this change, we always try to access self._launch_env and fall back to os.environ, and optionally update the return env dict, then use it. the pattern repeats itself couple times in ScyllaNode class.

in this change, to consolidate it, a helper is added. it does not do anything clever just preserve existing behavior. despite that existing behavior could be potentially confusing: we actually mutate the returned dict if it references the existing self._launch_env.

tchaikov commented 9 months ago

v2:

@fruch hi Israel, could you help re-review this change?