Dmytro Sen created AMBARI-8429:
----------------------------------
Summary: Refactor version comparisons to use function
Key: AMBARI-8429
URL: https://issues.apache.org/jira/browse/AMBARI-8429
Project: Ambari
Issue Type: Bug
Components: stacks
Affects Versions: 1.7.0
Reporter: Dmytro Sen
Assignee: Dmytro Sen
Fix For: 2.0.0
In Ambari 1.7.0, we started introducing checks for the HDP version like
stack_is_hdp22_or_further = not (stack_version.startswith('2.0') or
stack_version.startswith('2.1'))
This may lead to problems in future HDP versions.
Instead, we should create a function/class for doing version comparisons.
ambari-server.py already has a method called compare_versions() that compares
the each segment of a version (separated by dots).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)