diff --git a/dev/update_mlflow_versions.py b/dev/update_mlflow_versions.py index 2bdb4b0e3d587..7e17e7dd791fb 100644 --- a/dev/update_mlflow_versions.py +++ b/dev/update_mlflow_versions.py @@ -1,3 +1,4 @@ +import logging import re from pathlib import Path from typing import List, Union @@ -5,6 +6,8 @@ import click from packaging.version import Version +_logger = logging.getLogger(__name__) + _PYTHON_VERSION_FILES = [ Path("mlflow", "version.py"), ] @@ -171,10 +174,17 @@ def validate_new_version( ) -> str: new = Version(value) current = Version(get_current_py_version()) + + # this could be the case if we just promoted an RC to a release if new < current: - raise click.BadParameter( - f"New version {new} is not greater than or equal to current version {current}" + _logger.warning( + f"New version {new} is not greater than or equal to current version {current}. " + "If the previous version was an RC, this is expected. If not, please make sure the " + "specified new version is correct." ) + # exit with 0 to avoid failing the CI job + exit(0) + return value