This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 9beddd723d AMBARI-26538: Fix KeyError by initializing stack_version
before use (#4046)
9beddd723d is described below
commit 9beddd723dcb228b66f556f8a83e1ec0b5ef503a
Author: Dahyun (Dany) <[email protected]>
AuthorDate: Mon Aug 11 21:39:19 2025 -0400
AMBARI-26538: Fix KeyError by initializing stack_version before use (#4046)
---
.../libraries/functions/setup_ranger_plugin_xml.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
index 6c18e8cd7a..fe84208035 100644
---
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
+++
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
@@ -79,6 +79,11 @@ def setup_ranger_plugin(
cred_setup_prefix_override=None,
plugin_home=None,
):
+ if stack_version_override is None:
+ stack_version = get_stack_version(component_select_name)
+ else:
+ stack_version = stack_version_override
+
if not plugin_home:
stack_root = Script.get_stack_root()
service_name = str(service_name).lower()
@@ -114,11 +119,6 @@ def setup_ranger_plugin(
if policymgr_mgr_url.endswith("/"):
policymgr_mgr_url = policymgr_mgr_url.rstrip("/")
- if stack_version_override is None:
- stack_version = get_stack_version(component_select_name)
- else:
- stack_version = stack_version_override
-
component_conf_dir = conf_dict
if plugin_enabled:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]